SumitM
6 years agoOccasional Contributor
how to add / remove xml nodes from soap request with groovy test step.
Hi,
Can anyone please suggest me how to move forward for below issue.
Issue : I need to add / delete xml nodes from my base soap request as per my scenarios during run time.
Description : Suppose my base soap request is consisting of 10 nodes and during my tets execution, as per my scenario, I need to add some supplementary nodes in the test request. So my new test request for that scenario is now consisting of 15 nodes.
After the scenario is run successfull, I need to delete the newly added nodes and move on to next scenario. The next scenario can again have different set of nodes to be added to my base request.
Can anyone please suggest any way out of this issue.
Thanks,
Sumit M
- Instead, you could replace the whole request instead of editing the nodes.
May be store the exact request xmls into file per test and specify those file names in your excel data.
While processing the datasource, read column value which is xml request file name, read that file and replace the request - which is more simple than what you are trying to do.