Introducing Testfully CLI: Run test cases via terminal

Introducing Testfully CLI: Run test cases via terminal


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

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.


Features

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


Integration with CI / CD pipelines

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.


Get your API Key

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.

Get your Testfully 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.


Available commands

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


Examples

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


Download

Testfully CLI is available for major operating systems and architectures. Please use the links below to download a compatible binary.

Recent Articles

blog-image
Top 7 Free & Paid mock API tools (2022 Review)

Sometimes called a fake API, A Mock API is when you build an API that returns the desired data. Still, it is not your actual API, and it all has been simulated for some use cases. This article covers best free & paid mock API tools in the market.




blog-image
Top 10 GraphQL clients

GraphQL is one of the hottest topics in the API development world, and that’s for good reasons: GraphQL APIs address many of the issues that we had with Restful and SOAP APIs. This article goes through the Top 10 GraphQL clients you can use today to develop and use GraphQL API.




blog-image
Why your Website is giving an HTTP 405 Method Not Allowed message and how to fix it

When a response has the status code 405, the client attempted to access a resource using an HTTP method that is not permitted by the server for that resource. Websites, Restful APIs, and web applications tend to return this error. This article provides a more detailed explanation of this status code’s meaning and how to handle it in your applications.