Forum Discussion

pricedgp's avatar
pricedgp
Contributor
2 years ago
Solved

Classes/Libraries for context, testRunner, log variables to import in IntelliJ

I often call Groovy classes from within ReadyAPI, and I pass in the context, testRunner, and log variables. This works fine when running from ReadyAPI. However, I'd like to be able to independently unit-test my classes within IntelliJ, so I'd like to know which ReadyAPI class(es)/libraries I would need to import in my project. Is there any documentation on how to do that?

 

In other words, I have a base class that defines the context, log, and testRunner variables in my external project, but thanks to Groovy, I don't need to define their types. I'm just looking for that information so that I can "test the tests" from with IntelliJ. I've looked through the API docs but there's quite a lot of classes there!

 

Thanks

3 Replies

  • Based on my testing, it seems that the following is what I was looking for, although still need to look into the difference between the Wsdl vs WsdlPro versions of these. 

     

    import com.eviware.soapui.impl.wsdl.WsdlTestCasePro
    import com.eviware.soapui.impl.wsdl.WsdlTestSuitePro
    import com.eviware.soapui.impl.wsdl.testcase.WsdlTestRunContext
    import com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner
    import com.eviware.soapui.support.types.StringToStringMap
    import com.eviware.soapui.impl.wsdl.WsdlProjectPro

     

    WsdlTestRunContext context
    WsdlTestSuitePro testSuite
    WsdlTestCasePro testCase
    WsdlTestCaseRunner testRunner
    StringToStringMap result
    WsdlProjectPro project

     

    (Didn't include log because I'm on 3.10.1, which uses a version of log4j with security vulnerabilities).

     

    All I did was imported all of the ready-api-*.jar files into the Global Libraries in IntelliJ. 

     

    Haven't done any actual testing with them but at least it's a start. Nothing broke, anyway.