cancel
Showing results for 
Search instead for 
Did you mean: 

Create dependent tests based on a test Pass/Fail.

Highlighted
Frequent 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

Re: Create dependent tests based on a test Pass/Fail.

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

Re: Create dependent tests based on a test Pass/Fail.

@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, and remember to give "kudos" Smiley Happy

Thanks and Regards,
Himanshu Tayal
Highlighted
Community Manager

Re: Create dependent tests based on a test Pass/Fail.

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

 Join the virtual SmartBear Connect user conference on April 27-28! Get your free virtual ticket today!
Highlighted
Community Manager

Re: Create dependent tests based on a test Pass/Fail.

@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

 Join the virtual SmartBear Connect user conference on April 27-28! Get your free virtual ticket today!