Forum Discussion

mrdwprice's avatar
mrdwprice
Contributor
5 years ago

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
    }
    
  • 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
      }