Forum Discussion

krenevla's avatar
krenevla
Contributor
11 years ago

Specify output folder for log via test runner

Hi,

I have recently encountered this problem.

I would like SOAPUI command line runner to put the report into specific folder, as I need to run several instances of the command line runner at a time so putting report in a standard place is not an option as multiple processes would be writing into same files.

I am using this command:

SETTINGS_FILE = './soapui-settings.xml'
PROJECT_FILE = './WMS.xml'
SUITE_NAME = '[F] WEB SERVICE TESTS'

runner = com.eviware.soapui.tools.SoapUITestCaseRunner.new
runner.runFromCommandLine([PROJECT_FILE, "-s#{SUITE_NAME}", "-f#{'output_directory}", "-t#{SETTINGS_FILE}", '-M', '-r'])


This executes the test suite specified after –s and puts the report into folder specified after –f. So far so good.

But when the whole suite execution finishes, the report file (xml) contains only one test case, not the whole test suite (this specific test suite contains 5 test cases).

How can I make the command line runner store all test cases reports?

3 Replies

  • Hi,

    Custom coding is outside the scope of support.

    Are all the test cases being ran in the testsuite? Since you are switching to different output directories are the directories containing a different test case for each output directory or the same test case in each output directory?


    Regards,
    Marcus
    SmartBear Support
  • Hi,
    All test cases from the test suite have been executed but only last executed test case has been reported in the xml. The previous four test cases are not part of the xml report even though they have been executed.

    It seems like the xml is overwritten with each executed test case.

    What I try to do is to have results of execution of all test cases of the test suite in one xml in a directory specified by the –f switch.

    br, VLadan
  • Hi,

    I have reproduced this behavior with <SoapUI Pro install>\bin\testrunner.bat with the parameters you are using. You should use the "Data Export" to export the results of all the test cases being ran in the testsuite in xml format instead of the xml run log. That will create a testSuiteResults.xml file that will contain the results of all the test cases ran in one file. To create a data export in xml format for the testsuite use -R"Data Export" and -FXML i.e testrunner "C:\SoapUI\SOAPUI Projects\My-REST-APIs-soapui-project.xml" -s"TestSuite 1" -f C:\temp\data_export -R"Data Export" -FXML.


    Regards,
    Marcus
    SmartBear Support