bruno/packages/bruno-tests/collection/scripting/api/bru/getRequestVar.bru
2024-12-05 15:45:36 +05:30

23 lines
343 B
Plaintext

meta {
name: getRequestVar
type: http
seq: 7
}
get {
url: {{host}}/ping
body: none
auth: none
}
vars:pre-request {
request-var: request-var-value
}
tests {
test("should get request var in scripts", function() {
const testVar = bru.getRequestVar("request-var");
expect(testVar).to.equal("request-var-value");
});
}