Supported translations
The translator converts the following Postmanpm.* APIs to their Bruno equivalents:
| Postman API | Bruno equivalent |
|---|---|
pm.test("name", function() { | test("name", function() { |
pm.response.to.have.status(200) | expect(res.getStatus()).to.equal(200) |
pm.response.json() | res.getBody() |
pm.response.text() | res.getBody() |
pm.response.responseSize | res.getSize() |
pm.environment.set("key", value) | bru.setEnvVar("key", value) |
pm.environment.get("key") | bru.getEnvVar("key") |
pm.globals.set("key", value) | bru.setVar("key", value) |
pm.globals.get("key") | bru.getVar("key") |
pm.collectionVariables.set("key", value) | bru.setVar("key", value) |
pm.collectionVariables.get("key") | bru.getVar("key") |
pm.expect(pm.response.responseTime).to.be.below(N) | expect(res.getResponseTime()).to.be.below(N) |
pm.response.to.have.header("name") | expect(res.getHeader("name")).to.exist |
pm.expect(x).to.eql(y) | expect(x).to.equal(y) |