all Postman lovers,
Here you go , I have created command line utility that allows you to update URLs in bulk in Postman collection file .
Now you dont have to worry about replacing request URLs across all your collections when the project structure changes . You just have to run
npx postman-collection-url-updater -c “collection.json” -r “https://localhost:23456/api/v1/{{path} }” -w “{{baseURL}}/{{path}}” -s “new_collection.json”
In the above example all the urls will have the https://localhost:23456/api/v1/{{path} } part get replaced with {{baseURL}}/{{path}} .
Please do try it out and let me know your thoughts and comments
6 Likes
#500 + #Downloads so far :
postman-collection-url-updater - npm
Hi Linkedin Family and all Postman lovers
postman-collection-url-updater #v3 is out
I have added one more utility #postman - #collection - #aggregator to the project , now you can consoilidate/move multiple collections into single collection.
just install the package and run the below command
npm i -g postman-collection-url-updater
postman-collection-aggregator -l “./collection1.json” “./collection2.json” -n “new_collection”
This will create a new collection called “new_collection” with sub collection 1 and 2 as sub folders , all variables will be added to the new_collection
postman-collection-aggregator -d “./collectionDirectory” -n “new_collection”
you can also simply pass the directory containing all the collections instead of individual files
It was a rollercoaster ride of learning:
Creating a nodejs cmd utility
Writing Github action, to run in linux, windows, and Mac
Creating automatic npm publish and writing Github pages
Writing Jest unit and system test
Learning Jest coverage test and Mocks
Will write an article soon with all the information
#sdet #testautomationengineer #article #postmanapi #postman #nodejsdeveloper #qaengineer #medium #javascriptdeveloper #js
system
(system)
Closed
December 12, 2024, 2:46pm
4
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.