Dominique
16 years agoOccasional Contributor
Conditional loop
Good morning,
I have the following situation:
Inside my database there is an object containing an attribute.
I have created a SOAP request that can show the full object in a SOAP response.
I have another SOAP request that can launch a modify request for the attributes of this object in the database.
I would like to do the following:
1. Launch the request that modifies the attributes of the mentioned object and write the current date in the test log.
2. Start a loop, as follows:
2.a) Launch the "show object" SOAP request
2.b) Verify the value that needs to be modified
2.c) If the value is modified, exit the loop and write the current date in the test log. If not, goto 2.a)
=> It is the intention to know how long it takes (more or less) for the modification to be fully executed.
In order to do this, I have created the following:
1. A "Property" test step, containing one property in which I write the value of the attribute.
2. A "show object" SOAP request
3. A "Property Transfer" test step, transferring the result of the mentioned attribute to the "Property" test step.
4. A "Conditional goto" test step.
I have following questions:
- Verification: The "Conditional goto" test step contains one condition, having:
- following XPath expression:
//Fraud_counter:text() = 0
- following target step:
the "Property" test step.
=> this doesn't work: I always get this error message:
"Error checking condition: net.sf.saxon.trans.StaticError: XPath syntax error at char 24 on line 2 in { //Fraud_counter:text() = 0}: Prefix Fraud_counter has not been declared"
- Looping:
- I expect from a "Conditional goto" the possibility to go to one place in case of "true" and to another place in case of "false" (so I can return to the SOAP request in case of "false" and go to a last groovy script writing the date in the test log in case of "true")
=> how do I configure these places to go to?
Can anybody help me?
Thanks
Dominique
I have the following situation:
Inside my database there is an object containing an attribute.
I have created a SOAP request that can show the full object in a SOAP response.
I have another SOAP request that can launch a modify request for the attributes of this object in the database.
I would like to do the following:
1. Launch the request that modifies the attributes of the mentioned object and write the current date in the test log.
2. Start a loop, as follows:
2.a) Launch the "show object" SOAP request
2.b) Verify the value that needs to be modified
2.c) If the value is modified, exit the loop and write the current date in the test log. If not, goto 2.a)
=> It is the intention to know how long it takes (more or less) for the modification to be fully executed.
In order to do this, I have created the following:
1. A "Property" test step, containing one property in which I write the value of the attribute.
2. A "show object" SOAP request
3. A "Property Transfer" test step, transferring the result of the mentioned attribute to the "Property" test step.
4. A "Conditional goto" test step.
I have following questions:
- Verification: The "Conditional goto" test step contains one condition, having:
- following XPath expression:
//Fraud_counter:text() = 0
- following target step:
the "Property" test step.
=> this doesn't work: I always get this error message:
"Error checking condition: net.sf.saxon.trans.StaticError: XPath syntax error at char 24 on line 2 in { //Fraud_counter:text() = 0}: Prefix Fraud_counter has not been declared"
- Looping:
- I expect from a "Conditional goto" the possibility to go to one place in case of "true" and to another place in case of "false" (so I can return to the SOAP request in case of "false" and go to a last groovy script writing the date in the test log in case of "true")
=> how do I configure these places to go to?
Can anybody help me?
Thanks
Dominique