Auto-Test Control
Requires: admin for every endpoint in this section (
/api/autotest/set*,/api/autotest/getduration).
GET /api/autotest/setduration
Sets the autotest duration in seconds. Minimum allowed duration is 2 seconds. Also recalculates the kill deadline to 3x the new duration from now.
Parameters:
| Parameter | Required | Description |
|---|---|---|
duration |
Yes | Duration in seconds (minimum 2) |
Example:
/api/autotest/setduration?duration=30
Response:
200 OK—Auto test duration set to {duration} seconds400 Bad Request— Missing or invalid duration parameter
GET /api/autotest/getduration
Returns the current autotest duration in seconds.
Parameters: None
Response: 200 OK — Duration as plain text (e.g. 30)
GET /api/autotest/setcompleted
Signals that the autotest has completed. The autotest timer will terminate immediately on the next tick, bypassing the remaining duration countdown. This works while the project is stopped too, including when DisableWebApiWhenNotRunning is on.
Parameters:
| Parameter | Required | Description |
|---|---|---|
verdict |
No | runner when the test runner ends a run whose test it has already failed. Composer then reports its own error count as information, and the test runner's result decides the outcome. |
Response: 200 OK — Auto test marked as completed