@testmo/testmo-cli
NPM package. Once you have installed the package, you can simply use the testmo
tool from the command line. The following example shows how to install the CLI as a global tool on your system:npm
and install packages. If your system is missing NPM/NodeJS, just follow their guide on how to install these tools.testmo
tool, you can use it to submit your test automation results to your Testmo instance.testmo
command to submit your results. You can simply pass one or multiple XML files and the tool automatically scans and detects all test results.testmo
tool also supports launching your test automation tool directly to capture the console output, record exit codes and measure test times. See below for a full example.testmo
command line tool supports various scenarios and workflows. To make it easier to get started and use the best approach, we've included some concrete examples for typical use cases below. Also make sure to review the full command line reference for all options and features.automation:run:submit
command. This command accomplishes multiple things at once:testmo
command line tool also supports glob
style file patterns when looking for XML result files. To use this capability, make sure to pass the pattern with quotes on the command line. For example, you can find all XML files in a directory recursively like this:--results "reports/**/*.xml"
testmo
tool supports this by passing the full automation command line as a parameter. testmo
then launches your automation tool, captures the output, records the full test time and finally, after you automation tool exits, collects the result files.testmo
, simply pass it after specifying two dashes at the end of the command like this:--
dashes and your automation tool command line. The full command and all options after the dashes are used to launch your automation tool.testmo
tool automatically extracts any custom fields from your XML files. For threads and test runs you can submit additional details directly from the command line. Including such details can be useful in various situations:testmo
command makes it very easy to include custom fields, artifacts and links for your threads and runs. To do this, you just specify a resource JSON file when creating, submitting or completing runs and threads. You could create such a JSON file yourself, but the testmo
tool includes convenient commands to build this file from the command line:testmo-resources.json
in the current directory. You can then include these resources by specifying the file with the run and thread commands:testmo
tool from your CI/CD pipeline:automation:run:create
command in your CI/CD pipeline. This creates a new test automation run in Testmo so you can add results. The command returns a test run ID. You need to store this ID and pass it to your parallel test jobs in your CI/CD pipeline, so you can add your results.testmo
tool launch your tests). You use the automation:run:submit-thread
command to create a new thread and submit your results (and optionally launch your automation tool). You need to pass the above mentioned test run ID, so the new thread and results are added to the test run you created in step 1.automation:run:complete
command. You again need to pass the test run ID created in step 1.automation:run:submit
or automation:run:create
commands, you can specify a configuration and milestone.--config-id
option. IDs for configurations can be found in Testmo under Admin > Configurations.--config-name
option and Testmo will try to find the relevant configuration based on its name.--milestone-id
option. The ID of a milestone can be found by clicking the small info icon next to the milestone name in the header section of the milestone's view page.--milestone
option. Testmo will then try to find the milestone based on the milestone name.--tags
option). When you add or edit a milestone in Testmo, you can add one or more automation tags (e.g. latest
, release-5
etc). Testmo will automatically link a run to the latest milestone that was created with a matching automation tag. This way you do not need to change your command line call (and thus your CI/CD config). You just add new milestones in Testmo with the same tag. New runs are then always automatically linked to the latest relevant milestone.testmo
command, our CLI tool automatically passes through the exit code by default. This way, when your test runs fail, the exit code is correctly reported to your CI/CD pipeline.test-complete
(or however you would like to call it) pipeline job on failure through to run the automation:run:complete
job.