I have created soap ui rest service test case with 4 steps.
- Addconsumer request.
- conditiongoto - if customer is premiere target 开发者_运维技巧step4
- addpointrequest
- gainpointrequest
When the second step gets true, i am being navigated to step 4. but if it is false it is running step 3 and step 4.
How to restrict this? I need to execute step 3 only. step 4 is for premier consumer...
Regards, Chandra
Moving to step 3 means passing control flow to this step and all subsequent ones. You need to explicitly jump over your step 4 after jumping to step 3. For these purposes two Groovy steps can be created: (1)empty final step after the last conditional branch and (2) Groovy step with testRunner.gotoStepByName call that jumps to that final step after your addpointrequest is complete.
Here are modified test steps:
- Addconsumer request.
- conditiongoto - if customer is premiere target step4
- addpointrequest
- Groovy Script: testRunner.gotoStepByName("conditiongoto_end")
- gainpointrequest
- conditiongoto_end (empty Groovy Script step)
For more references please see Controlling flow tutorial
精彩评论