SOAPUI TestRunner test case count and runner (teardown) test case count mismatch
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
SOAPUI TestRunner test case count and runner (teardown) test case count mismatch
Hi,
Structure and flow of Project
- TestSuite
- Test Case 1
- Test Step (REST request)
- Test Case 1
- Test Case 2
- Test Step (REST Request)
- Test Step (Groovy script) (this script will call and execute Test Case 3 based on condition, test case 3 will be disabled state, if condition pass it will enable test case and execute and again it will be disabled
- Test Case 3
- Test Step (REST Request)
Problem Statement : If we execute above TestSuite via 'SOAPUI-TestRunner', number of test case executed count is correct, in our sample case : Total Test case count : 4 (which is correct, since test case 3 got executed twice via groovy script (Test Case 1 + Test case 2 + Test case 3 + Test Case 3),
but if we try to get total Test case executed count from teardown its showing as 'Test case count : 2
Teardown script not considering test cases which got executed via groovy script
Attached snapshots for reference
Any help or support would be great, thanks
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Through teardown scripts if we try to get total test case execution count , we are getting wrong number, through 'TestRunner' its working as expected,
This issue become blocker while implementing 'Extent report'
Have attached sample project, any help here would be great
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@kmv :
Write your code in below teardown script
Project -> TestSuites -> teardown script
Refer below link for more help 🙂
https://www.linkedin.com/pulse/integration-extent-report-soapui-akshay-sharma
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
Thanks for your reply, i am able to create extent report, but my issue is test case count
when i try to run via 'TestRunner' (Right click on testsuite -> 'Launch TestRunner') : Test execution count : 4 (SOAPUI-TestRunner-Count.PNG) - This is correct
when i tried to get total test execution count through 'teardown' script, i am getting count as 2 (SOAPUI-TestRunner-Count.PNG)
So in the extent report i am getting two test cases (test case which got executed via groovy script not getting captured in teardown script)
Have attached project (xml) for reference
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@kmv : Yes it won't come under extent as it is being executed by some groovy not via testRunner. If you want that test case to be a part of Extent Report than you need to execute it via testRunner.
The images/project file which you have attached are not getting opened. Please attach them again or DM me.
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
Good day!! , Have attached project and snapshot details for reference
so using tear down scripts can't get total test case execution count (including test cases triggered by groovy script)
main challenge is total testcase execution count via testrunner and teardown script (runner) are different
thanks for your time and support
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@kmv : yes in your scenario Test Case count will be different, because you are triggering Test Case from groovy script.
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
Thanks, Is there anyway using any scripts in teardown, to get total run count including test cases which is called by groovy script
