Conditional GoTo: how does it work?
Hello,
I was looking into the Conditional GoTo step but it doesn't seem to work for me.
I set up a virtual service to get a response.
First request is a HappyFlow that recieves this:
{
   "userId" : "3fa85Ki45Eue74562BaFc2c963Zw6afa6",
   "personNumber" : 123456789858,
   "firstName" : "Maria",
   "lastName" : "Peeters",
   "emailAddress" : "maria.peeters@mailbox.be",
   "creationDate" : "2020-01-15T00:00:00.000Z",
   "isPreferredNotary" : true,
   "vaultId" : "5Ez9PKi---------w6afa6"
}
I've put a GoTo after this request that states that if the value of the personNumber is present and correct, it will go to the next REST Request.
The next request is a request that should check if the personnumber is not there. This step works.
When I test the GoTo step I'm getting this message:
Although the number is present! (teststep is green)
I guess the notation is wrong?
How can I get the testcase to stop if the condition is not met? Thus, not executing the "bad request"?
If I would be able to do so, will the testcase run be red then?
Thanks in advance,
AAB
- Have you referred any documentation which is confusing regarding goto? - Here is how it works: - User have to define what to do if condition is passed and otherwise. - In the below case, two conditions defined and two target steps are configured where to go when particular condition is satisfied. - Test executed twice - - first time found no_matching so again executed the request step - - second time, condition is evaluated to true, proceeded following step to Conditional Goto as you see in the below screen shot. - NOTE that for each condition, the target step is different based on what user like to do. - Hope this helps!