Forum Discussion

aadithps's avatar
aadithps
Occasional Contributor
14 years ago

Total number of test steps

HI
Can someone help me with a groovy code to find the total number of projects, test suite in each project, test cases and test steps under each of the test suits in soapui.

1 Reply

  • I don't know about counting projects, but put this code into the Load Script of a project:

    log.info 'Number of Test Suites: ' + project.getTestSuiteCount()

    tc_count=0; ts_count=0;
    project.testSuiteList.each {
    tc_count += it.getTestCaseCount()
    it.testCaseList.each {
    ts_count += it.getTestStepCount()
    }
    }
    log.info 'Number of Test Cases: ' + tc_count
    log.info 'Number of Test Steps: ' + ts_count


    You'll get output like this:

    Thu Feb 24 23:59:21 EST 2011:INFO:Number of Test Suites: 2
    Thu Feb 24 23:59:21 EST 2011:INFO:Number of Test Cases: 3
    Thu Feb 24 23:59:21 EST 2011:INFO:Number of Test Steps: 2