Test early, test often

Top tips for transitioning to continuous testing

Tony Luu
continuous testing
© Shutterstock / Shaynepplstockphoto

Continuous Testing needs to be embraced from the beginning to get the most out of it. Testing needs to happen sooner and the quicker feedback can be received and analyzed, issues can be fixed. This will lead to higher quality and lower costs. This article dives into some tips that will help your organization start the process of implementing a Continuous Testing strategy.

Continuous Integration is quickly establishing itself as a best practice for software development. Several factors such as revision control, build automation, and automated testing provide key benefits to ensure that developers are delivering high-quality software. With the demands of multiple integrations that take place during the day, the need for developers to get the quality feedback that is needed, it is essential to have a robust automation testing platform in place. Continuous Testing is needed to ensure that every check-in is verified.

We want the ability to catch issues as early in the development process as possible so that they can be fixed before they can possibly break something else. In order for this to be effective, the automation tests must be robust enough and mature that they do not add any additional issues to the CI/CD pipeline. Continuous Testing can be thought of as a prerequisite for Continuous Integration and Delivery, in that it gives developers confidence in checking in code as frequently as possible, while also giving them the peace of mind that their code is being tested.

The following tips will help your organization start the process and implement a Continuous Testing strategy.

SEE ALSO: 4 steps to implement a CI/CD pipeline

The evolution of Continuous Testing

Continuous Testing is not a new term, but its use has evolved. Without the benefit of automation tools, Continuous Testing was a means of testing throughout the software development life cycle. Testing would begin during the planning phase of writing relevant tests, waiting for a piece of software to test, released and continue through the maintenance phase of the project, or through successive iterations of the project.

In this process, testing would be done manually, but there would be no end and testing would continue until the software was retired. Today development happens much faster. Agile mentality and Extreme Programming has greatly reduced the timetable for which software is being released. With the rapid pace of software delivery, testing manually is insufficient to keep pace with development.

Automating tests has allowed Continuous Testing to reach these goals so that testing can take place whenever a build is process is initiated.

Continuous Testing requires a cultural shift

Getting to a state of Continuous Testing doesn’t happen overnight. In the past traditional software development lifecycle, quality was usually the responsibility of QA professionals who usually only had a few weeks before product launches to verify everything in a piece of software. Modern organizations are now moving away from this way of thinking. In Continuous Delivery, quality should be the responsibility of every team in the organization.

Continuous Testing adopts both philosophies of “shift-left” and “shift-right” approaches to testing. We want the developers to test early and often and with better automation tool coverage so that testing can begin early in the project timeline. This “shift-left” helps prevents defects by catching them early and is more cost-effective to fix them instead of catching them later where they could have the ability to break other areas of code.

We also need a “shift-right” approach that focuses on customer experience. Customer feedback is vital for software success. Nobody wants to use software that is cumbersome to use or not very intuitive. After software has been released, a wider set of tests can be created to test the whole user experience or real-life user load that might be hard to capture in a pre-release environment. Collaboration throughout the teams is essential to get the right amount of test coverage needed.

In order to ensure success, we need to clearly define what needs to be tested. Automation isn’t suited to all types of tests. In a Continuous Testing environment, we need to consider that these tests will need to be run after each commit by the dev team and they need constant feedback, so if we design tests that take forever to run than it will be of little use.

We also need to look at software architecture. Old monolithic architecture, while easy to develop, deploy and manage, carries drawbacks such as being highly dependent, and hard to scale. We should consider a microservices approach where each app or function can be self-contained. They are easier to test and maintain.

In this type of architecture, they can iterate and commit as much as they want without risk to the whole project. They can be deployed individually. This is a good candidate for Continuous Testing since the testing scope will usually much smaller since we are only focused on code that is designed to perform one function. It will be easier to create automatable tests in this scenario without having to create a full complete integration test suite.

A testable framework will be much more stable in this case as well, since there is less that can go wrong. Tests can be designed in a way that offers tighter code coverage to make sure new changes are effectively tested.

The goal we want to have in mind is to increase the testability of the software so it can be expanded as the application matures.

Choose the right automation solution

Selecting the right automation tool might seem overwhelming. There are both open source and proprietary options out there. Keep in mind when selecting a tool, the goal is to select one that meets your current needs, but is also constantly improving to take advantage of future trends and improvements. It should support basic optimization and support a wide range of programming languages, as well as be capable to integrate into popular CI software so that it can be viable in your pipeline.

Some popular open-sourced tools include Selenium for web automation testing and Appium for mobile testing. Commercial options include Eggplant, TestComplete, and our own TestArchitect. Equally important is to have the proper testing environment available. We want to have environments that have clean test data, so it would be beneficial to have our test environments on virtual machines that can be quickly spun up to test on, and then have their data wiped clean so that the next test run is started with a clean slate.

Integration with popular defect tracking tools can also provide feedback quickly back to the dev teams. We want to be able to have trackable results of issues caught during the automation runs so that they can be analyzed to determine if they are valid defects.

SEE ALSO: Java trends: Top 10 Frameworks in 2020

Get help

Hiring consultants to help with CI/CD implementation is very helpful. There are so many factors to consider when implementing a solution into your own organization. It is not simply buying an off-the-shelf product. Successful implementation requires customization into how your organization operates. It might mean changing how work gets done, so consulting subject matter experts who have experience in setting up these complex systems will go a long way in ensuring success.

Continuous Testing is essential in a CI/CD pipeline to ensure that testing can keep up with the rapid pace of development. We want to release software more frequently, but with higher quality. Those goals might seem to go counter against each other, but more frequent smaller releases can be achieved with higher quality.

Continuous Testing needs to be embraced from the beginning to get the most out of it. Testing needs to happen sooner and the quicker feedback can be received and analyzed, issues can be fixed. This will lead to higher quality and lower costs.

Tony Luu
Tony Luu has more than eight years of experience in QA and Software Life Cycle Development. Tony is currently a Senior Project Lead at LogiGear Corporation, and has lead project development for several clients, most notably including Linkedin, Cisco and LeapFrog. Tony received a Bachelor of Applied Science in Electrical and Electronics Engineering from Purdue University.

Inline Feedbacks
View all comments