Automation using Postman and systemd

We developers heavily use Postman or similar software for API development and testing. It is highly enriched with features like environments, variables, pre-request scripts, collection runner, etc. One of the critical features that we use is pre-request script.

But it has few limitations, for example it cannot run an executable. I faced this challenge and worked around it. Here I have documentaties my learning. I hope it helps other people with similar use cases.

I don’t understand, as Postman still won’t be able to access that token natively as it doesn’t have access to the file system, unless I’m missing something! You still need to copy and paste?

You might want to consider using Node.JS with the filesystem library for these local activities to generate the token. Or even better create your token “service” with a REST interface, so you can manage everything from the pre-request script.

If you go down the Node.JS route. You can use the Node.JS library version of Newman to run Postman collections and pass in the token as a variable.

This way, you are also using JavaScript across the board.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.