Run & Thread Fields
How to submit additional custom fields, links and artifacts for your test automation runs and threads to Testmo.
Testmo and our CLI tool support custom fields, links and artifacts. So you can include additional useful fields and references for your test runs, threads and tests. This topic explains how to add fields and references for test runs and threads.
For test runs and threads you can submit additional details directly from the command line using our CLI tool. Including such details can be useful in various situations:
- Including a link to your CI/CD pipeline run
- Including a link to the relevant Git commit
- Linking to artifacts such as build files or screenshots
- Including fields about the build environment
- Adding version numbers, log output or build reports
Including custom fields, references and artifact links for automation runs & threads
testmocommand makes it very easy to include custom fields, artifacts and links for your runs and threads. 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
testmotool includes convenient commands to build such files from the command line:
$ testmo automation:resources:add-link \
--name "GitHub repository" \
--url "https://github.com/my-org/my-repo" \
--note "Our project's git repository with all code files and issues."
$ testmo automation:resources:add-field \
--type string \
--name "Version" \
# For text, console and HTML fields, make sure to pipe the
# field value via stdin, e.g. from a file:
$ cat files.txt | testmo automation:resources:add-field \
--type console \
--name "File list"
This will create a new
testmo-resources.jsonfile in the current directory with the specified resources. You can then include these resources for runs or threads by specifying the file with any of our run and thread commands:
$ export TESTMO_TOKEN=********
$ testmo automation:run:submit \
testmocommand line tool will then send all these resources together with your run or thread and display all submitted information on your run page in Testmo.