Create Postman collections out of tests

Florian Benz
Dec 31, 2017 · 3 min read
[source,bash]
----
$ curl 'http://localhost:8080/items' -i -X POST \
-H 'Content-Type: application/json' \
-d '{"description":"Hot News"}'
----
$ restdocs-to-postman --folder generated-snippets --export-format postman --output postman-collection.json
{
"host": {
"before": "http://localhost:8080",
"after": "{{host}}"
},
"headers": [
{
"name": "Authorization",
"newValue": "{{oauth2Token}}"
}
]
}
Result after importing into Postman
Result after importing into Insomnia

Florian Benz

Written by

Software engineer at @ScalableCapital, Munich

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade