Files
bruno/packages/bruno-tests/collection/scripting/api/bru/setVar.bru
2024-08-13 17:22:08 +05:30

23 lines
343 B
Plaintext

meta {
name: setVar
type: http
seq: 4
}
get {
url: {{host}}/ping
body: none
auth: none
}
script:post-response {
bru.setVar("testSetVar", "bruno-test-87267")
}
tests {
test("should get var in scripts", function() {
const testSetVar = bru.getVar("testSetVar");
expect(testSetVar).to.equal("bruno-test-87267");
});
}