-
-
Notifications
You must be signed in to change notification settings - Fork 102
Feature/ Event Support #75
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
Conversation
* Adds prequest_script and test_script config options * Allows a path to a script file to be defined for each option * If the specified files exist then they are added to the event property in the structure * Added test for feature
* Tidy formatting of Events comment in config/api-postman.php * Adds trailing comma in src/Commands/ExportPostmanCommand.php * Use single quotes in tests/Feature/ExportPostmanTest.php
Hi @ajanes93, thank you for your contribution 🎉 I'll take a deeper look into this when I have some spare time to give it a proper test. Could you tell me what your use case is for such a feature, please? |
Thanks for looking into this @andreaselia I want to be able to set pre-request and test scripts at a collection level so that I can do specific things before and after each request has run. Some use cases:
|
@ajanes93 nice work on this! My only concern with this is the support for different kinds of scripts. Is JavaScript the only one that is supported at this time? Should we validate the script before running it? |
Thanks @tomirons. Regarding your questions I just had a read through the Postman Docs and JavaScript is the only script format they support. See below:
Taken from Postman Docs: Intro To Scripts |
Feature/ Event Support
This PR adds support for collection level prerequest and test scripts.
prequest_script
andtest_script
config options