cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to use Test Suite property

Highlighted
New Contributor

Unable to use Test Suite property

We use Soap Ui for API testing. At many places we use Test Suite property to store values which needs to be passed between two tests. This works fine from the tool. However we also call the rest APIs from selenium scripts which we have developed using eclipse. Here it seems the value of Test Suite property are not being retained and scripts are failing due this reason. Kindly assist!
6 REPLIES 6
Highlighted
Community Leader

Re: Unable to use Test Suite property

@durgapatro1 :

 

What error are you getting, could you please share soapUI error log so that it will be easier to look into the issue. 🙂

 


Click "Accept as Solution" if my answer has helped,
Remember to give "Kudos" 🙂 ↓↓↓↓↓



Thanks and Regards,
Himanshu Tayal
Highlighted
New Contributor

Re: Unable to use Test Suite property

Thanks for your reply Himanshu. Basically we are storing the transaction ID in test suite property which we capture from the response of first test. This will be used in the second test. This works fine when I run the tests from Soap Ui tool. But when I call them from eclipse, the second test fails with error transaction ID can't be blank. The issue seems to be, first test does store the transaction ID in test suite property but the value is not being retained. Once the first test gets executed, the value in test suite property also gets lost.
Highlighted
Community Leader

Re: Unable to use Test Suite property

@durgapatro1 :

 

have you checked that your 1st Test Case got passed when you are running through Selenium, this might be the reason transactionID not getting stored in your TestSuite Level Custom Property. Check the response of your 1st Test Case whether it is getting passed or not.

 

By which way you are executing your soapui project from selenium?


Click "Accept as Solution" if my answer has helped,
Remember to give "Kudos" 🙂 ↓↓↓↓↓



Thanks and Regards,
Himanshu Tayal
Highlighted
New Contributor

Re: Unable to use Test Suite property

Yes First test case gets passed. We are using the soap ui binaries and other jars which are present inside class folder in the soap ui installation folder. We add them all to our project in eclipse and run the service from eclipse.
Highlighted
Community Hero

Re: Unable to use Test Suite property

It is difficult unless there are steps to reproduce for others.


Regards,
Rao.
Highlighted
New Contributor

Re: Unable to use Test Suite property

Here is the 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);
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors