cancel
Showing results for 
Search instead for 
Did you mean: 

Get all test step result of a test case

Occasional Contributor

Get all test step result of a test case

Hi

I have several soap request test steps in a test case . Each step (soap request)has many added assertions .I want to get the status of each soap request(test step)
as "finished " when all the assettions pass otherwise ,fail.

How do i accomplish this in groovy?
Right now ,i can get the results of all the test cases in a test suite in groovy ( test case shows failed is any assertions or steps fail) .This is to get the test step result. pls advise.


Thanks,
5 REPLIES 5
Highlighted

Re: Get all test step result of a test case

Hi,

you can enumerate the TestStepResult objects for a TestCase execution in its TearDown script with

for( r in testRunner.results )
log.info r.status

regards,

/Ole
SmartBear Software


 Join SmartBear Connect next April in Boston to meet with software development, API and testing experts from around the world! Get your ticket today!
Highlighted
Occasional Contributor

Re: Get all test step result of a test case

Thanks , it logs the status of each step.

Possible to get the "teststep name" as we get the test case name and for each status 'Failed'/'Passed' log the info.

Thanks
Highlighted

Re: Get all test step result of a test case

Hi!

sure;

for( r in testRunner.results )
log.info "TestStep [" + r.testStep.name + "] finished with status " + r.status

/Ole
SmartBear Software


 Join SmartBear Connect next April in Boston to meet with software development, API and testing experts from around the world! Get your ticket today!
Highlighted
Contributor

Re: Get all test step result of a test case

@SmartBear_Suppo  I have the same requirement, In my test case, I have more than 10 steps. But it only prints last 5 test case status.  Is there any specific test cases this is looping through?  Thanks

Highlighted
Community Manager

Re: Get all test step result of a test case

The last question is discussed here:

https://community.smartbear.com/t5/SoapUI-Pro/Run-a-test-case-only-if-specified-test-case-is-passed/...

 

Let's keep one question per discussion.

---------
Tanya Gorbunova
SmartBear Community Manager

 Join SmartBear Connect next April in Boston to meet with software development, API and testing experts from around the world! Get your ticket today!