cancel
Showing results for 
Search instead for 
Did you mean: 

Get all test step result of a test case

Dear Community, API Masterminds week 4 has started!

Participate in the exciting online event by posting questions or replies and win! During the entire March, we decide top contributors each week and reward them with great gifts . Congratulate the winners of Week 3 here.
Week 4 task: Ask more questions, bring interesting topics and reply to existing ones in the ReadyAPI Community
Topics to participate in:
See All
Week 4 Leaders:
Members with the biggest number of posts
HimanshuTayal 17 posts
nmrao 15 posts
richie 2 posts
pizzaTime 1 posts
PratikshaMehete 1 posts
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
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 the 2020 API Masterminds event in the ReadyAPI Community to demonstrate your excellent expertise, help people and win prizes! Start participating 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 the 2020 API Masterminds event in the ReadyAPI Community to demonstrate your excellent expertise, help people and win prizes! Start participating 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 the 2020 API Masterminds event in the ReadyAPI Community to demonstrate your excellent expertise, help people and win prizes! Start participating today!
New Here?
Join us and watch the welcome video:
Join 2020 API Masterminds
We invite all lovers of API testing to participate in the API Masterminds event. Ask questions or help others by giving solutions and get rewarded.
>> Participate Today
Get Your Free Ticket
SBC2020
Top Kudoed Authors