$ testmo help automation:run:submit
Usage: testmo automation:run:submit [options] -- [executable]
Creates a new test automation run, submits test results and completes the run
--instance <url> Required: The full address of your Testmo instance
--project-id <id> Required: The ID of the project this run is added to
--name <name> Required: The name of the newly created test run
--source <source> Required: The name of the source for this run and future
runs of this same source/suite
--results <files...> Required: Result log files (in JUnit XML format). If you
pass a single quoted parameter, it is evaluated by
Node's `glob` to resolve files (allowing recursive
search, see example below)
--tags <tags...> Tags for the new run. Tags can also be used to
automatically link this run to milestones
--config <name> Automatically find an existing configuration for this
run based on the config name
--config-id <id> Or specify a configuration by using the config's ID
--milestone <name> Automatically find an existing milestone for this run
based on the milestone name
--milestone-id <id> Or specify a milestone by using the milestone's ID
--resources <file> An optional JSON file with custom fields, links and
artifacts (can be built with the automation:resources
--ignore-parse-error Ignore result file parsing errors and upload remaining
successfully parsed files (default: false)
--exec-suppress Suppress standard output (stdout) of passed executable
--exec-stop-error Stop and don't create a run if the passed executable
failed (exit code not 0) (default: false)
--ansi Force ANSI console output (colors, animations)
--no-ansi Do not use ANSI console output (colors, animations)
--debug Output additional debug information
-h, --help Display help for command
Use this command to create a new test automation run, submit test results and
complete the run in a single step. That is, use this command if you don't run
your tests in multiple parallel threads. There are two typical ways to use
- Run this command after your tests finished and after your test result
reports were generated. This command then uploads your test results.
$ testmo automation:run:submit [options]
- You can alternatively pass the executable/command line to run your tests
to this command. The command then also captures the output of your tests
and measures the exact time. The output and time are then also sent to
$ testmo automation:run:submit \
[options] -- <your-test-run-command> [options]
In both scenarios the command expects that your test results are generated and
reported as JUnit XML files. Practically any test automation tool can report
or convert test results to this format. The list of report files can be
specified with the --results option:
testmo automation:run:submit [options] --results reports/*.xml
It is also possible to use recursive search by specifying a quoted single
option to be evaluated by 'glob' (don't forget the quotes):
testmo automation:run:submit [options] --results "reports/**/*.xml"
The command automatically detects if any found files look like a valid JUnit
XML report and ignores other files. By default, detected JUnit XML files that
fail to parse throw an error.
Make sure to set the API authentication token as TESTMO_TOKEN environment
variable. You can either add an authentication token for your user in your
profile settings in Testmo. Or your Testmo admin can add a separate API user
You can create a test automation run and submit test results after your
$ TESTMO_TOKEN=******** testmo automation:run:submit \
--instance https://<your-name>.testmo.net \
--source "backend-unit" \
You can additionally pass the executable/command line for your test automation
tool as the last parameter after the special -- option. The command then
executes your tool and captures the full output and measures the execution
time. Both are included in the result test automation run in Testmo (note the
$ TESTMO_TOKEN=******** testmo automation:run:submit \
--instance https://<your-name>.testmo.net \
--source "backend-unit" \
--results reports/*.xml \
-- npm test <-- replace this line with your testing tool command line
To also include any additional resources previously stored in a file with the
automation:resources:* commands, such as custom fields, links and artifacts,
specify the resource file with the --resources option:
$ TESTMO_TOKEN=******** testmo automation:run:submit \
--resources testmo-resources.json