Command Line

Consider this sample Rapise script (SampleTest.sstest, attached below):

function Test()
{
    Tester.Message(g_variable1);
    Tester.Message(g_variable2);
}

You should use the following command-line syntax to pass the values 'hello' and 'goodbye' and run the test (open CMD window in SampleTest folder, so the folder of the test is the current folder):

cscript "c:\Program Files (x86)\Inflectra\Rapise\Engine\SeSExecutor.js" "SampleTest.sstest" "-eval:g_testSetParams={g_variable1:'hello',g_variable2:'goodbye'};"

Execution Results

By default results of test execution are saved in the current folder of the CMD/Powershell process running the command line. 3 files are created:

  • last.trp - main execution report in XML format. This is what you typically see in Rapise after test execution is complete.
  • summary.log - this is TXT output log file. This is what you see on the Output tab in Rapise.
  • error.log - this is TXT error log file. You can find it on the Errors tab in Rapise.

If you wish to override the output file names pass lastReport, lastOutput and lastErrorLog to SeSExecutor.

cscript "c:\Program Files (x86)\Inflectra\Rapise\Engine\SeSExecutor.js" "SampleTest.sstest" "-eval:g_testSetParams={g_variable1:'hello',g_variable2:'goodbye'};" "-eval:lastReport='report.trp'" "-eval:lastOutput='output.log'" "-eval:lastErrorLog='error.log'"

Note: that when you override an output file name, current folder is the folder of the test. So in the example above files report.trp, output.log and error.log will be created inside SampleTest folder. 

If you want to add a date-time suffix to the report name format datetime variable and use it like this:

for /f %%a in ('powershell -Command "Get-Date -format yyyy-MM-dd_HH-mm-ss"') do set datetime=%%a
cscript "c:\Program Files (x86)\Inflectra\Rapise\Engine\SeSExecutor.js" "SampleTest.sstest" "-eval:lastReport='SampleTest_%datetime%.trp'" "-eval:g_testSetParams={g_variable1:'hello',g_variable2:'goodbye'};"