-
Notifications
You must be signed in to change notification settings - Fork 51
Extend support for Postman random functions/dynamic variables/replaceIn #92
base: master
Are you sure you want to change the base?
Conversation
hi @simskij I think I solved it BUT I needed to manually add a "faker.js" file in the shim folder, I reference the dynamic variable functions through an import in the "core.js" file, which might not be the desired convention. Looking forward to receive remarks or improvements or even rejection if you don't think the PR is suitable. The goal of this PR was to provide support for all Postman dynamic variables. |
@simskij did you had some time to review to PR? Don't be overwhelmed by the amount code because this is mostly due to the 2 files that were added:
|
@thim81 some update about this PR? |
@dbacelar4i No news on the PR, still hoping from some feedback from the expert @simskij. I have been using the PR branch beginning of May 2021 and it works BUT I'm not sure if it is implemented in the correct way. What I'll do, is I'll prepare a 1.6.0 branch will combine this PR, together with the other open PR's and share it here, so that you can try it also yourself. |
@dbacelar4i I have bundled all the open functional PR's (#92 / #103 / #113) in a 1.6.0 release branch >> /~https://github.com/thim81/postman-to-k6/tree/release.1.6.0 You should be able to pull it in your packages.json and use the latest code in your node project, while we wait for one of the maintainers to review the pending PR's. Example of packages.json:
|
PR is also linked to #90 |
@simskij with the acquisition by Grafana, what will happen with the postman-to-k6 package? And is there something we can help with? |
…ables Implement replaceIn for dynamic variables
Support for the usage of the |
Thanks Thim ! I'll be watching this space in case changes are needed after review. |
* Extend support for Postman random functions/dynamic variables (#92) * Fix for unwanted encoding of Postman variables in query string, but keep support for "space" (#113) * Exclude disabled headers when converting requests (#103) * Implement postman replaceIn function * Extended test for url encode handling * Extended test for url encoding of space characters * Extended test to exclude disabled headers when converting requests (#103) * Extended test to include checks for randomPhoneNumber & isoTimestamp * Updated GH workflow actions Co-authored-by: Tim <>
For those missing this functionality, I have provided a forked NPM package version that contains the Postman dynamic variables functionality: Replace in your packages.json:
to
This is a forked NPM package, to facilitate other users. The current maintainers are quite overloaded by the acquisition of K6 by Grafana. By forking the repo & package, users can keep using new PR's & (security) fixes. At a later stage the changes can potentially be merged back in the original postman-to-k6 repo. The changelog contains the differences between the original package & the forked version. |
Currently the package supports 3 random Postman functions.
This PR is is to extend the support for all current Postman dynamic variables
https://learning.postman.com/docs/writing-scripts/script-references/variables-list/
#91