I’m jumping into the Postman Test Runner with a JSON data file and I’m having some questions:
I’m using a variable called language in my JSON datafile (JSON: “language”: “en”). The language parameter is used in the query string of my request. How do I handle (remove) the quotation marks in this case? My API expects lng=en instead of lng=“en” in the query string.
Any tips on how to test requests that depend on variables defined in data files without having to use the collection runner all the time? With the example above (putting language in the data file), I’m not able to use my request at all without using the collection runner.
@ramonitor
I am not sure what you might be doing wrong.
However, here are the steps you can follow to achieve something that you’re trying to do.
You might be able to triage your issue with this too.
@singhsivcan, thanks for your reply. Somehow this is related to the ‘Retry’ option in the collection runner losing the data variables completely. When doing the tests the first time using the ‘Run’ button, the test works fine, variables are available in the request. On using ‘Retry’, there are no variables from the data file available.