Get All Scenarios
Retrieves all active scenarios associated with a given project.
Endpoint Information
- URL: https://testinium.io/Testinium.RestApi/api/projects/{projectId}/scenarios
- Method: GET
- Authentication: Required (Bearer Token)
Path Parameters
Parameter | Type | Description |
|---|---|---|
projectId | Integer | The ID of the project for which scenarios are to be retrieved. |
user | Object | The user making the request. Must have the authority SCENARIO_VIEW. |
Response
[
{
"id": 23057,
"type": "SELENIUM",
"scenario_name": "TestScenarioSample",
"description": "This scenario was generated by Testinium and connected to TestPlanSample",
"enabled": true,
"deleted": false,
"project_test_rail_enabled": false,
"execute_mode": "AUTOMATED",
"source_file": "features/example.feature",
"project_id": 1424,
"plans": [
3276,
3362,
3364
],
"childs": [],
"parameterized": false,
"has_parameterized_class": false,
"created_at": "2024-12-05T16:46:47Z",
"updated_at": "2024-12-05T16:46:47Z",
"created_by": "mehmetaksahin",
"updated_by": "mehmetaksahin",
"java_test_class": "com.testinium.CucumberRunner",
"java_test_methods": "@example",
"test_scenario_java_parameters": [],
"group": false
}
]Response Fields
Field | Type | Description |
|---|---|---|
id | Integer | The unique ID of the scenario. |
type | String | The type of the scenario (e.g., SELENIUM). |
scenario_name | String | The name of the scenario. |
description | String | A brief description of the scenario. |
enabled | Boolean | Whether the scenario is enabled or not. |
deleted | Boolean | Whether the scenario is marked as deleted. |
project_test_rail_enabled | Boolean | Whether TestRail integration is enabled for the scenario. |
execute_mode | String | The execution mode of the scenario (e.g., AUTOMATED). |
source_file | String | The source file associated with the scenario (e.g., features/example.feature). |
project_id | Integer | The project ID associated with the scenario. |
plans | Array | List of test plan IDs associated with the scenario. |
childs | Array | List of child scenarios, if any. |
parameterized | Boolean | Whether the scenario is parameterized. |
has_parameterized_class | Boolean | Whether the scenario has a parameterized class. |
created_at | String | The timestamp when the scenario was created. |
updated_at | String | The timestamp when the scenario was last updated. |
created_by | String | The user who created the scenario. |
updated_by | String | The user who last updated the scenario. |
java_test_class | String | The Java test class associated with the scenario. |
java_test_methods | String | The Java test methods associated with the scenario. |
test_scenario_java_parameters | Array | Java parameters associated with the test scenario (currently empty). |
group | Boolean | Whether the scenario is part of a group. |
Error Codes
HTTP Status | Code | Message |
|---|---|---|
400 | BAD_REQUEST | Invalid request parameters. |
401 | UNAUTHORIZED | The user is not authorized to access this resource. |
403 | FORBIDDEN | The user does not have sufficient permissions to access the resource. |
404 | NOT_FOUND | The specified project or scenario was not found. |
500 | INTERNAL_ERROR | An internal server error occurred while processing the request. |
Example Request
curl --location --request GET "https://testinium.io/Testinium.RestApi/api/projects/{projectId}/scenarios" \
--header 'Authorization: Bearer <your_access_token>'