Forum Discussion

dspasojevic's avatar
dspasojevic
Occasional Contributor
9 years ago

SoapUI project with Pro features run programmatically from Java code

Hi,

 

I am trying to execute a specific test case within a Ready API / SoapUI NG Project. The test case contains Pro-only test steps.

 

When the step is executed via the API, it returns an UNKNOWN result, and I see that the type of the step is com.eviware.soapui.impl.wsdl.teststeps.registry.ProPlaceholderStepFactory$WsdlProPlaceholderTestStep

 

I am starting the test suite with:

 

        final WsdlProjectPro project =
                new WsdlProjectPro("project.xml");
        
        final TestSuite testSuite = project.getTestSuiteByName(this.suiteName);

        final TestCase testCase = testSuite.getTestCaseByName(this.caseName);

        testCase.getTestStepList().forEach(step -> System.out.println(step + " -> " + step.getName()));
       
        final TestRunner runner = testCase.run(new PropertiesMap(), false);

I have a SoapUI licence that I have transferred to ReadyAPI. The soapui.dat and soapui.key files are present in USER_HOME/.soapui

 

I assume that the placeholder step is created because the regular SoapUICore is being created without the extra factories registered by SoapUIProCore...

 

What do I need to do to enable to pro features when running through the API?

 

Thanks,

-Dan

 

 

3 Replies

    • dspasojevic's avatar
      dspasojevic
      Occasional Contributor

      For future readers, using the WsdlProjectPro in this manner is not supported - it does not load the license file. Recommendation is to use the SoapUIProTestCaseRunner class instead.

      • groovyguy's avatar
        groovyguy
        Community Hero

        Thanks for the update! I was curious what the solution would be and may be able to use this eventually.