The Testery CLI is available as a pip package here: https://pypi.org/project/testery/.
To install, run
pip install --upgrade testery
You can see the command line help by running,
> testery --helpUsage: testery [OPTIONS] COMMAND [ARGS]...Testery CLIKick off test runs from your CI/CD platform and run them on Testery'snext-generation, cloud-based testing grid.Options:--help Show this message and exit.Commands:add-file Adds a file to a test run.cancel-test-run Cancels a test run.create-deploy Creates a deploy for a project and...create-environment Creates an environment where tests can be...create-test-run Submits a Git-based test run to the Testery...delete-environment Deletes an environment.list-environments Returns a list of environments.load-usersmonitor-test-runmonitor-test-runsreport-test-run Outputs individual test results for the...update-environment Updates an environment where tests can be...upload-build-artifacts Uploads a file or directory of build...verify-token Verifies your username and authentication...
Creating a deployment is useful for telling Testery when you've pushed new code into your test environment. What tests you want to run can be configured with Schedules.
> testery create-deploy --helpUsage: testery create-deploy [OPTIONS]Creates a deploy for a project and environment.Options:--token TEXT Your Testery API token. [required]--project TEXT The project key of the repo being deployed. [required]--git-provider TEXT The Git provider used for the repository that is beingdeployed. Should be GitHub or BitBucket--git-owner TEXT The organization owner in Git for the repository thatis being deployed.--git-repo TEXT The repository name that is being deployed.--build-id TEXT The build the atifact should be associated with.--environment TEXT Which environment you would like to run your testsagainst. [required]--commit TEXT The Git commit that was deployed.--branch TEXT The Git branch the deploy came from.--help Show this message and exit.
Usage: testery create-test-run [OPTIONS]Submits a Git-based test run to the Testery platform.Options:--token TEXT Your Testery API token. [required]--git-ref TEXT The git commit hash of the build beingtested.--git-branch TEXT The git branch whose latest commit you wnatto run.--test-name TEXT The name you want to use on the Git status.--wait-for-results If set, the command will poll until the testrun is complete.--project TEXT Legacy option. Use --project-key instead.--project-key TEXT The project key.--environment TEXT Legacy option. Use --environment-keyinstead.--environment-key TEXT Which environment you would like to run yourtests against.--include-tags TEXT List of tags that should be run.--exclude-tags TEXT List of tags that should excluded from thetest run.--copies INTEGER The number of copies of the tests to submit.--build-id TEXT A unique identifier that identifies thisbuild in your system.--output TEXT The format for outputting results[json,pretty,teamcity]--fail-on-failure When set, the testery command will returnexit code 1 if there are test failures.--include-all-tags When set, overrides the testery.yml and runsall available tags.--parallelize-by-file Pass this flag if you want the test run toparallelize by file/feature.--parallelize-by-test Pass this flag if you want the test run toparallelize by test/scenario.--timeout-minutes INTEGER The maximum number of minutes this test runcan take before it is killed automatically.--test-timeout-seconds INTEGER The maximum number of seconds a test cantake before it is killed automatically.--runner-count INTEGER Specify number of parallel runners to use infor this testrun.--variable TEXT A variable to add to the enviroment.Specified as "KEY=VALUE". To encrypt value,pass in "secure:KEY=VALUE", Multiplevariables can be provided.--test-filter-regex TEXT A regular expression to be used forfiltering tests.--help Show this message and exit.
If your project is using a compiled language (like .Net, Java) or if you aren't attaching a code repository to your project, then you'll have to upload your build artifacts to Testery before you can run a test. To do that you can use the upload-build-artifacts command of the Testery CLI.
> testery upload-build-artifacts --helpUsage: testery upload-build-artifacts [OPTIONS]Uploads a file or directory of build artifacts and associates them withthe specified build-idOptions:--token TEXT Your Testery API token. [required]--project TEXT Legacy option. Use --project-key instead.--project-key TEXT The project key.--branch TEXT The Git branch the build came from.--build-id TEXT The build the artifact should be associated with.[required]--path TEXT The path to the file or directory you want to upload.[required]--zip-dir Creates a zip file of the directory contents beforeuploading.--help Show this message and exit.