Forum Discussion

Kathryn_O_Malle's avatar
Kathryn_O_Malle
Contributor
16 years ago

Remote execution of SoapUI testcases via Junit with customised testrunner.bat

Hi there,

We're working on executing end-to-end system tests using the following:


  • IBM Rational Functional Tester(v8) [RFT] executing automated tests written in Java

  • SoapUI Pro 3.0.1 executing webservice testsuites / testcases
[Ref: post "Full Junit code executing SoapUI testsuites / testcases request"]

To enable us to run tests on both development and test servers we have created two versions of the testrunner.bat file.

  • Version 1: default testrunner.bat points at our development environment

  • Version 2: modified testrunner.bat file (called testrunner-test.bat) points at our test environment


http://www.soapui.org/userguide/commandline/functional.html, section JUnit Integration, talks about executing SoapUI testcases via Junit.

How do I please when executing SoapUI testcases via JUnit:

  • Tell it to use our customised testrunner.bat instead of the default one?

  • Pass it additional custom parameters using the -Denv command (which are added onto the end of command string used to execute SoapUI?

  • Pass additional command parameters, for instance "-r -a -j" ?


Many thanks
Adam
  • Hi Adam,

    Hope I can give some answers:

    When running via JUnit as described in the JUnit Integration section, you will have to set the corresponding command-line arguments using the different setXXX methods on the SoapUITestCaseRunner before you call the run method, for example the -r argument corresponds to the runner.setPrintReport( .. ) method (the javadoc for the SoapUITestCaseRunner is here: http://www.soapui.org/apidocs/com/eviwa ... unner.html)

    The -D arguments are set as system properties, so correspondingly you can call System.setProperty( name, value ) before running the tests.

    Hope this helps!

    regards,

    /Ole
    eviware.com