.bat Snippets - gregstretton/Transfer GitHub Wiki

::SoapUISmoke.bat

@echo on set BuildNumber=%1 set BuildRequestor=%2 set ReqMailId=%3 @SET TEST_NAME=CI_EDMR_SMOKE @SET ENVIRONMENT=CI @SET TODAYS_DATETIME=%date:-4,4%%date:-10,2%%date:~-7,2%%time:~0,2%%time:~3,2%%time:~6,2% @SET TODAYS_DATETIME=%TODAYS_DATETIME: =% @SET PROJECT_LOCATION=G:\SoapUIProjectFilesFromTheNas\ProjectFolder ::@SET SETTINGS_LOCATION=G:\path @SET TEST_RESULTS_DIR=\10.232.158.91\share\Cayman\Folder\SoapUIResults%TEST_NAME%%TODAYS_DATETIME%
@SET SOAPUI_BIN_DIR=C:\Program Files\SmartBear\ReadyAPI-1.8.5\bin @SET SOAPUI_LIBRARY_LOCATION=G:\Folder\SoapUI\CISmokeTestFiles\

::Copy the appropriate settings.xml file in to the project folder. ::xcopy /s/y "%SETTINGS_LOCATION%\settings-%ENVIRONMENT%.xml" "%PROJECT_LOCATION%\settings.xml"

:: Send Email to confirm Start of the run with Test Result location. "%SOAPUI_LIBRARY_LOCATION%SendMail.vbs" Started %TEST_NAME% %TEST_RESULTS_DIR% %ENVIRONMENT% %BuildNumber% %BuildRequestor% [email protected]

:: execute the tests

cd %SOAPUI_BIN_DIR% call testrunner.bat -j -f%TEST_RESULTS_DIR% -Dtest.history.disabled=true -R"TestSuite Report" -E%ENVIRONMENT% -sSmokeTests "%PROJECT_LOCATION%"

echo "Test is Finished"

:: Send Email to confirm completion of the run with Test Result location. "%SOAPUI_LIBRARY_LOCATION%SendMail.vbs" Completed %TEST_NAME% %TEST_RESULTS_DIR% %ENVIRONMENT% %BuildNumber% %BuildRequestor% %ReqMailId%

::clean up results older than 14 days PushD "\10.232.158.91\share\Cayman\CaymanResults\SoapUIResults" &&(forfiles -s -m . -d -14 -c "cmd /c del /q @path" ) & PopD


::CopyTestFromNas.bat

set folder="G:\SoapUIProjectFilesFromTheNas\ProjectFolder" cd /d %folder% for /F "delims=" %%i in ('dir /b') do (rmdir "%%i" /s/q || del "%%i" /s/q) xcopy \path\SoapUI\Cayman-EDMR-Project G:\SoapUIProjectFilesFromTheNas\Cayman-EDMR-Project /E /y ::xcopy \path\SoapUI\Cayman-EDMR-Project-SettingsFiles D:\SoapUIProjectFilesFromTheNas\Cayman-EDMR-Project-SettingsFiles /E /y ::xcopy \path\SoapUI\EngineInfrastructure\Library D:\SoapUIProjectFilesFromTheNas\Library /E /y