Forum Discussion

alibaba82's avatar
alibaba82
Super Contributor
17 years ago

how to execute testsuite from testsuite teardown

In my testsuite teardown script, I am calling some external function. In this external function, I check some condition. If this condition is 'true', i would like to re-run the testsuite.

how can I re-run the testsuite via groovy.

Thanks

Alia

3 Replies

  • omatzura's avatar
    omatzura
    Super Contributor
    Hi Ali,

    actually, you can't... hm... please add a feature request and I'll see how we can fix this..

    regards!

    /Ole
    eviware.com
  • alibaba82's avatar
    alibaba82
    Super Contributor
    since this is not possible at the moment, is there a way I can do something like
    1. store all test cases from a specified test suite into a list.
    2. execute all the test in the list.

    some code to accomplish this would be nice.

    Ali
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi,

    hm.. you could try something like

    def props = new com.eviware.soapui.support.types.StringToObjectMap()

    for( tc in testSuite.testCaseList )
    {
      if( !tc.disabled )
      {
          log.info( "Running testcase: $tc.name" )
          tc.run( props, false )
      }
    }


    regards,

    /Ole
    eviware.com