Forum Discussion

Nagarro_Softwar_1's avatar
12 years ago

Identifying all the reference of test cases in SOAP UI

Hi,

I am using 4.6.4 soap ui pro. In my project file there are multiple test suites which are calling same test cases due to which if any changes made in the test cases impacts the test suites. Is there a way to identify all the test suites which are using a test case so that i can run those test suites and find if those are failing due to my change.

Thanks.

1 Reply

  • Hi,

    Is there a way to identify all the test suites which are using a test case



    You can do that using the following Groovy script below, please add this script to a Groovy test step in the Project you are using. Replace testCaseName value with the name of your test case you would like to find.


    def testCaseName = "TestCase datagen"
    def proj = testRunner.testCase.testSuite.project
    def suites = proj.getTestSuiteList()

    for(suite in suites)
    {
    def testCases = suite.getTestCaseList();
    for (testCase in testCases)
    {
    if(testCase.getName() == testCaseName)
    {
    log.info testCaseName + " found in suite " + suite.getName()
    }
    }
    }



    Regards,
    Marcus
    SmartBear Support