Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
44 lines (35 sloc) 864 Bytes

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

You can’t perform that action at this time.