Hello, I’m getting my feet wet on using test run automation.
Have a collection of 12 requests chained to run without issues using the collection runner.
This collection includes a small set of utility helper functions in the top level collection “folder” that children requests/pre-request scripts could share. Pretty cool, minimized duplication.
I was introduced to the newman cli for what I thought was essentially the same thing.
Wrong… I found that these functions that I had so conveniently defined in the main folder node were not recognized in the newman runner. To fix this I had to copy these functions throughout the test code where used and remove them entirely from the top level object.
I find this very inefficient. Is there no way to include a shared javascript utility module in newman that can be utilized in a like fashion during test run process? Having duplicate code throughout the test collection just seems like a very bad practice and simply doesn’t scale. I hope I’m overlooking something.
Maybe there’s a better option over newman for automating postman testing?
thanks!