How are we solving the problem?
Adding the add_run command exposes the API's add_run route to trcli users. This command can be used to create the target test run prior to uploading results - a required step when uploading results that are generated in CI/CD environments that use parallel execution nodes, such as circleCi.
The command follows the same usage pattern as trcli's other commands. The output of the command is the test run id, which is sent to STDOUT and optionally to a yaml file that can be used as a config for parse_*** command that may be executed next.
Changes
What changes where made?
The README was updated to include the usage of the add_run command.
API request handler was updated to support all inputs for add_run route.
A ProjectBasedClient class was added to encapsulate shared API request methods that function based on the presence of a project id.
Existing class TestResultsUploader was refactored to extend the shared logic in the ProjectBasedClient.
CLI class was updated to accept the new add_run command.
Add_run command was added.
Tests were updated to exercise the refactored classes: ProjectBasedClient, TestResultsUploader
Tests were added for the add_run command.
Potential impacts
What could potentially be affected by the implemented changes?
The implemented changes should have no impact on existing usage. These changes do not alter the current behavior of the application.
Issue being resolved: https://github.com/gurock/trcli/issues/236
Solution description
How are we solving the problem? Adding the add_run command exposes the API's add_run route to trcli users. This command can be used to create the target test run prior to uploading results - a required step when uploading results that are generated in CI/CD environments that use parallel execution nodes, such as circleCi.
The command follows the same usage pattern as trcli's other commands. The output of the command is the test run id, which is sent to STDOUT and optionally to a yaml file that can be used as a config for
parse_***
command that may be executed next.Changes
What changes where made?
add_run
command.add_run
command.Potential impacts
What could potentially be affected by the implemented changes?
The implemented changes should have no impact on existing usage. These changes do not alter the current behavior of the application.
Steps to test
Happy path to test implemented scenario:
PR Tasks