cancel
Showing results for 
Search instead for 
Did you mean: 

SOAPUI TestRunner test case count and runner (teardown) test case count mismatch

Highlighted
Occasional Contributor

SOAPUI TestRunner test case count and runner (teardown) test case count mismatch

Hi,

 

Structure and flow of Project

  1.   TestSuite
    1. Test Case 1
      1. Test Step (REST request)
  2.          Test Case 2
    1.         Test Step (REST Request) 
    2.         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 
    3. Test Case 3
      1. 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

7 REPLIES 7
Highlighted
Occasional Contributor

Re: SOAPUI TestRunner test case count and runner (teardown) test case count mismatch

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 

 

 

Highlighted
Community Leader

Re: SOAPUI TestRunner test case count and runner (teardown) test case count mismatch

@kmv :

 

Write your code in below teardown script

Project -> TestSuites -> teardown script

 

HimanshuTayal_0-1601444225007.png

 

 

 

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
Highlighted
Occasional Contributor

Re: SOAPUI TestRunner test case count and runner (teardown) test case count mismatch

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 

Highlighted
Community Leader

Re: SOAPUI TestRunner test case count and runner (teardown) test case count mismatch

@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
Highlighted
Occasional Contributor

Re: SOAPUI TestRunner test case count and runner (teardown) test case count mismatch

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

Highlighted
Community Leader

Re: SOAPUI TestRunner test case count and runner (teardown) test case count mismatch

@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
Highlighted
Occasional Contributor

Re: SOAPUI TestRunner test case count and runner (teardown) test case count mismatch

Thanks, Is there anyway using any scripts in teardown, to get total run count including test cases which is called by groovy script

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors