cancel
Showing results for 
Search instead for 
Did you mean: 

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

SOLVED
Prabaharan
Contributor

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.

2 ACCEPTED SOLUTIONS

Accepted Solutions
nmrao
Community Hero

Re: Script to get the test suite status

@Prabharan,

Please take a look at the answer in the below thread, you get what you need.

https://stackoverflow.com/questions/41700437/creating-a-test-report-from-project-level-tear-down-scr...

Note that, only test step will have actual status, if all the test steps passes then a test case is considered pass and all the test cases are passed then a suite is passed.


Regards,
Rao.

View solution in original post

Cekay
Contributor

Re: Script to get the test suite status

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

View solution in original post

7 REPLIES 7
richie
Community Hero

Re: Script to get the test suite status

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
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
nmrao
Community Hero

Re: Script to get the test suite status

@Prabharan,

Please take a look at the answer in the below thread, you get what you need.

https://stackoverflow.com/questions/41700437/creating-a-test-report-from-project-level-tear-down-scr...

Note that, only test step will have actual status, if all the test steps passes then a test case is considered pass and all the test cases are passed then a suite is passed.


Regards,
Rao.

View solution in original post

Prabaharan
Contributor

Re: Script to get the test suite status

Hey @richie ,

 

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

Cekay
Contributor

Re: Script to get the test suite status

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

View solution in original post

Radford
Super Contributor

Re: Script to get the test suite status

sonya_m
Community Manager

Re: Script to get the test suite status

Great job everyone! 😊  

Hi @Prabaharan, were you able to solve your question with either of the suggestions? Please share your progress with us! 


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Prabaharan
Contributor

Re: Script to get the test suite status

Hi Team,

Thanks for the quick reply's. Appreciate your help.

 

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors