cancel
Showing results for 
Search instead for 
Did you mean: 

Failing test cases

SOLVED
Highlighted
Occasional Contributor

Failing test cases

Hi!
I'm working with SOAPUI NG PRO and ran into the following issue:
In a test case I have many test steps. I would like to create a "hierarchy" between them. So for example:
testStep4 - checks if a field exists in the response

testStep4.1 - counts if the field is only present once

testStep4.2 - checks the value of the field

testStep5 - next main test step

 

If testStep4 fails I would want to:

1. Fail 4.1 and 4.2 without executing them

2. Continue from testStep5

 

branchingpath.png


I have a groovyscript (branching path1) which decides what to do. It's after testStep4. I can do the skipping part by: testRunner.gotoStepByName("testStep5") but I couldn't find a solution for setting testStep4.1 and 4.2 to failed. I googled it but could not find a solution.

How would you guys take care of this? Or if you have any idea how to work around this, please tell me!
Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Contributor

Re: Failing test cases

Try using "Conditional Goto" testStep make a condition for each posibility using xpath expression. I think that's a better way.

View solution in original post

5 REPLIES 5
Highlighted
Community Hero

Re: Failing test cases

May be you forgot one thing, if testStep4 is failed, then the next groovy script is not even executed, is not it so?


Regards,
Rao.
Highlighted
Occasional Contributor

Re: Failing test cases

The script runs if testStep4 fails. This is how I know the jump works correctly.

Highlighted
Occasional Contributor

Re: Failing test cases

Any other suggestion? Or can you point me to a direction where I might find a solution to this problem?

Highlighted
Community Hero

Re: Failing test cases

Place the groovy script first.
Then run the step4 from groovy.
Evaluate the conditions as you needed.


Regards,
Rao.
Highlighted
Contributor

Re: Failing test cases

Try using "Conditional Goto" testStep make a condition for each posibility using xpath expression. I think that's a better way.

View solution in original post

New Here?
Join us and watch the welcome video:
Top Kudoed Authors