The sooner product defects are discovered, the more cost reduction of software development can be achieved. Software teams that embrace early testing efforts can focus more time on new feature development and thus accelerate delivery of business value. After a successful beta program, we recently released the mabl command-line interface (CLI) that can help speed up development cycles in these early testing efforts.

This powerful utility empowers you to tackle mabl testing tasks from the convenience of the command-line environment that is often the preferred choice for developers and test engineers alike. Repeating similar tasks with the help of the keyboard can be quicker and more convenient than navigating through the web interface. While viewing and updating mabl configuration is a key feature of the tool, its true superpower lies in speeding up the test authoring process.

Testing locally

With mabl, developers can execute tests locally to get quick feedback - and peace of mind - when creating or updating features. Tests can be executed locally with the CLI or with the mabl app. The benefit of the CLI approach is that it provides rapid results for quick feedback. Users can also override the application starting URL and point the test to a locally running instance of the application, further simplifying testing early in the development process. The headless execution option provides a distraction free experience as the browser window is hidden during test runs, making test runs significantly faster.

Simultaneous code and test development

When updating an existing feature with an end-to-end test, mabl branching provides an additional benefit. Test development can be done in the branch without affecting the current version of the test. The branched version of the test in mabl can be merged when the corresponding application code is merged.

The mabl CLI allows you to create and manage branches, and also allows you to author and execute tests in a branch without leaving your command line. The result? Fewer surprises when deploying the change into a staging or even production environment. It’s a simple way to integrate end-to-end tests, not leave them as an afterthought, instead testing end-to-end earlier in the development cycle.

Using the mabl CLI

The mabl web app guides you into getting started with the mabl CLI. To run your first test with the CLI, just head over to the test details page and open the CLI info from the actions menu in the top left corner. You will see example commands with parameters that are ready to run. You can start by copying them into the terminal window.

A screenshot showing how the mabl web app guides you into getting started with the mabl CLI.

When viewing the results for a given test run, you can quickly copy the CLI command to rerun that test locally with the same configuration as the cloud run. This is very useful to troubleshoot issues.

Furthermore, you can even use the CLI to run mabl tests on deployment; head over to the Settings APIs page to get started. There you can generate a CLI command that creates a deployment event in mabl that runs test plans matching the specified criteria.

A screenshot showing how you can use the CLI to run mabl tests on deployment.

Running tests in the cloud

The CLI also provides options to trigger one or more test runs in the cloud and monitor their outcome from the command line. For example, you can label tests by application feature, and then run all feature relevant tests by passing a test label to the CLI. Doing such feature-based testing can help avoid regressions, and is important to perform as early as possible to avoid unintended side effects prior to deployment.

More flexibility coming soon to your desktop

For those who prefer a graphical user interface, soon you will be able to create, edit, manage and run tests in a modern user interface for a more delightful experience. Check out the early access program to learn more.

Not using mabl yet? Sign up for a free trial and start using the CLI to create execute tests today!