cancel
Showing results for 
Search instead for 
Did you mean: 

Create dependent tests based on a test Pass/Fail.

Regular Visitor

Create dependent tests based on a test Pass/Fail.

Hi All, 
Am newbie in ReadyAPI and facing some issues.

Actually I want to do something like this -> "TestCase A" should only run if "Test Case B" runs perfectly in same or different Test Suite.

In my scenario, I have multiple test suites and inside respective test suites I have multiple test cases. 

Thanks,
Jagjit Verma

4 REPLIES 4
Highlighted
Community Hero

General advice is that each test should be testable independent.

If there some dependency, create a test make it disable(this is just reusable test and never get executed directly, only called from other tests as step) and just call this test as using Run test case step in whichever testcase as test step.

 

Please refer documentation

https://support.smartbear.com/readyapi/docs/soapui/steps/run-test-case.html



Regards,
Rao.
Highlighted
Community Leader

@jituvrma007  :  This should be a practise that you should follow not to Call Test Case of other Test Suite from current Test Case because it will create a ambiguity or difficulty in finding where to update, what you can do instead is:

 

1. Create 1 Test Suite which contains all Dependent Test Cases,

2. Call that particular Test Case.

 

Now second part is How to call,

 

You can use groovy script to call particular Test Case from existing Test Case refer attached project for reference.

 


Click "Accept as Solution" if my answer has helped,
Remember to give "Kudos" 🙂 ↓↓↓↓↓



Thanks and Regards,
Himanshu Tayal
Highlighted
Community Manager

Thank you so much Rao and Himanshu! Great advice.

 

Hi @jituvrma007! Did the advice solve your question? Please mark the answer you found helpful as a solution.

 


Sonya Mihaljova
Community and Education Specialist

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today
Highlighted
Community Manager

@jituvrma007 Here's what you should try - create a script that checks the status of the current case. If it is not 'Failed', the script needs to run the needed TestCase.


Sonya Mihaljova
Community and Education Specialist

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today
New Here?
Join us and watch the welcome video:
Announcements
TechCorner Leaderboard
Want a fun and easy way to learn ReadyAPI and show off your skills? Try solving weekly TechCorner challenges and get into the Leaderboard!


Challenge Status

Get a full Raw JMS request

Participate!

Compare an expected JSON value and actual response in Events

Participate!

Fetch value/data from JSON response using Groovy Script

See replies!

Get data from Petstore and add it to Excel sheets

Participate!
Top Kudoed Authors