1.15.0 • Public • Published

Testiny CLI

Use the Testiny CLI to import test cases and test runs into your Testiny Organization.

  • Test cases can be imported from CSV files (see example below)
  • Test runs can be imported from CSV, JUnit and Playwright JSON

Quick Start

  • Create an API key with write permissions on the project you want to import to
  • Set the API key as the TESTINY_API_KEY environment variable or pass with --apikey
  • Running just testiny-importer testcase or testiny-importer testrun command prompts for required options

General Options

Usage: testiny-importer [options] [command]

  --app <url>                    App endpoint to use (default: "https://app.testiny.io/")
  -P, --project <nameOrKey>      Target project id or key
  -y, --confirm                  Do not prompt for confirmation before starting import
  --disable-custom-fields        Disable custom field import. Will fail if required custom fields
                                 with no defaults are enabled
  --disable-tc-keys              Disable test case import key hints
  --disable-nested-folders       Disable nesting of imported folders (flat mode)
  --folder-separator <token>     Token for folder name separation (default ' > ')
  --duplicates <duplicate mode>  Controls how duplicates are detected (choices: "off", "title",
                                 "folder_title", default: "folder_title")
  --licenses                     Show included package licenses
  --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

  testcase [options]             Import testcases (with folders)
  testrun [options]              Import test case results as a testrun
  help [command]                 display help for command

Importing Test Cases

Usage: testiny-importer testcase [options]

Import testcases (with folders)

  --csv <file>               Import this CSV file
  --csv-encoding <encoding>  CSV file encoding (default: "utf8")
  --steps <step mode>        Controls how steps are imported (choices: "off", "rows", "newlines", "numbered", "numbered_bracket")
  -h, --help                 display help for command

Importing Test Runs

Usage: testiny-importer testrun [options]

Import test case results as a testrun

  --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 testcases
  --testplan <nameOrKey>     Target testplan id or title
  --testcases <tc mode>      Controls how testcases are created if no existing TC is found (choices: "ignore", "fail", "create",
                             default: "create")
  -h, --help                 display help for command

Example Files

CSV Example for importing test cases

"Folder Name", "Test case title", "Precondition text, can be empty", "Steps text (depends on step mode setting)", "Expected result, can be empty"
"Folder Name > Subfolder Name", "Another test case title", "", "Folders can be nested by using the folder separator token", ""

Bundled licenses

For licenses of bundled dependencies, please see LICENSE.txt in the package directory

Package Sidebar


npm i @testiny/cli

Weekly Downloads






Unpacked Size

2.3 MB

Total Files


Last publish


  • testiny