8 Running Automated Tests with Jenkins
This chapter covers
- Implementing CI pipelines for Python, Golang, Node.JS & Angular based applications.
- Running pre-integration tests and automated UI testing with Headless Chrome.
- Executing SonarQube static code analysis within Jenkins pipelines.
- Running Unit Tests inside a Docker container and code coverage reports publishing.
- Integrating dependency checks in Jenkins pipeline and injecting security in DevOps.
In the previous chapter, we learned how to set up multibranch pipeline jobs for containerized microservices and continuously triggering Jenkins upon push events with webhooks. In this chapter, we will integrate running automate tests within the CI pipeline. The current CI workflow stages can be summarized in the following schema:
Figure 8.1. Continuous Integration Stages
Test automation is widely considered to be a cornerstone of agile development. If you want to release fast, even daily, with reasonable quality, you have to move to automated testing. On the other hand, giving less importance to testing can result in customer dissatisfaction and a delayed product. However, automating the testing process is a bit more difficult than automating the build, release, and deployment processes. It usually takes a lot of effort to automate nearly all the test cases used in an application. It is an activity that matures over time. It is not always possible to automate all the testing. But, the idea is to automate whatever testing is possible.