What postman java-script libraries I need to import to write my tests using visual studio code.
Thanks,
What postman java-script libraries I need to import to write my tests using visual studio code.
Thanks,
Would you be able to provide more context?
Sure Danny,
Rather than writing my javascript code in postman “Tests” tab, I want to write my initial code in VS code for my tests taking advantage of code completion (intellisense), e.g. when I type pm, I want to know what all the members of pm object, properties, methods etc. Once I am satisfied with the code then I can copy & paste it in the “Tests” tab to run.
Hope that helps.
Thanks,
I might be wrong but I just don’t think it’s going to work like that in VSCode - the pm.*
API within the application only really has a handful of options available to you anyway.
https://learning.getpostman.com/docs/postman/scripts/postman_sandbox_api_reference/
I’m very interested in your approach, if you can get something working in VSCode - I think having an auto complete function, on the pm.*
API, within the application would help a lot with this but it’s just not there yet.
Also, it might only save you a little bit of time as you would need to copy everything back into the application, to run the test and know if you have the syntax right or not.
In terms of VSCode - This looks interesting though:
https://marketplace.visualstudio.com/items?itemName=eridem.vscode-postman
Under the hood its just using Newman to run the collections but it’s still actually quite cool.
Yeah, that one is pretty cool, I downloaded that earlier. I found this but looks quite old,
https://www.npmjs.com/package/postman. Anyway thanks for your help.
Sorry I couldn’t assist you more
I don’t believe that the package you referred to has anything to do with this Postman. That shares the same name but feels more that a message bus than a REST client.