test-request Action

Used in FLAT tests to call the FLAT app under test.

Syntax

<test-request>
{
  "path": "/api/path"
}
</test-request>

All request parameters and options can be used:

<test-request>
{
  "path": "/api/path",
  "method": "POST",
  "headers": {
    "X-Foo": "bar"
  },
  "body": {
    "value": {
      "user": "alice"
    }
  }
}
</test-request>

The test-request sets these variables to inspect the result (with assert):

  • $status the HTTP status code (number)

  • $response the response body (string)

  • $headers the response headers (array)

See also

Last updated