16 years ago
How can I run multiple requests dynamically using the same parameter each time?
Hi there,
I've been looking at the forum entries and I still don't get it.
I have multiple requests in a test case, and I want to dynamically replace the "?" for a node with a value.
For example in the request I have this:
?
which I want to replace with this:
1234 for example.
I've tried this with dynamic properties like so:
${#TestSuite#ConsumerIdProd}
But I have a lot of requests and I want to know how to do this without manually typing in the
dynamic property for each request.
I've seen the property transfer and the groovy examples but they don't seem to answer the
following:
If I have 25 requests that I want to run one after the other, do I have to create 25 groovy
steps before each request that does the replacement for me or can I just use ONE groovy script
at the beginning of the test case list that would replace the node in all 25 requests?
Also would I need to use xpath on the node here in the request:
1234 in order to replace the "?" with my desired value?
Is it easier to do this with groovy or property transfer?
Can I just create one property transfer step and use it to change the xml request node for each request or do I need one prop transfer step for each request?
Any help would be much appreciated!
thanks,
Carlos
I have to create multiple prop transfer steps
I've been looking at the forum entries and I still don't get it.
I have multiple requests in a test case, and I want to dynamically replace the "?" for a node with a value.
For example in the request I have this:
which I want to replace with this:
I've tried this with dynamic properties like so:
But I have a lot of requests and I want to know how to do this without manually typing in the
dynamic property for each request.
I've seen the property transfer and the groovy examples but they don't seem to answer the
following:
If I have 25 requests that I want to run one after the other, do I have to create 25 groovy
steps before each request that does the replacement for me or can I just use ONE groovy script
at the beginning of the test case list that would replace the node in all 25 requests?
Also would I need to use xpath on the node here in the request:
Is it easier to do this with groovy or property transfer?
Can I just create one property transfer step and use it to change the xml request node for each request or do I need one prop transfer step for each request?
Any help would be much appreciated!
thanks,
Carlos
I have to create multiple prop transfer steps