Forum Discussion

mrdwprice's avatar
mrdwprice
Contributor
4 years ago
Solved

Groovy script to list all TestSuites

Please could someone help me with a Groovy script that can list all TestSuite names contained within a Project.

 

Thanks!

 

 

  • mrdwprice :

     

    You can take help from below code:

     

    testSuiteList = testRunner.testCase.testSuite.project.getTestSuiteList()
    testSuiteList.each{
    	log.info it.name
    }
    

2 Replies

  • mrdwprice :

     

    You can take help from below code:

     

    testSuiteList = testRunner.testCase.testSuite.project.getTestSuiteList()
    testSuiteList.each{
    	log.info it.name
    }
    
    • mrdwprice's avatar
      mrdwprice
      Contributor

      Thanks very much!

       

      I used this in the end within SetUp script

       

      def testSuiteList = runner.project.getTestSuiteList()
      testSuiteList.each{
      log.info it.name
      }