stable

Clone or download

Read-only

Udpate steps status through REST

Part of story #11492: have several steps in my tests How to test: First of all make sure that the StepExecution field in test exec tracker has update permissions for the current user. Create a test def in a campaign. Go to the test execution. Note the id of the execution. In test def artifact, add a step. Submit the artifact. In plugin_testmanagement_changeset_value_stepdef, note the id of the new step. Go to TTM: the test def does not appear. We will fix that: edit the test title with the TTM modal. The step should appear, in notrun state. Go to the API explorer and issue the following: PATCH /testmanagement_executions/<exec-id> { "steps_results": [ {"step_id": <step-id>, "status": "failed"} ] } Go back to TTM, the step is marked as failed instead of notrun. Go to test exec artifact /plugins/tracker/?aid=<exec-id> and try to edit the step results. A warning message tells you that this is not possible. Change-Id: If291495dc8fc2c8d08a3e62b6bcdb061803a8117

Modified Files

Name
M include/TestManagement/REST/v1/ExecutionsResource.class.php +55 −21 Go to diff View file
M include/TestManagement/REST/v1/PATCHExecutionRepresentation.php +6 −1 Go to diff View file
M include/TestManagement/REST/v1/StepResultRepresentation.php +2 −2 Go to diff View file
A include/TestManagement/REST/v1/StepsResultsChangesBuilder.php +192 −0 Go to diff View file
A include/TestManagement/REST/v1/StepsResultsUpdater.php +84 −0 Go to diff View file
M include/TestManagement/Step/Execution/Field/StepExecution.php +75 −28 Go to diff View file
M include/TestManagement/Step/Execution/Field/StepExecutionChangesetValueDao.php +20 −0 Go to diff View file
M include/autoload.php +4 −2 Go to diff View file
A phpunit/TestManagement/REST/v1/StepsResultsChangesBuilderTest.php +390 −0 Go to diff View file
M phpunit/bootstrap.php +1 −0 Go to diff View file
M site-content/fr_FR/LC_MESSAGES/tuleap-testmanagement.po +8 −4 Go to diff View file
M site-content/tuleap-testmanagement.pot +5 −3 Go to diff View file