Closed kinow closed 8 years ago
The backend uses a URL like
http://localhost:8000/api/navigationtree/1-4?_=1473631692427
We can add a test plan parameter to filter test cases versions
http://localhost:8000/api/navigationtree/1-4?_=1473631692427&test_plan_id=2
Hmmm... deleting a test case also removes the test case from the manage test cases navigation tree.
We might have to re-work the navigation tree for test plans.
A good solution for now seems to be simply lock test cases after they have been added to test plans, and the test plan has been executed.
TestLink had a similar approach.
Backend logic implemented.
Example response:
[
{
"ancestor": "1-4",
"descendant": "1-4",
"length": "0",
"node_id": "4",
"node_type_id": "1",
"display_name": "Test P1",
"attributes": "{}",
"created_at": "2016-09-11 22:09:18",
"updated_at": "2016-09-11 22:09:18",
"children": [
{
"ancestor": "2-6",
"descendant": "2-6",
"length": "0",
"node_id": "6",
"node_type_id": "2",
"display_name": "Suite",
"attributes": "{}",
"created_at": "2016-09-11 22:09:10",
"updated_at": "2016-09-11 22:09:10",
"children": [
{
"ancestor": "3-5",
"descendant": "3-5",
"length": "0",
"node_id": "5",
"node_type_id": "3",
"display_name": "My test",
"attributes": "{\"execution_type_id\":\"2\",\"locked\":true}",
"created_at": "2016-09-13 04:09:51",
"updated_at": "2016-09-13 04:09:51",
"children": [ ]
}
]
}
]
}
]
And for test cases:
{
"test_case": {
"id": 1,
"project_id": 1,
"test_suite_id": 1,
"created_at": "2016-09-13 07:45:53",
"updated_at": "2016-09-13 07:45:53",
"formatted_description": "<p>Example test case</p>",
"formatted_prerequisite": "<p>None</p>",
"version": {
"id": 1,
"version": 1,
"test_cases_id": "1",
"execution_type_id": "1",
"name": "Test Case A - 1",
"prerequisite": "None",
"description": "Example test case",
"created_at": "2016-09-13 07:45:53",
"updated_at": "2016-09-13 07:45:53",
"execution_type": {
"id": 1,
"name": "Manual",
"description": "Manual test",
"created_at": "2016-09-13 07:45:53",
"updated_at": "2016-09-13 07:45:53"
}
},
"executions": [
{
"id": 1,
"test_run_id": "1",
"test_cases_versions_id": "1",
"execution_status_id": "2",
"notes": "",
"created_at": "2016-09-13 07:47:28",
"updated_at": "2016-09-13 07:47:28",
"test_cases_id": "1"
}
]
}
}
Logic implemented in the UI too.
Just need to enforce in the remaining API methods. Making sure that calls to edit/delete test cases also inspect - within a transaction - the state of executions.
Validation in the backend implemented as well.
At the moment, a test plan has a many-to-many relationship to test case versions. So a test plan has one or more test case versions.
The problem is that when the user creates a test plan and adds test cases, we add its latest version to the pivot table.
However, once the user decides to change any attribute and creates a new version, our test plan contains the old name.
We could:
I'm a bit more over the latter option.