Skip to content
QASignoff

Documentation

Tests & scripts

Write pre-request scripts and qa.test assertions in the Signoff dialect.

Tests & scripts

Automate checks with pre-request scripts and

qa.test
assertions.

Tests tab on Bearer request

Pre-request Script

Runs before the request is sent. Use it to set headers, compute values, or seed collection variables.

Open the Pre-request Script tab on any request.

Tests

Runs after the response returns. Signoff uses a

qa.*
dialect (familiar if you know Postman
pm.*
).

Example from the Starter Guide Bearer request:

qa.test("Status is 200 OK", function () {
  qa.response.to.have.status(200);
});

var body = qa.response.json();

qa.test("Server accepted the bearer token", function () {
  qa.expect(body.authenticated).to.be.true;
});

Assert & Extract helpers

After Send, use response actions:

ActionPurpose
AssertGenerate test snippets from the response
ExtractSave response fields into variables for later requests

Tips

  • Keep assertions focused: status, one or two body fields, latency budget.
  • Use the bottom Console to debug script output when a test fails.
  • Run many tests together with the Collection Runner.

Next

Need something else? See the FAQ. Questions: [email protected]. Bugs: [email protected].