Postman Not Writing Collection Variables Until The End Of A Collection Run

Hi all,

Got a strange problem, wonder if anyone has come across this. I have a standard collection, some of the early tests write a collection variable which is used in later tests. If I run the tests individually, the variable is written fine, if I run the test set as a collection, they don’t.

Anyone seen this ? I’m running v9.21.5

Thanks in advance.

Hi @dgreen65

Could you maybe provide some examples / screenshots and console logs?

Hi, which part of the log (or where) would I see it writing the variable ?

As I say, it works fine when I run the test individually but not from within a collection which tends to suggest it’s a setting or something in collections ?

Bizarrely, ran the same collection twice this morning, 1st time it wrote all the variables, 2nd time it didn’t, I’m at a loss !

I think I can see what the issue is but it seems as though this is something that has not affected me before. It only seems to populate the collection variables at the end of the collection run which is why it works every time for a single test. As my collection creates variables, for example, in tests 1 to 5 which are used in tests 6 to 10, the latter tests are now failing because at that point, the variables are not set.

This has never been an issue before, does anyone know why this is happening and whether I can get round it ?