Hello!
Since the change on how apidog handles pm.collectionVariables we found out that a lot of our tests are started failing for some weird reason.
I spent time on investigating and noticed the following issue:
If you try to retrieve a collection variable in the post-processor script which has a nested object saved in it, it returns only part of the object but not the whole data!
Repro steps (did it with with Apidog 2.6.24):
- add any type of request to your test scenario
- add a pre- processor custom script to it
- in the script, save a nested object into a collectionVariable (see example below), and write out the value of the variable to the console
- add a post- processor custom script to a request (it can be the same or any other request as well)
- in the script, write out the value of the collection variable with the nested object to the console
- run the test scenario and check the console logs
Actual result step 6): the console log of th epre-and post processor is not the same! In the post porcessor script, the nested object inside the object is retreived as an empty object, instead of with it’s values
Note: if you do the exact same test with pm.variables instead of pm.collectionVariables it works fine, so only the collection variables seem to be broken…Unfortunately most of our tests were imported from Postman and are full with collectionVariables (we are talking hundreds of scenarios), so updating it is not feasible.
Please investigate and fix the collection variables.