这是Windows批处理文件,可
date time用于设置要捕获结果的动态目录,而不会覆盖以前的结果。
当然,您也可以从Jeninks调用批处理文件。
将以下脚本复制到一个文件中,
wrapper_testrunner.cmd然后将该文件放置在testrunner.bat所在的位置。因为它是所谓的soapui的
testrunner.bat文件,即将该批处理文件放在
SOAPUI_HOME/bin目录下。
@echo offREM Provide the base directory where the results needs to be savedREM A new dynamic directory is created using date time under this directoryset RESULTS_base_DIR=C:TempTEST_ResultsREM Set the soapui project to run set PROJECT=C:TempProjecthellow-world-soapui-project.xmlREM Set the environment nameset ENVIRONMENT_NAME="Default environment"REM set the dynamic directory name using date timeset mdate=%date:~10%%date:~4,2%%date:~7,2%%time:~0,2%%time:~3,2%REM create dynamic directory for resultsmkdir %RESULTS_base_DIR%%mdate%REM run the project using testrunnercall testrunner.bat -f %RESULTS_base_DIR%%mdate% -E %ENVIRONMENT_NAME% -raj %PROJECT%
如果您需要更改变量的任何值,请随时进行更改,我只放置了占位符。
话虽如此,您还添加了需要传递到
testrunner.bat文件的所有其他选项。
希望这会有所帮助。



