Shift-left Testing
   HOME

TheInfoList



OR:

Shift-left testing is an approach to
software testing Software testing is the act of examining the artifacts and the behavior of the software under test by validation and verification. Software testing can also provide an objective, independent view of the software to allow the business to apprecia ...
and system testing in which testing is performed earlier in the lifecycle (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 (including identifying, localizing, fixing, and regression testing defects) as more software is produced and integrated. * Reduced
code coverage In computer science, test coverage is a percentage measure of the degree to which the source code of a program is executed when a particular test suite is run. A program with high test coverage has more of its source code executed during testing, ...
during testing as a result of encapsulation impeding
white-box testing White-box testing (also known as clear box testing, glass box testing, transparent box testing, and structural testing) is a method of software testing that tests internal structures or workings of an application, as opposed to its functionality ...
. * A “bow wave” of
technical debt In software development, technical debt (also known as design debt or code debt) is the implied cost of additional rework caused by choosing an easy (limited) solution now instead of using a better approach that would take longer. Analogous with ...
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 The V-model is a graphical representation of a systems development lifecycle. It is used to produce rigorous development lifecycle models and project management models. The V-model falls into three broad categories, the German ''V-Modell'', a g ...
). 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 with record and playback tools), traditional shift-left concentrates on
unit testing In computer programming, unit testing is a software testing method by which individual units of source code—sets of one or more computer program modules together with associated control data, usage procedures, and operating procedures&md ...
and integration testing (e.g., using API testing 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 and
DevOps DevOps is a set of practices that combines software development (''Dev'') and IT operations (''Ops''). It aims to shorten the systems development life cycle and provide continuous delivery with high software quality. DevOps is complementary to ...
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 Test-driven development (TDD) is a software development process relying on software requirements being converted to test cases before software is fully developed, and tracking all software development by repeatedly testing the software against al ...
(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