Forum Discussion

Prabaharan's avatar
Prabaharan
Contributor
6 years ago

How to get the test suite status in soapui using groovy script?

Hi,

 

Iam writing a script to capture project execution status in which i need to capture test suite run status as well. I'm not able to get the test suite status. Appreciate if anyone can help me in capturing the test suite status.

  • Cekay's avatar
    Cekay
    6 years ago

    Huhu

     

    You can use the event: TestSuiteRunListener.afterRun

    log.info "Status test suite " + testRunner.testSuite.name + " " + testRunner.status

     

    I use events for example to send my results to testrail. So you should be able to do whatever you need with these events.

     

    A test suite teardown script should be possible too. You should be able to use runner.status

     

    Cheers, Sabine

  • richie's avatar
    richie
    Community Hero
    Hey Prabaharan,

    I have a project level teardown script that Radford scripted that may help, although it provides testcase, project and testsuite stats.

    Im driving at moment but once im back home, i'll post the script

    Ta,

    Rich
    • Prabaharan's avatar
      Prabaharan
      Contributor

      Hey richie ,

       

      Thanks for the note. But I need a groovy code to get the test suite status.

      • Cekay's avatar
        Cekay
        Contributor

        Huhu

         

        You can use the event: TestSuiteRunListener.afterRun

        log.info "Status test suite " + testRunner.testSuite.name + " " + testRunner.status

         

        I use events for example to send my results to testrail. So you should be able to do whatever you need with these events.

         

        A test suite teardown script should be possible too. You should be able to use runner.status

         

        Cheers, Sabine