Shift-left testing is an approach to
software testing and
system testing
System testing is testing conducted on a complete integrated system to evaluate the system's compliance with its specified requirements.
System testing takes, as its input, all of the integrated components that have passed integration testing. ...
in which testing is performed earlier in the
lifecycle
Life cycle, life-cycle, or lifecycle may refer to:
Science and academia
* Biological life cycle, the sequence of life stages that an organism undergoes from birth to reproduction ending with the production of the offspring
*Life-cycle hypothesis ...
(i.e. moved left on the project timeline). It is the first half of the maxim "test early and often". It was coined by Larry Smith in 2001.
Harm because of late testing
Shift-left testing aims to prevent the following types of harm because of late testing:
* Insufficient resources allocated to testing.
* Undiscovered defects in requirements, architecture, and design, along with significant effort wasted while implementing them.
* Difficulty
debugging
In computer programming and software development, debugging is the process of finding and resolving '' bugs'' (defects or problems that prevent correct operation) within computer programs, software, or systems.
Debugging tactics can involve in ...
(including identifying, localizing, fixing, and regression testing defects) as more software is produced and integrated.
* Reduced
code coverage during testing as a result of
encapsulation impeding
white-box testing.
* A “bow wave” of
technical debt that can cause a project to fail.
Types of shift-left testing
There are four basic ways to shift testing earlier in the life-cycle (that is, leftward on the classic
V-model). These can be referred to as traditional shift-left testing, incremental shift-left testing, Agile/DevOps shift-left testing, and model-based shift-left testing.
Traditional shift-left testing
As illustrated in the following figure, traditional shift-left moves the emphasis of testing lower down (and therefore slightly to the left) on the right hand side of the classic V model. Instead of emphasizing acceptance and system level testing (e.g.,
GUI testing
In software engineering, graphical user interface testing is the process of testing a product's graphical user interface (GUI) to ensure it meets its specifications. This is normally done through the use of a variety of test cases.
Test case gen ...
with record and playback tools
), traditional shift-left concentrates on
unit testing and
integration testing
Integration testing (sometimes called integration and testing, abbreviated I&T) is the phase in software testing in which individual software modules are combined and tested as a group. Integration testing is conducted to evaluate the complianc ...
(e.g., using
API testing
API testing is a type of software testing that involves testing application programming interfaces (APIs) directly and as part of integration testing to determine if they meet expectations for functionality, reliability, performance, and security. ...
and modern test tools). The transition to traditional shift-left testing has largely been completed.
Traditional-Shift-Left.jpg, Traditional shift-left testing
Incremental shift-left testing
As illustrated in the following figure, many projects developing large and complex software-reliant systems decompose development into a small number of increments (Vs) having correspondingly shorter durations. The shift-left illustrated by the dashed red arrows occurs because parts of the single, large waterfall V model’s types of testing (shown in gray) are shifted left to become increments of the corresponding types of testing in the smaller incremental V models. When each increment is also a delivery to the customer and operations, then incremental shift-left testing shifts both developmental testing and operational testing to the left. Incremental shift-left testing is popular when developing large, complex systems, especially those incorporating significant amounts of hardware. Like traditional shift-left, the transition to incremental shift-left has also been largely completed.
Incremental-Shift-Left.jpg, Incremental shift-left testing
Agile/DevOps shift-left testing
As illustrated in the following figure,
Agile
Agile may refer to:
* Agile, an entity that possesses agility
Project management
* Agile software development, a development method
* Agile construction, iterative and incremental construction method
* Agile learning, the application of incremen ...
and
DevOps projects have numerous short duration Vs (sprints) in lieu of a single or small number of V as in the previous two examples of shift-left testing. These small Vs would also be modified if one or more early sprints are used to block out the basic requirements and architecture or if test-first and
test-driven development (TDD) are being performed. The shift-left occurs because the types of testing on the right sides of the earliest of these tiny Vs are to the left of the corresponding types of testing on right side of the larger V(s) they replace. While the following figure appears remarkably the same for Agile and DevOps, Agile testing is typically restricted to developmental testing and does not include operational testing, which occurs once the system is placed into operation. The transition to Agile/DevOps shift-left testing is currently popular and ongoing.
Agile_DevOps_Shift_Left_Testing.jpg, Agile/DevOps shift-left testing
Model-based shift-left testing
The previous forms all concentrated on testing earlier in the development cycle. However, they all test ''after'' software exists and seek to uncover only implementation defects.
Model-based testing moves testing to the left side of the Vs, by testing requirements, architecture, and design models. This shift begins testing almost immediately, instead of waiting a long time (traditional testing), medium time (incremental testing), or short time (Agile/DevOps) for software to become available to the right side of the Vs. This trend is just beginning.
Model-Shift-Left.jpg, Model-based shift-left testing
References
External links
"Shift Left" Devopedia
{{Software testing
Software testing