Forum Discussion

kmv's avatar
Occasional Contributor
4 years ago

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



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

  • kmv's avatar
    Occasional Contributor

    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 



      • kmv's avatar
        Occasional Contributor

        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 

  • kmv's avatar
    Occasional Contributor

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