Forum Discussion

Jacob_Hassing's avatar
Jacob_Hassing
Contributor
15 years ago

TestRunner vs. SoapUITestCaseRunner

i execute SOAPUI testCases from JUnit. there are more than 1 way to do this using the SOAPUI API.
What i lack is description of the API.
e.g. TestRunner & SoapUITestCaseRunner, when to use what ? 

the SoapUITestCaseRunner have methods initProject, exportJUnitReports. is it nessecary to call initProject() ? or is it sufficient to set setProjectFile(). exportJUnitReports shuold it be called after ot before run?
there is no information to help in the API documentation.
when i move around in the API, i there is a lot of guessing and trial and error involved.
am i missing some documentation ?
is there a better API description somewhere i have missed?
sample code suing the API ??

6 Replies

  • kamahade's avatar
    kamahade
    Regular Contributor
    How do I try using SoapUITestCaseRunner in groovy ?

    I read this as well http://www.soapui.org/Test-Automation/i ... junit.html

    What jar files, I should add in classpath ? I tried soapui-pro-3.5.1.jar file , SOAPUIPRO lib folder

    still am getting

    groovy> import com.eviware.soapui.tools;
    groovy> SoapUITestCaseRunner runner = new SoapUITestCaseRunner();
    groovy> runner.setProjectFile( "D:\\soapui-release-B\\try.xml" );
    groovy> runner.run();

    3 compilation errors:

    unable to resolve class com.eviware.soapui.tools
    at line: 1, column: 1

    unable to resolve class SoapUITestCaseRunner
    at line: 3, column: 22

    unable to resolve class SoapUITestCaseRunner
    at line: 3, column: 31
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hello,

    The particular class you are looking for (SoapUITestCaseRunner) is in the soapui-3.5.1.jar file (non-pro), but to be able to run the actual tests, it's likely that you will need more of the jars in the lib folder. I would recommend adding all of them to the classpath.

    Regards,
    Dain
    eviware.com
  • kamahade's avatar
    kamahade
    Regular Contributor
    eviware support wrote:
    Hello,

    The particular class you are looking for (SoapUITestCaseRunner) is in the soapui-3.5.1.jar file (non-pro), but to be able to run the actual tests, it's likely that you will need more of the jars in the lib folder. I would recommend adding all of them to the classpath.

    Regards,
    Dain
    eviware.com


    what you mean by
    all of them
    ?
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hello,

    What I mean is, the main soapui-pro jar file in bin has a bunch of dependencies, all located in the lib folder. You need to add all the jar files in lib to the classpath, as well as the soapui-pro jar file in the bin folder.

    Regards,
    Dain
    eviware.com