Today we’re pleased to announce the general availability of Testfully CLI, a new member of Testfully toolchain and our solution to run test cases in the terminal. Our plan for Testfully CLI is big and we should be able to release more features in the upcoming months.
Table of Content
- Testfully CLI vs Testfully Dashboard
- Integration with CI / CD pipelines
- Get your API Key
- Available commands
Before we get started with Testfully CLI, we would like to clarify that the Testfully Dashboard is still and remains a big part of our offering, and we will continue to enhance both tools in parallel. We see Testfully CLI as a companion tool for Testfully dashboard. There are cases in which it makes more sense to run test cases in the terminal than in UI, and we have built Testfully CLI to cover those use cases. Our goal is to offer a suite of tools to help you with your API testing needs and Testfully CLI is one step towards that goal.
For the first release of Testfully CLI, we focused on running test cases in the terminal. Using Testfully CLI, you can:
- run a single or multiple test cases simultaneously
- run a single or multiple collections simultaneously
- run a combination of test cases & collections simultaneously
- run tests and collections using environment config
- run tests using default configs
- receive feedback about test failures instantly
- check the detailed result in the Testfully dashboard using the provided links
Testfully CLI was developed from the ground up to work with major CI/CD tools, and we have made this tool available for major Linux distros, Mac and windows. To use Testfully CLI as part of your CI/CD process, please download the related binary and start using it.
To use Testfully CLI, you need to have an API Key. Please log in to your dashboard and navigate to the Settings > API Key section to get your API Key. Click on the “Generate” button (Or reset if you have already generated one) to get your API Key.
Pass your API key to Testfully CLI using:
- “–api-key” argument (not recommended for CI/CD)
- TESTFULLY_CLI_API_KEY environment variable (recommended)
Although you can provide your API Key via the “–api-key” param, it’s not recommended as the API Key may end up in log files. We recommend passing the API Key via an environment variable.
You can run the “testfully –help” command to get the instructions in your terminal. This section documents the available commands:
- testfully run runs tests & collections
- testfully version prints current version of Testfully CLI
To run a single test using the default config:
testfully run --test-id=3326562665
To run multiple tests, provide “test-id” multiple times:
testfully run --test-id=3326562665 --test-id=10355883409
To run a single collection:
testfully run --collection-id=3326562665
To run multiple collections, provide “collection-id” multiple times:
testfully run --collection-id=3326562665 --collection-id=10355883409
To run both tests & collections, provide “collection-id” and “test-id”:
testfully run --test-id=3326562665 --collection-id=10355883409
To run tests using config from an environment, provide the environment-id:
testfully run --environment-id=3326562665 --test-id=10355883409
Testfully CLI is available for major operating systems and architectures. Please use the links below to download a compatible binary.