@testiny/cli 1.22.1 → 1.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,78 +3,143 @@
3
3
  Use the Testiny CLI to import test cases and test runs into your Testiny Organization.
4
4
 
5
5
  - Test cases can be imported from CSV files (see example below)
6
- - Test runs can be imported from CSV, JUnit and Playwright JSON
6
+ - Test runs can be imported from CSV, JUnit and Playwright JSON files & many more formats
7
7
 
8
- ## Quick Start
8
+ ## Quickstart
9
9
 
10
10
  - Create an API key with write permissions on the project you want to import to
11
11
  - Set the API key as the TESTINY_API_KEY environment variable or pass with ``--apikey``
12
- - Running just ``testiny-importer testcase`` or ``testiny-importer testrun`` command prompts for required options
12
+ - Running just ``testiny-importer testcase``, ``testiny-importer testrun`` or ``testiny-importer automation`` command prompts for required options
13
13
 
14
- ## General Options
14
+ ## General options
15
15
 
16
16
  ```plain
17
17
  Usage: testiny-importer [options] [command]
18
18
 
19
19
  Options:
20
- --app <url> App endpoint to use (default: "https://app.testiny.io/")
20
+ --app <url> App endpoint to use
21
21
  -P, --project <nameOrKey> Target project id or key
22
22
  -y, --confirm Do not prompt for confirmation before starting import
23
+ -q, --quiet Do not prompt for optional settings
23
24
  --disable-custom-fields Disable custom field import. Will fail if required custom fields
24
25
  with no defaults are enabled
25
- --disable-tc-keys Disable test case import key hints
26
- --disable-nested-folders Disable nesting of imported folders (flat mode)
27
- --folder-separator <token> Token for folder name separation (default ' > ')
26
+ --enable-custom-fields Enable custom field import. Will fail if required custom fields
27
+ with no defaults are enabled
28
+ --disable-tc-keys Disable test case import key hints (If enabled use #1234 or
29
+ TC-1234 in title for referencing test cases)
30
+ --disable-nested-folders Disable nesting of imported folders (flat mode), applies to CSV
31
+ files only
32
+ --enable-nested-folders Enable nesting of imported folders (flat mode), applies to CSV
33
+ files only
34
+ --folder-separator <token> Token for folder name separation (default empty = automatic)
35
+ --markdown Enable Markdown conversion
36
+ --skip-invalid Skip invalid test cases (default: false)
28
37
  --duplicates <duplicate mode> Controls how duplicates are detected (choices: "off", "title",
29
38
  "folder_title", default: "folder_title")
30
- --licenses Show included package licenses
31
39
  --apikey <apiKey> The API key to use. Not recommended - use the environment variable
32
40
  TESTINY_API_KEY or TESTINY_IMPORT_API_KEY instead
33
41
  -h, --help display help for command
34
42
 
35
43
  Commands:
36
- testcase [options] Import testcases (with folders)
44
+ testcase [options] Import test cases (with folders)
37
45
  testrun [options] Import test case results as a testrun
46
+ automation [options] Import automated test run results, including test cases and
47
+ environment data
48
+ licenses Show included package licenses
38
49
  help [command] display help for command
50
+
39
51
  ```
40
52
 
41
- ## Importing Test Cases
53
+ ## Importing manual test cases
42
54
 
43
55
  ```plain
44
56
  Usage: testiny-importer testcase [options]
45
57
 
46
- Import testcases (with folders)
58
+ Import manual test cases (with folders)
47
59
 
48
60
  Options:
49
- --csv <file> Import this CSV file
50
- --csv-encoding <encoding> CSV file encoding (default: "utf8")
51
- --steps <step mode> Controls how steps are imported (choices: "off", "rows", "newlines", "numbered", "numbered_bracket")
52
- -h, --help display help for command
61
+ --csv <file> Import this CSV file
62
+ --csv-encoding <encoding> CSV file encoding (default: "utf8")
63
+ --trl <file> Import TestRail XML export
64
+ --trl-api <server url> Import from TestRail API
65
+ --trl-user <user name> Username/email for TestRail API
66
+ --trl-export-users <file> Export TestRail users to CSV file
67
+ --trl-tc-limit <count> Limits the number of test cases fetched
68
+ --trl-rate-limit <rps> Limits the number of requests to the TestRail api (default 160, zero for no limit)
69
+ --steps <step mode> Controls how steps are imported (choices: "auto", "off", "rows", "row_blocks", "newlines",
70
+ "numbered", "numbered_bracket", "asterisk")
71
+ --attachments <attachment mode> Controls how test case attachments are imported (choices: "off", "inline", "all")
72
+ --work-items Import work items (e.g. Jira issues) when importing from TestRail API
73
+ --integration <name or id> Name or Id of the integration to use for workitem import
74
+ -h, --help display help for command
75
+
53
76
  ```
54
77
 
55
- ## Importing Test Runs
78
+ ## Importing manual test runs
56
79
 
57
80
  ```plain
58
81
  Usage: testiny-importer testrun [options]
59
82
 
60
- Import test case results as a testrun
83
+ Import manual test case results as a testrun
61
84
 
62
85
  Options:
63
- --csv <file> Import this CSV file
64
- --csv-encoding <encoding> CSV file encoding (default: "utf8")
65
- --junit <file> Import this JUnit XML file
66
- --playwright <file> Import this Playwright JSON file
67
- --name <test run name> Name of the test run (use %date, %host and %source as placeholders)
68
- --update Allow run with given name to be updated, otherwise creates a new run with that name (default: false)
69
- --close Close the testrun after a successful import (default: false)
70
- --folder <folder name> Override folder name for all created testcases
71
- --testplan <nameOrKey> Target testplan id or title
72
- --testcases <tc mode> Controls how testcases are created if no existing TC is found (choices: "ignore", "fail", "create",
73
- default: "create")
74
- -h, --help display help for command
86
+ --csv <file> Import this CSV file
87
+ --csv-encoding <encoding> CSV file encoding (default: "utf8")
88
+ --junit <file> Import this JUnit XML file
89
+ --playwright <file> Import this Playwright JSON file
90
+ --name <test run name> Name of the test run (use %date, %host and %source as placeholders)
91
+ --update Allow run with given name to be updated, otherwise creates a new run with that name (default: false)
92
+ --close Close the testrun after a successful import (default: false)
93
+ --folder <folder name> Override folder name for all created test cases
94
+ --testplan <nameOrKey> Target test plan id or title
95
+ --junit-ignore-classname JUnit: do not include 'classname' attribute in test case title (default: false)
96
+ --junit-classname-as-folder JUnit: The 'classname' attribute is used for folder names and not the test case title (default: false)
97
+ --junit-strip-classname-prefix <prefix> JUnit: Remove the specified prefix string from classnames before processing
98
+ --testcases <tc mode> Controls how test cases are created if no existing TC is found (choices: "ignore", "fail", "create", default: "create")
99
+ -h, --help display help for command
100
+
101
+ ```
102
+
103
+ ## Importing automated test runs/results
104
+
105
+ ```plain
106
+ Usage: testiny-importer automation [options]
107
+
108
+ Import automated test run results, including test cases and environment data
109
+
110
+ Options/Subcommands:
111
+ --show-env [env] Show the field values for the specified (or autodetected) environment
112
+ --list-envs List names of available environments and exit
113
+ --complete-runs Mark open runs matching the current environment's run field values (e.g. pipeline id) as 'complete'
114
+ --codeceptjs Import CodeceptJS Mochawesome JSON report file
115
+ --cypress Import Cypress Mochawesome JSON report file
116
+ --junit Import JUnit-compatible file
117
+ --mochawesome Import Mochawesome JSON report file
118
+ --nunit Import NUnit-compatible file
119
+ --playwright Import Playwright JSON report file
120
+ --rxlog Ranorex compressed report file
121
+ --testng Import TestNG report XML file
122
+ --vitest Import Vitest json report file
123
+ --vstest Import VSTest trx test results XML file
124
+ --xunit Import XUnit-compatible file
125
+ --no-attachments Disables importing of attachments
126
+ --attachment-path <path> Base directory for relative attachment file paths, defaults to input file directory
127
+ --source <source> The name of the Testiny automation source for import (will be created if it does not exist)
128
+ --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
129
+ --run-title-pattern <pattern> A pattern for creating test run titles out of field values, use %{field_name} as placeholders
130
+ --environment <envName> The name of the CI environment, overrides automatic detection (default: "auto")
131
+ --field-values <fieldValues> A list of fixed field values to add to every result: field1=value1,field2=value2
132
+ --incomplete Does not mark test runs as complete - set this flag if more results will be added later (e.g. another job)
133
+ --ignore-errors Ignore errors and only log warnings instead
134
+ --config <opts.json> Read options from JSON file (command line arguments override these)
135
+ --junit-ignore-classname JUnit: do not include 'classname' attribute in test case title (default: false)
136
+ --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)
137
+ --junit-strip-classname-prefix <prefix> JUnit: Remove the specified prefix string from classnames before processing
138
+ -h, --help display help for command
139
+
75
140
  ```
76
141
 
77
- ## Example Files
142
+ ## Example files
78
143
 
79
144
  CSV Example for importing test cases
80
145