-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: custom JS library/module in tests sandbox #153
Comments
Hi @bolerio, |
Thank you. I'd appreciate any updates on that! On Wed, Nov 5, 2014 at 5:14 AM, Abhijit Kane notifications@github.com
https://plus.google.com/+BorislavIordanov "Damn! The world is big!" -- Heleni Daly |
+1 We're working with JWT (client generated) tokens. We build and included a lib to handle this, but changes need to be done each time postman has been updated. Would you prefer a PR with JWT as an auth method like here postmanlabs/postman-app-support#839 ? |
+1 The workaround I've developed adds too many layers of complexity for rapid adoption. |
Yes! Need this!!! You can push a lib into a global variable but clumsy. |
@abhijitkane are any news about these features? |
This is needed |
@wkuckro @niraida @DaveData @wheelspinner @bolerio At the time of writing, the Postman Sandbox supports libraries enumerated here: https://www.getpostman.com/docs/sandbox Please comment on the specific libraries that you wish to see in future releases of the Sandbox, so the we may plan Sandbox growth better. |
momentJS |
@wkuckro Coming soon :) postmanlabs/postman-runtime#92 |
This is not a part of our current roadmap, but has been marked as a feature request and added to our internal tracker. We'll update this thread when any progress occurs on this. :) |
Postman/newman was checking all the boxes for rest api automation and then I hit this issue (i.e. not allowing to import custom js) this would be such a useful feature and in my opinion complete Postman. |
@wkuckro moment-js is available in Neman v3.7.0 and above, you can use it in your test scripts as follows: var moment = require('moment');
// do stuff here... |
Hi, Is it going to be possible to add this feature? I think is good to use own libraries to not repeat too much yourself. |
Using custom NodeJS modules from NPM is not in near or mid term roadmap. Mostly because the provisioning and security concerns that we need to resolve first. Adding this feature even at Newman and app level will cause workflow issues for majority of people who move between Newman, monitors and the app frequently. Presently, there are ways around this:
Having said that, we are constantly looking into a seamless way of doing this and we are considering ability to declare script dependencies in collections and so on. So, feel free to +1 the thread mentioned below or add more comments. Duplicate of: postmanlabs/postman-app-support#1180 |
It would be very useful to develop test verification functions, or more elaborate test fixtures to be made available to tests. Because tests are executed in their own vm sandbox, right now there is no way to pass in global functions/objects. Global variables are limited to JSON, but one wants function. In Postman this is achieved by putting such global functions in a pre-tests sections of an empty test, though that may be just a side-effect of how environments are managed in Postman. In any case, the libraries available by default are great, but one always has some custom code that helps structure larger test suites.
Is this something being considered? Would you be receptive to a pull request implementing such a feature and if so, any opinion on how you would like this done (or how would you not like it done :) ?
The text was updated successfully, but these errors were encountered: