Forum Discussion
mkalboneh
12 years agoOccasional Contributor
Hello,
Thank you for your reply!
Here is where I am with this issue:
I was able to create the Groovy script to extract all the
I was also able to append them into the request for the verification step, All using a single groovy step script.
So my test runs fine as far as the test it self. When I run my test, I can add a list of cars, get their creation Ids, append them into the request for verification (using my awesome script)
Then finally send verification request. So I am in good shape here.
All I really need for that script (to be more awesome) is to remove ALL existing
At this point, I do that manually every time I am about to run my test.
If I use a property transfer step, I believe it will only take one value; where in my case I don't know how many car Ids I get back. It will be different every time the test is run.
I have tried doing that using xmlSlurper, which works great for everything I need! Except that xmlSlurper will not let me call the Remove() on the nodes I need removed.
Something like this flow would do the job:
I hope this simplifies things a little.
Thank you for your reply!
Here is where I am with this issue:
I was able to create the Groovy script to extract all the
<ns:color>tags from the Add Cars Response.
I was also able to append them into the request for the verification step, All using a single groovy step script.
So my test runs fine as far as the test it self. When I run my test, I can add a list of cars, get their creation Ids, append them into the request for verification (using my awesome script)
Then finally send verification request. So I am in good shape here.
All I really need for that script (to be more awesome) is to remove ALL existing
<ns:color>nodes in the request before adding new ones, No matter where they are.
At this point, I do that manually every time I am about to run my test.
If I use a property transfer step, I believe it will only take one value; where in my case I don't know how many car Ids I get back. It will be different every time the test is run.
I have tried doing that using xmlSlurper, which works great for everything I need! Except that xmlSlurper will not let me call the Remove() on the nodes I need removed.
Something like this flow would do the job:
def root = (the request xml we want to add to)
root.each{
// If it.name() == "<ns:color>";
root.remove(it)
}
I hope this simplifies things a little.
Related Content
- 2 years ago
- 4 years ago
- 2 years ago
- 7 years ago
Recent Discussions
- 15 years ago