Forum Discussion

pteichner's avatar
Occasional Contributor
12 years ago

Runnin project with WsdlProjectPro


I only have a quick question

def currentProject = new com.eviware.soapui.impl.wsdl.WsdlProjectPro("$projectFullLocation") 

// some logging stuff"GetName: " + currentProject.getName())"GetID: " + currentProject.getId())

for the last line I get an error:
groovy.lang.MissingMethodException: No signature of method: is applicable for argument types: ()

I've been reading the API guide and the run method is meant to be inherited from WsdlProject.
What am I doing wrong.

Thanks a lot,

3 Replies

  • pteichner's avatar
    Occasional Contributor
    I've been looking around and found some ideas and found the one below, but the problem is that this is using the WsdlProject rather than the WsdlProjectPro.

    Still loooking for how to Run my project. It returns the testSuites and the testCases, but I need to construct a runable object if I'm not incorrect.

    Again Thanks

    WsdlProject project = new WsdlProject(projectFile);
    for (TestSuite testSuite : project.getTestSuiteList()) {

    System.out.println("TestSuiteProject size......" + project.getTestSuiteList().size());
    System.out.println("TestSuiteProject......" + testSuite.getName());

    for (TestCase testCase : testSuite.getTestCaseList()) {

    System.out.println("TestCases........." + testCase.getName());
    testCase.setPropertyValue("UserName", userName);
    testCase.setPropertyValue("Password", passWord);

    StringToObjectMap properties = new StringToObjectMap();
    properties.put("username", userName);
    properties.put("password", passWord);
    properties.put("localhost", localHost);
    properties.put("HttpDefaultPort", port);
    List<TestStep> testSteps = testCase.getTestStepList();

    WsdlTestCaseRunner wsdlTestCaseRunner = new WsdlTestCaseRunner((WsdlTestCase) testCase, properties);
    WsdlTestRunContext wsdlTestRunContext = wsdlTestCaseRunner.createContext(properties);;
  • pteichner's avatar
    Occasional Contributor
    I've found the solution:

    def currentProject = new com.eviware.soapui.impl.wsdl.WsdlProjectPro("$projectFullLocation") 

    def projectRunner=new com.eviware.soapui.SoapUIProTestCaseRunner('ProjectRunner')
    def status = projectRunner.runProject(currentProject)

    Basically createa WsdlProjectPro object with the Project location, so it will have all it's parameters. Also create a runner object (SoapUIProTestCaseRunner) with a name. That object has a procedure runProject. This can also be done on the test suite or the test case level if you use WsdlProjectPro to read through the suites/testcases.