Test Cases
Introduction
The Test Cases API retrieves informations about test cases located under /public/test_cases.
Download the Postman file for this api.
Get All Test Cases
This endpoint retrieves all test cases.
HTTP Request
GET http://localhost:3000/api/test_cases
Get a Specific Test Case
This endpoint retrieves a specific test case.
HTTP Request
GET http://localhost:3000/api/test_cases/<ID>
URL Parameters
| Parameter | Description |
|---|---|
| ID | The ID of the test case (e.g. T1) |
Get The Endpoints of a Test Case
This retrieves the endpoints.json file located in the test case folder if it exists otherwise will generate one automatically based on the content of the test case.
HTTP Request
GET http://localhost:3000/api/test_cases/<ID>/endpoints
URL Parameters
| Parameter | Description |
|---|---|
| ID | The ID of the test case (e.g. T1) |
Get The SDK Tools Response of a Test Case
This retrieves the sdk-tools.json file located in the test case folder.
HTTP Request
GET http://localhost:3000/api/test_cases/<ID>/sdk-tools
URL Parameters
| Parameter | Description |
|---|---|
| ID | The ID of the test case (e.g. T1) |
Get The Mediate Response of a Test Case
This retrieves the mediate configuration for the test case. If the test case defines multiple mediate variants (e.g. mediate_A.json and mediate_B.json), the mock server returns them in sequence per sdk_session_id: first request returns variant A, second request (e.g. after SDK refresh) returns variant B. See Mediate variant swapping for details.
HTTP Request
GET http://localhost:3000/api/test_cases/<ID>/mediate
URL Parameters
| Parameter | Description |
|---|---|
| ID | The ID of the test case (e.g. T1) |
| platform | Optional. ios or android. Used for platform-specific mediate files. |
| sdksessionid | Optional but recommended for variant test cases. Sent by the SDK; used to select which variant (A/B or 1/2) to return so the same session gets A on first call, B on second. |
Get The Exchange Response of a Test Case
This retrieves the exchange.json file located in the test case folder if it exists
HTTP Request
GET http://localhost:3000/api/test_cases/<ID>/exchange
URL Parameters
| Parameter | Description |
|---|---|
| ID | The ID of the test case (e.g. T1) |
| impression_creativetype | Used to select a response automatically based on the creative type (e.g. ?impression_creativetype=8 for banner) |
