Ask a Question

Get all test step result of a test case

SoapUser2012
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
SmartBear_Suppo
SmartBear Alumni (Retired)

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

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

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
SmartBear_Suppo
SmartBear Alumni (Retired)

Hi!

sure;

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

/Ole
SmartBear Software

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

@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

TanyaYatskovska
SmartBear Alumni (Retired)

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 Yatskovskaya
SmartBear Community and Education Manager



cancel
Showing results for 
Search instead for 
Did you mean: