Catchpoint-cli test
The Catchpoint-cli test commands enable you to perform operations related to 'test' and 'instant-test' resources, including Create, Update, and Delete operations on scheduled tests, as well as running instant tests on specified nodes.
catchpoint-cli test [flags]
Options
-h, --help help for test
Options inherited from parent commands
--api-token string API token (or set the 'CATCHPOINT_API_TOKEN' environment variable)
--config-file string A configuration file to load commonly-used flags
--output-fields strings Output fields to include in dot notation e.g. 'data.name,completed' (default [.])
--output-format FormatterType Output format [JSON, Table] (default Table)
-v, --verbose count Enable verbose logging. Use -v for basic verbose, -vv for debug, -vvv for trace
--version Print version and exit
CREATE
Creates a new test configuration.
To create a new test, provide the required parameters such as --test-type, --test-name, --division-id, --product-id, and --test-script.
Alternatively, you can provide a full test definition using --from-file with a path to a JSON file containing the request body.
Note: when using --from-file, ideally, all objects that require an "Id" field should have said field specified in the file. For convenience, many fields will do a lookup based on "Name" if "Id" is not provided, but providing "Id" directly is more reliable and efficient. Leaving out any "Id" fields will result in an additional API call with time and size based on how many lookups are needed.
catchpoint-cli test create [flags]
Examples
# Create a new Playwright test:
catchpoint-cli test create --test-type Playwright --test-name "My Playwright Test" --division-id 123 --product-id 456 --test-script 'await page.goto("https://example.com")'
# Create a new API test with authentication:
catchpoint-cli test create --test-type API --test-name "My API Test" --division-id 123 --product-id 456 --test-script 'open("https://www.example.com")' --authentication-type Basic --password-ids 789
# Create a new test from a JSON definition file:
catchpoint-cli test create --from-file /path/to/test-definition.json
Options
-a, --authentication-type string The type of authentication to use in the test [Basic, Digest, NTLM, Kerberos, Login, Plain]
-c, --certificate-ids ints The IDs of the certificates to use for authentication
-H, --custom-header key=value Custom headers to include, in 'Key=Value' format (default [])
-d, --division-id int The division ID to assign the test
--end-time string The end time for the test in RFC3339 format (e.g., 2006-01-02T15:04:05Z)
-F, --folder-id int The folder ID to assign the test
-f, --from-file string Path to a JSON file with a request body, any other flags will override values in the file
-h, --help help for create
-m, --monitor-type string The monitor type
-p, --password-ids ints The IDs of the passwords to use for authentication in the test
-P, --product-id int The product ID to assign the test
--start-time string The start time for the test in RFC3339 format (e.g., 2006-01-02T15:04:05Z) (Default is now)
-S, --status string The status of the test to create [Active, Inactive] (default "Active")
-D, --test-description string The description of the test to create
-N, --test-name string The name of the test to create
-s, --test-script string The contents of the test script
-t, --test-type string The type of test [Playwright, API]
-k, --token-ids ints The IDs of the tokens to use for authentication in the test
Options inherited from parent commands
--api-token string API token (or set the 'CATCHPOINT_API_TOKEN' environment variable)
--config-file string A configuration file to load commonly-used flags
--output-fields strings Output fields to include in dot notation e.g. 'data.name,completed' (default [.])
--output-format FormatterType Output format [JSON, Table] (default Table)
-v, --verbose count Enable verbose logging. Use -v for basic verbose, -vv for debug, -vvv for trace
--version Print version and exit
DELETE
Deletes one or more scheduled tests by their IDs. To delete scheduled tests, specify the test IDs using the --test-ids flag with a comma-delimited list of IDs.
catchpoint-cli test delete [flags]
Examples
# Delete scheduled tests with IDs 123 and 456:
catchpoint-cli test delete --test-ids 123,456
Options
-h, --help help for delete
-i, --test-ids strings The IDs of the test configurations to delete
Options inherited from parent commands
--api-token string API token (or set the 'CATCHPOINT_API_TOKEN' environment variable)
--config-file string A configuration file to load commonly-used flags
--output-fields strings Output fields to include in dot notation e.g. 'data.name,completed' (default [.])
--output-format FormatterType Output format [JSON, Table] (default Table)
-v, --verbose count Enable verbose logging. Use -v for basic verbose, -vv for debug, -vvv for trace
--version Print version and exit
DISABLE
Disables one or more tests by their IDs. To disable tests, specify the test IDs using the --test-ids flag with a comma-delimited list of IDs.
catchpoint-cli test disable [flags]
Examples
# Disable tests with IDs 123 and 456:
catchpoint-cli test disable --test-ids 123,456
Options
-h, --help help for disable
-i, --test-ids ints The IDs of the tests to disable
Options inherited from parent commands
--api-token string API token (or set the 'CATCHPOINT_API_TOKEN' environment variable)
--config-file string A configuration file to load commonly-used flags
--output-fields strings Output fields to include in dot notation e.g. 'data.name,completed' (default [.])
--output-format FormatterType Output format [JSON, Table] (default Table)
-v, --verbose count Enable verbose logging. Use -v for basic verbose, -vv for debug, -vvv for trace
--version Print version and exit
Enable
Enables one or more tests by their IDs.
To enable tests, specify the test IDs using the --test-ids flag with a comma-delimited list of IDs.
catchpoint-cli test enable [flags]
Examples
# Enable tests with IDs 123 and 456:
catchpoint-cli test enable --test-ids 123,456
Options
-h, --help help for enable
-i, --test-ids ints The IDs of the tests to enable
Options inherited from parent commands
--api-token string API token (or set the 'CATCHPOINT_API_TOKEN' environment variable)
--config-file string A configuration file to load commonly-used flags
--output-fields strings Output fields to include in dot notation e.g. 'data.name,completed' (default [.])
--output-format FormatterType Output format [JSON, Table] (default Table)
-v, --verbose count Enable verbose logging. Use -v for basic verbose, -vv for debug, -vvv for trace
--version Print version and exit
GET
Retrieves details for one or more tests by their IDs. To get test details, specify the test IDs using the --test-ids flag with a comma-delimited list of IDs.
catchpoint-cli test get [flags]
Examples
# Get details for test with ID 123:
catchpoint-cli test get --test-ids 123
# Get details for tests with IDs 123, 456, and 789:
catchpoint-cli test get --test-ids 123,456,789
Options
-h, --help help for get
-i, --test-ids strings The IDs of the test configurations to get
Options inherited from parent commands
--api-token string API token (or set the 'CATCHPOINT_API_TOKEN' environment variable)
--config-file string A configuration file to load commonly-used flags
--output-fields strings Output fields to include in dot notation e.g. 'data.name,completed' (default [.])
--output-format FormatterType Output format [JSON, Table] (default Table)
-v, --verbose count Enable verbose logging. Use -v for basic verbose, -vv for debug, -vvv for trace
--version Print version and exit
ENUMS
Retrieves enumeration values for various test configuration options. To get specific enumeration sections, use the --sections flag with a comma-delimited list of sections.
catchpoint-cli test get-enums [flags]
Examples
# Get all test enumeration values:
catchpoint-cli test get-enums
# Get specific test enumeration sections:
catchpoint-cli test get-enums --sections AlertTriggerType,DisplayTestFrequency
Options
-h, --help help for get-enums
-s, --sections strings The enumeration sections to retrieve (if not specified, all sections will be retrieved)
Options inherited from parent commands
--api-token string API token (or set the 'CATCHPOINT_API_TOKEN' environment variable)
--config-file string A configuration file to load commonly-used flags
--output-fields strings Output fields to include in dot notation e.g. 'data.name,completed' (default [.])
--output-format FormatterType Output format [JSON, Table] (default Table)
-v, --verbose count Enable verbose logging. Use -v for basic verbose, -vv for debug, -vvv for trace
--version Print version and exit
RESULTS
Retrieves the results of an instant test. To get the results of an instant test, specify the test ID using --instant-test-id and the node ID using --node-id.
catchpoint-cli test get-results [flags]
Examples
# Get the results of a test with ID 123 for node ID 456:
catchpoint-cli test get-results --instant-test-id 123 --node-id 456
# Get the results of a test with a specific step ID:
catchpoint-cli test get-results --instant-test-id 123 --node-id 456 --step-id 2
Options
-h, --help help for get-results
-i, --instant-test-id int The ID of the instant test run to get results for
-n, --node-id int The ID of the node that ran the instant test
-s, --step-id int The ID of the step to get results for
Options inherited from parent commands
--api-token string API token (or set the 'CATCHPOINT_API_TOKEN' environment variable)
--config-file string A configuration file to load commonly-used flags
--output-fields strings Output fields to include in dot notation e.g. 'data.name,completed' (default [.])
--output-format FormatterType Output format [JSON, Table] (default Table)
-v, --verbose count Enable verbose logging. Use -v for basic verbose, -vv for debug, -vvv for trace
--version Print version and exit
RUN
Triggers an immediate instant test.
To run an existing test, specify the test ID using --test-id and one or more, comma-delimited node IDs --node-ids.
To run a new test, provide the necessary parameters for the test definition (e.g., --test-type, --test-script).
Else, you may provide a full test definition using --from-file with a path to a JSON file containing the request body.
Note: when using --from-file, ideally, all objects that require an "Id" field should have said field specified in the file. For convenience, many fields will do a lookup based on "Name" if "Id" is not provided, but providing "Id" directly is more reliable and efficient. Leaving out any "Id" fields will result in an additional API call with time and size based on how many lookups are needed.
catchpoint-cli test run [flags]
Examples
# Run an existing test with ID 123 on nodes 1, 2, and 3:
catchpoint-cli test run --test-id 123 --node-ids 1,2,3
# Run a new Playwright test using a script file on nodes 4 and 5:
catchpoint-cli test run --test-type Playwright --test-script 'await page.goto("https://example.com")' --node-ids 4,5
# Run a new test using a full definition from a JSON file:
catchpoint-cli test run --from-file /path/to/test-definition.json
Options
-a, --authentication-type string The type of authentication to use in the test run [Basic, Digest, NTLM, Kerberos, Login, Plain]. With '--test-type', '--password-ids'
-c, --certificate-ids ints The IDs of the certificates to use for authentication. With '--test-type'
-H, --custom-header key=value Custom headers to include, in 'Key=Value' format. With '--test-type' (default [])
-f, --from-file string Path to a JSON file with a request body, any other flags will override values in the file
-h, --help help for run
-m, --monitor-type string The monitor type to use. With '--test-type'
-n, --node-ids ints Comma-separated list of node IDs
-p, --password-ids ints The IDs of the passwords to use for authentication in the test run
-i, --test-id int The ID of the test to run
-s, --test-script string The contents of the test script to run. With '--test-type'
-t, --test-type string The type of test to run [Playwright, API]
-k, --token-ids ints The IDs of the tokens to use for authentication in the test run
Options inherited from parent commands
--api-token string API token (or set the 'CATCHPOINT_API_TOKEN' environment variable)
--config-file string A configuration file to load commonly-used flags
--output-fields strings Output fields to include in dot notation e.g. 'data.name,completed' (default [.])
--output-format FormatterType Output format [JSON, Table] (default Table)
-v, --verbose count Enable verbose logging. Use -v for basic verbose, -vv for debug, -vvv for trace
--version Print version and exit
UPDATE
Updates an existing test configuration. To update a test, specify the test ID using --test-id, the JSON path of the field to update using --path, and the new value using --value.
catchpoint-cli test update [flags]
Examples
# Update the name of a test with ID 123:
catchpoint-cli test update --test-id 123 --path /name --value "Updated Test Name"
# Update the description of a test with ID 123:
catchpoint-cli test update --test-id 123 --path /description --value "Updated Test Description"
# Add a label to an existing test:
catchpoint-cli test update --test-id 123 --path /labels --value '[{"name":"automation","values":["catchpoint-cli"]}]'
Options
-h, --help help for update
--path string The JSON path of the field to update
--test-id int The ID of the test to update
--value string The value to update the test with
Options inherited from parent commands
--api-token string API token (or set the 'CATCHPOINT_API_TOKEN' environment variable)
--config-file string A configuration file to load commonly-used flags
--output-fields strings Output fields to include in dot notation e.g. 'data.name,completed' (default [.])
--output-format FormatterType Output format [JSON, Table] (default Table)
-v, --verbose count Enable verbose logging. Use -v for basic verbose, -vv for debug, -vvv for trace
--version Print version and exit