...

/

Enhancing Deployments with Test Automation

Enhancing Deployments with Test Automation

Learn how to leverage automated testing in deployment.

Automation delivers an obvious benefit of quick feedback, as I have emphasized throughout previous chapters. In this section, I will explain how these insights can strengthen deployment processes.

Fast feedback and compensating actions

When a development team makes a code change and merges it into the main branch of a repository, the chances indicate that something will go wrong. If we want to avoid negative surprises, test scripts need to run automatically against the new version to verify its validity. If everything looks good, then there is nothing to worry about; otherwise, corrective action is necessary. Let us distill every step of the described process and see options for implementation.

As you remember, Continuous Integration (CI) is responsible for verifying codebase correctness after every change. This mechanism is a natural candidate also to run automated scripts and take corresponding compensating actions. There are two constituents to this solution: extracting feedback from test results and taking steps to resolve side effects. I will distill each of these steps below.

I suggest splitting automated feedback generation into phases. First, run the fastest tests (i.e., unit tests), then essential tests (i.e., smoke tests), and finally, the rest of the suite by priority.

This procedure should report failures at the end of each step to provide the fastest feedback per test category. Consequently, as soon as the CI is complete, you will have verification results that ...