nope - sorry - same pain, but thanks for the tip - it looked sensible…
The only thing I can think of is a change of javascript use by postman somehow.
I started using regexstr.exec() and some other functions I hadn’t used today, and from today the way i can work with strings seems to have changed along with that - I was working more in line with the reference material in mozilla, and now its more like the reference in ww3 schools…
I don’t know if postman is running Newman under its covers (it doesn’t look like it but tbh I am not savvy like that), but I tried this and it worked fine - thanks!
(Given Newman came into the conversation I will look it up and pay more attention to it - thanks also)
I haven’t done that, but its a fair shout - would be worth a try as a debug step for when a problem occurs. Further,m typeof isn’t obviously available when you trawl through postman documentation, which by the way blows hot and cold for me.
My problem was though that the postman script behaviour had changed - it was working fine then it stopped working and I had to rethink - given I had typed the variable in by hand every time, the fact that it wasn’t being INTERPRETED as an array where it had been previously was a behaviour change, so I had to change the test instruction to deal with it.
ok I need to add to this now…
I started using myArray = pm.environment.get(“varname”).toString().split(“,”);
as this worked for me on my machine (Mac) in the workspace window, and in a collection run using the environment variables.
A colleague used this same collection and got different results on his (Windows) machine such that:
Running from workspace was fine
Running as a collection using the same environment causes a run halt and undefined error.
There is clearly an inconsistency.