'newman randomly runs old assertions

I'm using newman npm package and running it in a NodeJS program by passing collection through postman api.

newman.run({collection:https://api.getpostman.com/collections/unique_id, ...

One of the assertion failed. The problem was in the assertion itself and I updated the assertion in Postman UI. When I run program again, even though I am leveraging Postman APIs to pass the collection, it still throws the same error in random runs. Sometimes it is successful while sometimes it fails. Running https://api.getpostman.com/collections/unique_id in browser always yields the latest version.

This unpredictable behavior can run many false alarms. Is there a way to force newman always to work with latest version? There doesn't seem to be any caching thing unless it sends some header which causes Postman APIs to have caching issues.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source