Skip to main content

Testiny CLI Reference

The CLI reference provides an overview of all available commands supported by the tool. It makes any integration into your CI/CD process very simple. Make sure you have reviewed all available options and settings to learn about all its features. If you are missing any options or features, feel free to contact us via email: [email protected]

Global Testiny CLI Help

Usage: testiny-importer [options] [command]

Options:
--app <url> App endpoint to use
-P, --project <nameOrKey> Target project id, key or name
-y, --confirm Do not prompt for confirmation before starting import
-q, --quiet Do not prompt for optional settings
--disable-custom-fields Disable custom field import. Will fail if required custom fields
with no defaults are enabled
--enable-custom-fields Enable custom field import. Will fail if required custom fields
with no defaults are enabled
--disable-tc-keys Disable test case import key hints (If enabled use #1234 or TC-1234
in title for referencing test cases)
--disable-nested-folders Disable nesting of imported folders (flat mode), applies to CSV
files only
--enable-nested-folders Enable nesting of imported folders (flat mode), applies to CSV
files only
--folder-separator <token> Token for folder name separation (default empty = automatic)
--markdown Enable Markdown conversion
--skip-invalid Skip invalid test cases (default: false)
--duplicates <duplicate mode> Controls how duplicates are detected (choices: "off", "title",
"folder_title", default: "folder_title")
--apikey <apiKey> The API key to use. Not recommended - use the environment variable
TESTINY_API_KEY or TESTINY_IMPORT_API_KEY instead
-h, --help display help for command

Commands:
testcase [options] Import manual test cases (with folders)
testrun [options] Import manual test case results as a testrun
automation [options] Import automated test run results, including test cases and
environment data
licenses Show included package licenses
help [command] display help for command

Automation

To submit results from automated tests to Testiny, use the automation option. When importing test results, new test cases are created, if the respective test case does not already exist. Testiny supports a variety of different file formats from individual automation tools such as JUnit, Playwright, TestNG and more. Please note: you can combine the options below with the global options.

Usage: testiny-importer automation [options]

Import automated test run results, including test cases and environment data

Options:
--show-env [env] Show the field values for the specified (or autodetected) environment
--list-envs List names of available environments and exit
--complete-runs Mark open runs matching the current environment's run field values (e.g. pipeline id) as 'complete'
--codeceptjs Import CodeceptJS Mochawesome JSON report file
--cypress Import Cypress Mochawesome JSON report file
--junit Import JUnit-compatible file
--mochawesome Import Mochawesome JSON report file
--nunit Import NUnit-compatible file
--playwright Import Playwright JSON report file
--rxlog Ranorex compressed report file
--testng Import TestNG report XML file
--vitest Import Vitest json report file
--vstest Import VSTest trx test results XML file
--xunit Import XUnit-compatible file
--no-attachments Disables importing of attachments
--attachment-path <path> Base directory for relative attachment file paths, defaults to input file directory
--source <source> The name of the Testiny automation source for import (will be created if it does not exist)
--run-fields <runFields> A comma-separated list of field names to use for uniquely identifying test runs. Defaults to automatic detection from the CI environment
--run-title-pattern <pattern> A pattern for creating test run titles out of field values, use %{field_name} as placeholders
--environment <envName> The name of the CI environment, overrides automatic detection (default: "auto")
--field-values <fieldValues> A list of fixed field values to add to every result: field1=value1,field2=value2
--incomplete Does not mark test runs as complete - set this flag if more results will be added later (e.g. another job)
--ignore-errors Ignore errors and only log warnings instead (for non-critical errors)
--include-passed-details Include detail messages for results even if status is 'passed'
--custom-result-fields <proplist> Include custom key/value data as fields (if supported by report format)
--use-server-time All imported results use the current server time instead of times provided by the imported files
--config <opts.json> Read options from JSON file (command line arguments override these)
--junit-ignore-classname JUnit: do not include 'classname' attribute in test case title (default: false)
--junit-classname-as-folder <single|nested> JUnit: The 'classname' attribute is used for one 'single' folder name or 'nested' folder names (and not the test case title)
--junit-strip-classname-prefix <prefix> JUnit: Remove the specified prefix string from classnames before processing
-h, --help display help for command

For Playwright, we also offer a custom reporter.

Testrun

To submit manual tests to Testiny, use the testrun option. When importing test runs, new test cases are created if the respective test case does not already exist. Please note: you can combine the options below with the global options.

Usage: testiny-importer testrun [options]

Import manual test case results as a testrun

Options:
--csv <file> Import this CSV file
--csv-encoding <encoding> CSV file encoding (default: "utf8")
--junit <file> Import this JUnit XML file
--playwright <file> Import this Playwright JSON file
--name <test run name> Name of the test run (use %date, %host and %source as placeholders)
--update Allow run with given name to be updated, otherwise creates a new run with that name (default: false)
--close Close the testrun after a successful import (default: false)
--folder <folder name> Override folder name for all created test cases
--testplan <nameOrKey> Target test plan id or title
--junit-ignore-classname JUnit: do not include 'classname' attribute in test case title (default: false)
--junit-classname-as-folder JUnit: The 'classname' attribute is used for folder names and not the test case title (default: false)
--junit-strip-classname-prefix <prefix> JUnit: Remove the specified prefix string from classnames before processing
--testcases <tc mode> Controls how test cases are created if no existing TC is found (choices: "ignore", "fail", "create", default: "create")
-h, --help display help for command