Help from the neighbors: consuming CLI tools in your tests

stefanos.petrakis

This is a presentation about a handy recipe for expanding your testing arsenal by using command line applications directly inside your testing.

As lots of us know, the final stage of testing the functionality that some Drupal code provides is often an automated browser-based validation of expectations. For the case of code that produces something different than browser-targeted content, like binary or text-based media files, that final stage is often replaced by manual testing using online or offline, visual or command-line tools.

For the specific case of command-line tools, we came up with an innovative idea that will allow you to utilize them directly inside your tests. This will allow your development process to become more robust.

We will describe our idea and will explain how to implement it on your local development environment as well as your CI pipelines, taking DrupalCI as our example.

This recipe opens a new dimension for what is possible during testing and should effectively allow you to automate further your testing workflows.

Track

Development & Coding