开发者

conditional goto is not working in soap ui

开发者 https://www.devze.com 2023-04-07 13:52 出处:网络
I have created soap ui rest service test case with 4 steps. Addconsumer request. conditiongoto - if customer is premiere target 开发者_运维技巧step4

I have created soap ui rest service test case with 4 steps.

  1. Addconsumer request.
  2. conditiongoto - if customer is premiere target 开发者_运维技巧step4
  3. addpointrequest
  4. 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:

  1. Addconsumer request.
  2. conditiongoto - if customer is premiere target step4
  3. addpointrequest
  4. Groovy Script: testRunner.gotoStepByName("conditiongoto_end")
  5. gainpointrequest
  6. conditiongoto_end (empty Groovy Script step)

For more references please see Controlling flow tutorial

0

精彩评论

暂无评论...
验证码 换一张
取 消