Skip to content

Your First Test Suite ​

This guide walks through a complete suite for a simple route: GET /users/:id, which returns a user.

1. Open the Tests tab ​

Open the route and choose Tests (next to Canvas).

2. Create a suite ​

Press New suite. A suite called "New suite" appears in the list. Click its name at the top of the editor and give it a name that says what it proves, for example Returns the user.

3. Describe the request ​

The Request tab is the request the suite sends to the route.

FieldWhat to put thereExample
DescriptionA sentence about what this suite proves (optional)A known user comes back with status 200
Path parametersA value for each :name in the route's pathid → 42
Query parametersValues after ? in the addressinclude → profile
HeadersRequest headersAuthorization → Bearer test-token
BodyThe request body (only for methods that take a body, such as POST and PUT). Pick a content type first; see below{ "name": "Ada" }

Sending a form, a file or raw data ​

The body has a content type picker with the formats the route accepts. The suite remembers your choice and sends that format.

Content typeHow you fill in the body
application/json, text/plainType it into the editor
Form typesFill in the fields. In multipart/form-data a field can hold a file
application/octet-streamChoose a file, or paste the data as base64

Files are saved with the suite, so each one must be 1 MB or smaller. The route receives them exactly as it would from a real upload.

TIP

If you leave a path parameter empty, the request will not match the route and the suite fails with a clear message. Fill in every one.

4. Add a check ​

Open the Assertions tab and press Add assertion. Set it to:

TargetOperatorExpected value
Status codeequals200

Add a second one to check the body:

TargetProperty pathOperatorExpected value
Response bodyidequals42

See Checking the response for every kind of check.

5. Save and run ​

Press Save, then Run suite. The result appears on the right within a few seconds.

  • A green tick means the suite passed: every check held.
  • A red cross means it failed or hit an error. Click the row to see which check failed and what the route actually answered.

Press Run all at the top to run every suite of the route at once.

A worker must be running

Suites run on the same servers that serve your routes. If none is running for this project, the run stops with "No worker is serving this project's routes". Start one, then run again. See Reading results.

Next steps ​

Released under the Apache License 2.0. Enterprise features are under the Fluxify Enterprise Edition License.