date time
これは、以前の結果を上書きせずに結果を取得するために使用する動的ディレクトリを設定できる Windows バッチ ファイルです。
もちろん、Jeninks からバッチ ファイルを呼び出すこともできます。
以下のスクリプトをファイルにコピーし、wrapper_testrunner.cmd
このファイルを testrunner.bat のある場所に配置します。それはsoapuiのtestrunner.bat
ファイルを呼び出すため、つまり、このバッチファイルをSOAPUI_HOME/bin
ディレクトリの下に置きます。
@echo off
REM Provide the base directory where the results needs to be saved
REM A new dynamic directory is created using date time under this directory
set RESULTS_BASE_DIR=C:\Temp\TEST_Results
REM Set the soapui project to run
set PROJECT=C:\Temp\Project\hellow-world-soapui-project.xml
REM Set the environment name
set ENVIRONMENT_NAME="Default environment"
REM set the dynamic directory name using date time
set mdate=%date:~10%%date:~4,2%%date:~7,2%%time:~0,2%%time:~3,2%
REM create dynamic directory for results
mkdir %RESULTS_BASE_DIR%\%mdate%
REM run the project using testrunner
call testrunner.bat -f %RESULTS_BASE_DIR%\%mdate% -E %ENVIRONMENT_NAME% -raj %PROJECT%
変数の値を変更する必要がある場合は、自由に変更してください。プレースホルダーのみを配置しました。
とは言っても、testrunner.bat
ファイルに渡す必要がある追加のオプションも追加します。
これが役に立てば幸いです。