cancel
Showing results for 
Search instead for 
Did you mean: 

Get all test step result of a test case

Highlighted
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

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


Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.
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

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


Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.
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

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

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
New Here?
Join us and watch the welcome video:
6 / 7 API Testing Mistakes Video
Top Kudoed Authors