This repository has been archived by the owner on Mar 26, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 59
Postman to stREST #88
Comments
@eykrehbein to test:
|
I'm on it 👍 @jgroom33 |
@jgroom33 is the param of |
Looks like the .to.have.jsonBody can test whether the param exists and whether it is equal to a value. validate:
jsonpath:
args.foo2: bar2 curl https://postman-echo.com/get?foo1=bar1&foo2=bar2 {
"args": {
"foo1": "bar1",
"foo2": "bar2"
},
"headers": {
"x-forwarded-proto": "https",
"host": "postman-echo.com",
"accept": "*/*",
"accept-encoding": "gzip, deflate",
"cookie": "sails.sid=s%3ApXoOiKY5-aoRZBuqlwdN0MJ2krjLjx21.c8qegiylITH2DQ9vyj%2BFMe74GEDtC%2BVmi1Y1TxO4fDQ",
"user-agent": "PostmanRuntime/7.3.0",
"x-forwarded-port": "443"
},
"url": "https://postman-echo.com/get?foo1=bar1&foo2=bar2"
} tests: pm.test("response body has json with request queries", function () {
pm.response.to.have.jsonBody('args')
.and.have.jsonBody('args.foo2', 'bar2')
pm.response.to.have.jsonBody('args.foo1', 'bar1');
pm.response.to.have.jsonBody('headers')
}); |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
strest foo.postman.json --postman
This would convert a postman collection into a set of directories and files.
There's no reasonable way to convert all the functionality (javascripts) so this should focus on creating the requests only.
The text was updated successfully, but these errors were encountered: