Unable to use Test Suite property
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2020
10:09 AM
08-01-2020
10:09 AM
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!
Labels:
- Labels:
-
Scripting
6 REPLIES 6
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2020
01:00 AM
08-02-2020
01:00 AM
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2020
02:46 AM
08-02-2020
02:46 AM
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.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2020
09:49 PM
08-03-2020
09:49 PM
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2020
11:03 AM
08-04-2020
11:03 AM
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.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2020
03:57 AM
08-05-2020
03:57 AM
It is difficult unless there are steps to reproduce for others.
Regards,
Rao.
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2020
12:12 PM
08-13-2020
12:12 PM
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);
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);
