Forum Discussion

archana1's avatar
archana1
Occasional Contributor
4 years ago
Solved

How to run SoapUI project(wsdl) from eclipse

Following code invokes project and run it. But i am getting error when it executes groovy.test step at line -

def responseAsXml = context.expand( '${AIR Search (BEAPI)#ResponseAsXml#declare namespace ns1=\'http://iapi.tbotechnology.in/BookingEngineServices/BEAirService/BapiAirServiceImpl.svc/rest/search/\'; //ns1:Response[1]/ns1:Response[1]/ns1:Results[1]}' )

 

Eclipse code:

 

WsdlProject project=new WsdlProject("E:\\IAPI\\Automation\\BookingEngineAir-soapui-project.xml");
//Grab the Test suite in the project
WsdlTestSuite testsuite=project.getTestSuiteByName("TestSuite");

//Grab the testcases present in test suite
//for(int i=0;i<testsuite.getTestCaseCount();i++)
//{
// WsdlTestCase testCase =testsuite.getTestCaseAt(i);
WsdlTestCase testCase =testsuite.getTestCaseByName("LCC Domestic Oneway Direct Flight");


WsdlTestCaseRunner runner=testCase.run(new PropertiesMap(), false);

Assert.assertEquals(Status.FINISHED, runner.getStatus());

  • nmrao's avatar
    nmrao
    4 years ago

    Does not matter what tool you use, a license is required if you are trying to run a project that is build in Pro tool with pro features.

  • archana1 :

     

    If you have used SoapUI Pro features in your Automation project, than it doesn't matter from where you run it will ask for license.

8 Replies

    • archana1's avatar
      archana1
      Occasional Contributor

      yes it works fine in the tool. The error that i am getting groovy step is "Content is not allowed in prolog" . But everthing works fine in soapui tool

      • nmrao's avatar
        nmrao
        Champion Level 3
        What is the reason for running the project from the eclipse while it works from the tool?