Test Plugin
Default base URL: http://localhost:8180, prefix: /test
Endpoint List
Section titled “Endpoint List”| Method | Path | Description |
|---|---|---|
| GET | /test/ | Current jobs |
| GET | /test/integration | Integration test jobs |
| GET | /test/stress | Stress test jobs |
| GET | /test/cases | Test case list |
| GET | /test/api/cases | Test case list (standard response) |
| GET | /test/api/stress/count | Stress push/pull counters |
| POST | /test/api/cases/execute | Execute test cases |
| POST | /test/api/stress/push/{protocol}/{count} | Start/scale push stress test |
| POST | /test/api/stress/pull/{protocol}/{count} | Start/scale pull stress test |
| POST | /test/api/stress/stop/push | Stop push stress test |
| POST | /test/api/stress/stop/pull | Stop pull stress test |
| POST | /test/stop | Stop a specific job |
Per-endpoint details
Section titled “Per-endpoint details”1) GET /test/
Section titled “1) GET /test/”Returns current job list.
Response fields:
| Field | Type | Description |
|---|---|---|
jobs | array | Job list |
count | int | Job count |
2) GET /test/api/stress/count
Section titled “2) GET /test/api/stress/count”Returns stress push/pull counters.
Response example:
{ "code": 0, "message": "success", "data": { "pushCount": 10, "pullCount": 20 }}3) POST /test/api/cases/execute
Section titled “3) POST /test/api/cases/execute”POST /test/api/cases/executeContent-Type: application/json{ "names": ["basic_rtmp_to_flv", "webrtc_publish"] }| Field | Type | Required | Description |
|---|---|---|---|
names | string[] | Yes | Test case names to execute |
4) POST /test/api/stress/push/{protocol}/{count}
Section titled “4) POST /test/api/stress/push/{protocol}/{count}”POST /test/api/stress/push/rtmp/100Content-Type: application/json{ "remoteURL": "rtmp://localhost/live/stress/%d", "streamPath": "live/source"}Path params:
| Param | Type | Required | Description |
|---|---|---|---|
protocol | string | Yes | rtmp/rtsp/webrtc etc |
count | int | Yes | Target push concurrency |
Body fields:
| Field | Type | Required | Description |
|---|---|---|---|
remoteURL | string | No | Target URL, %d placeholder supported |
streamPath | string | No | Source stream path, default live/source |
5) POST /test/api/stress/pull/{protocol}/{count}
Section titled “5) POST /test/api/stress/pull/{protocol}/{count}”POST /test/api/stress/pull/rtmp/100Content-Type: application/json{ "remoteURL": "rtmp://localhost/live/source", "testMode": 0}Body fields:
| Field | Type | Required | Description |
|---|---|---|---|
remoteURL | string | No | Pull source URL, %d supported |
testMode | int | No | Test mode, default 0 |
6) POST /test/stop
Section titled “6) POST /test/stop”{ "id": 123 }| Field | Type | Required | Description |
|---|---|---|---|
id | uint64 | Yes | Job ID |
Common response example
Section titled “Common response example”{ "code": 0, "message": "success", "data": { "pushCount": 100, "protocol": "rtmp" }}Error Codes
Section titled “Error Codes”| HTTP Status | Scenario |
|---|---|
| 400 | Invalid parameters (e.g. non-numeric count) |
| 404 | Route not found |
| 500 | Stream manager / service registry unavailable |