Start typing keywords to search the site. Press enter to submit.
Generative AI
Cloud
Testing
Artificial intelligence
Security
The demand for continuous feedback has created a renewed focus on test automation, for example due to developments within IT technology as a whole and commercial aspects. The popularity of agile approaches, from Scrum to DevOps and agile at scale, is one of the main drivers of this development. There is a need for continuous improvement and “quality at speed,” which consists of three pillars: shift-left, continuous testing, and continuous feedback loop.
Automate everything you can is one of the six DevOps principles. Nevertheless, we still see many teams struggle with effectively applying automation in testing. One of the reasons is that it is often only focused on automating the execution of test scripts instead of the broader scope of automation in testing. For example, when people talk about test automation, people tend to directly select a test automation tool and try to use this to automate their current manual test script. They forget to look at things like: which people will work with it, what problem they are solving with automation, what is the value of automation for the business, and what is the impact on the current process. Implementing the tool becomes the goal on its own instead of improving the quality of products, processes and people.
Automation in testing is one of the main opportunities to meet the need for speed. Still, it also requires a structured approach with accelerators to realize such a vision effectively. This can be achieved by addressing challenges like business alignment and automation maintenance.
In this chapter, we discuss which quality engineering & testing activities should be automated and which test varieties should be organized (supporting shift-left). We describe the following subjects: continuous testing, current test automation solutions, test orchestration (supporting continuous feedback loop), smart frameworks, and “everything” as code automation.
For more in depth information about organizing test automation read the building block “Organizing automation of quality engineering“.
To maximize the value of automation in testing, it is essential to treat your test script code the same way you treat production code. Make the scope explicit and consider future changes to this scope. The scope can cover systems, test varieties, or teams using automation. Determine the main, business-oriented, goal the automation contributes to and identify how progress towards this goal is measured. For example, when your business goal is to shorten your time to market, your related automation goal can be to improve efficiency, a way to measure this is the lead time from the refinement of a user story until having it available for the users in the production environment. In other words, we are not measuring the automation level or the number of automated scripts but we focus on the end goal and check whether automation contributes to that.
When you have set the pursued business value and the objectives of the automation, you can focus on the organizational and technical needs. Think of a proof of concept (PoC) and tool selection, ownership, infrastructure setup, team members’ training, and budgeting.
People, not tools, are critical to successfully implementing automation in testing. A lasting business value should be achieved with an effective and sustainable solution, this is not something tools can do without human effort. Therefore, stakeholders must know about automation and the importance of automation. Roles and responsibilities must be clear, and people are aware of their roles. Different expertise need to work together; critical skills required are:
Often this is not something that one person can do on their own, collaboration is key.
Team members often struggle to determine what to test manually and what to check with automated test execution. The testing pyramid [Cohn 2009] can be used to decide on which level to automate. The basic message of this testing pyramid is that feedback should be collected as early as possible with automated checks as much as possible in the code and not via the user interface. And when deciding on test varieties, many testers find great support in the testing quadrants [Marick 2003, Crispin 2008]. Both models can be adjusted to a specific DevOps situation. The adjusted pyramid or adjusted testing quadrants are often described in the way of working or Definition of Done in DevOps or – at a higher level – are included in a Quality & Test policy. As an example, we have added our adjusted models.
Read more in the
A specific subject in a test strategy for DevOps is the automation of checks. Since DevOps usually coincides with continuous delivery, most checking should be automatically performed during the process. Most test execution tasks should be automatically performed during the continuous integration and continuous delivery or continuous deployment process. Therefore, the term continuous testing is often used.
Continuous testing is more than just automating tests. It is about the integration of test automation in the fundamental DevOps activities and into the CI/CD pipeline, focused on getting feedback on the system’s quality before and during delivery and deployment.
In specific situations not all automated testing will be within the scope of the involved teams. For example, when testing COTS systems, SaaS systems, legacy systems, or with a particular pipeline of which certain test varieties (such as unit testing) cannot be a part. In that case teams can collaborate as a virtual team or separate teams such as system teams or shared services can take that responsibility.
Continuous testing puts the proper amount of test automation (based on the risks to be covered) in the CI/CD pipeline. To achieve continuous testing, it is essential to focus on executing the proper tests at the right time and speed. A well-thought-through test strategy therefore is essential.
A step that will help immensely in moving towards continuous testing is the auto-generation of test cases. Today, the creation of test cases is a time-consuming, manual process and auto-generation of test cases can cut down this time significantly while adding value to the testing process. Moreover, auto-generation techniques can focus on designing test cases based on user requirements, rather than the created code. This approach has proven to be helpful in improving product quality and reducing rework as the tests are designed with the intended functionality in mind. Many organizations have already moved to using techniques such as model-based testing with the help of tools commonly available on the market.
Another step that will help move towards continuous testing is cloud adoption by virtualizing the entire test environment. Additionally, DevOps teams do not need to provision entire environments as they can use service virtualization tools to virtualize parts of the environment that are either unavailable for testing, are still in development, or are third-party services. With automation, complete, ephemeral (volatile) test environments can be created on demand and decommissioned when testing is complete, reducing both the time as well as the expenses associated with maintaining environments. Cloud technology can help with this, and the adoption of cloud for the creation of virtual test environments is a logical next step for automating the delivery pipeline. For more information about infrastructure please refer to the chapter on DevOps Infrastructure.
To achieve continuous testing, there are certain prerequisites that must come into place:
There are a number of ways test automation is currently done. Depending on the time already spent by an organization this ranges from “green field” situations, where test automation has been discarded in the past or never got started due to technical challenges, to a variety of legacy or unstructured test automation approaches. Current test automation approaches can be grouped as follows:
DefinitionTest orchestration is the alignment of a large number of test automation tasks and other quality assurance related tasks for all teams involved in a CI/CD process, for optimized test execution. This term refers to both the process of orchestration and the technical implementation thereof in the pipeline.
The need for continuous improvement of test speed, coverage and quality has led to a situation in which organizations have “islands of automation” in their IT delivery lifecycle that are chained together with manual processes. Since the entire system can move only as fast as its slowest component, the whole process is unable to scale up to the demands of efficiency and speed.This situation is further complicated by increasingly complex architectures and the lack of visibility for all teams into the development pipeline.
The quality and test policies are enablers for test orchestration as they align test automation activities over teams, which is a precondition for gathering information for real-time end-to-end-focused dashboards that inform about the confidence to establish the pursued business value.
The next step is to address silos of automation with orchestration. In the realm of testing, test orchestration eliminates “islands of automation” by combining manual and automated tasks in a holistic fashion. It links together individual, automated tasks, which helps organizations move from spending time on manual handoffs, dependencies, wait times, and cycle waste to one in which test generation and execution are fully integrated as part of a fully automated and optimized continuous delivery (CD) pipeline.
Testing today is more a sum of moving parts that need to be orchestrated together perfectly to achieve “quality at speed.” Organizations also want to orchestrate tests as part of a release. Test results and quality data can serve as feedback for the quality and risk of the release, as well as the efficiency of IT delivery as a whole. Orchestration also means that the teams must think about the best and fastest way to get feedback. This means on what level we automate the testing and what tests are run at what time, not all tests need to run every time.
In this context, one way to better view the continuous testing within the CI/CD pipeline is to use customized dashboards, a practice adopted by many DevOps teams and organizations. These dashboards give an insight into whether the quality risks that need to be covered have indeed been covered before (parts of) the IT system is (are) deployed to the following environment.
Another promising development is the rise of artificial intelligence (AI) technologies that provide “smart” test orchestration. In the near future, with the addition of machine learning capabilities, systems will be able to automatically determine the tests required in the release and production cycles.
In order to realize test orchestration in DevOps:
Good orchestration helps create a coherent QA and test strategy across teams and optimizes the use of test automation and test environments. It also gives business owners a continuous view of the actual E2E state of quality in their core processes and applications. This is an approach that covers each activity and task in the release. These activities incorporate both dev and testing and allow testing tasks to be incorporated into each activity in DevOps. Audit trails are compiled as a result of these fully tracked processes. As the release progresses through the orchestrated pipeline, real-time information is available to every person in DevOps in a single source of truth. As each task is completed, it can be automatically moved to the next task if all requirements are met (i.e., if all tests are passed) or the person or team responsible for the next manual task can be automatically alerted, and reminders and alerts are provided and escalated if tasks are taking too long. This shortens wait times and encourages collaboration across teams.
Test automation has been around for about three decades. Most automation frameworks are designed to automate manual steps but are not intelligent. They are unable to react to changes, dynamically generate the resources they need, or understand and interpret results.
In our view, the next step in test automation will be if people think of it less as a capability, and more as a platform – as a broad, connected, and intelligent space. When all tools and functions occupy a common environment, they can talk to one another to drive a full lifecycle value proposition, rather than remain focused on just one particular activity. When that point is reached, test automation will be smart, and broader, business-driven benefits can be given the priority they deserve.
When you want to design a smart automated framework (refer to The World Quality Report), keep in mind that an intelligent automation framework:
There is of course more than test automation in DevOps. Developing software efficiently, especially with cloud, requires one to automate everything that is repeated. This is done by defining the following as much as possible as code:
Related Building Blocks
Performing topics explained for DevOps
Continue to: