Forum Discussion
Hi Rupert,
This is obviously how it had to be done initially, but I take it that Lokesh already has 250 tests with the hardcoded value of 2secs... :)
So I think that the question should be read as: "Could someone please provide me with the groovy script sample to iterate through all test steps within test project, find assertions and update the value of one of its properties (e.g. set timeout value to ${responseTime})"
P.S. My experience with SoapUI is quite limited and I don't have such code sample at hand (and don't need it at the moment), but if this is possible I would like to see the sample as well. (Just for my education :) )
Hi Alex,
Thanks, I kind of knew that was what was being asked - for your information, Lokesh has been messaging me privately and I have already provided him with a Groovy script to copy a REST service's request body across all its POST REST Request TestSteps (250).
In this particular case, I could certainly enhance the Groovy script to update all Assertions across all his TestSteps, but I don't see it as the best way forward - better to set the Assertions up to use a property.
Of course, now that he has 250 Assertions to update - maybe a 'hacky' compromise would be to:
- Setup the responseTime property
- Edit the SoapUI project file XML and globally replace the "250" with ${responseTime}
Of course, please backup the project file first in case it goes wrong!
Thanks,
Rupert