Hi @odanylewycz , what you describe is a first step to to what I am looking for indeed, and I have now managed to put in place what you describe. Instead of environment variables I use global variables, but otherwise the same idea.
Right now I have a hardcode global payload variable defined for the xml . Since ultimately I will use Newman in the solution I use that as an example here.
" --global-var "payload= <uniqueXml>
<Plan id='00001111abc'>
<IdNumber>12345678</IdNumber>
</Plan>
</uniqueXml>"
But the catch is, I already have a repo with xml payload documents (Earlier we used Fitnesse framework at my company and we have a repo of existing xml payloads that I would like to reuse in Postman) I would also like to have the newman commands shorter.
What I would like to have in the end would look have a path to the doc - something short and sweet like this:
" --global-var "payload= folder/payloadOne.xml"
That is what I mean by parameterize a chunk of xml.
All the examples I see for Postman indicate I can use either json, and csv files to set key value pairs for iterationdata. I will probably have to create a json document where I create a payload key and set the value to the xml (I just experimented with this and I get unexpected end of string line errors unless I remove all line breaks).
[
{
"payload": "<uniqueXml><Plan id=\"00001111abc\"><IdNumber>12345678</IdNumber></Plan></uniqueXml>"
}
]
Storing xml in json seems very counterintuitive to me, and I would much rather just point to the path to the xml document if possible.