%%
date:: [[2021-02-22]], [[2021-02-25]], [[2021-03-30]], [[2021-05-06]], [[2023-05-09]]
parent:: [[Shift-left]]
%%
# [[Shift-left testing]]
Shift-left testing is a movement based on traditional [[Waterfall]] [[Work Methodologies|methodologies]], where "shifting an activity left" meant moving it earlier within a [[Software Development Lifecycle|SDLC]]. As the testing industry has moved into [[Agile]] methodologies that are more cyclical, the term has stuck around and has come to mean incorporating testing into existing activites like [[Requirements|requirements]] gathering and [[Software Development]] as well as just generally testing earlier.
![[Shift-Left Testing - Wikipedia#^145418665]]
Shift-left testing initially meant testing before or during coding, but has now evolved to mean testing even earlier, in the architectural design phase.
## Benefits of shift-left testing
- Since defects are discovered earlier, they can be fixed earlier and more cheaply because the cost to fix increases with the defect lifespan-- from about $80 for a defect found in development to $7,600 for one found in production. [^bmc]
- It [[Minimize the blast radius|minimizes the blast radius]] of a defect by increasing its chances of being discovered during unit and system testing, before application components and their resulting complexity are added.
- It gives testers more time to do their jobs by allowing testing to occur simultaneously with other activities.
## Main criticism of shift-left testing
Both shift-left and [[Shift-right testing]] were originally conceived in relation to the [[Waterfall]] model, where the [[Software Development Lifecycle|SDLC]] was linear. However, most modern development has morphed into [[Agile]] models that are more cyclical, lending ambiguity to the terms "shift-left" and "shift-right".
Some argue that the concept of shift-left testing still holds, which is that testing should be done earlier for every new feature. In this regard, "shift-left" means testing during the Dev loop of the DevOps cycle, and "shift-right" means testing during the Ops loop. [^crispin] Shifting left can also be thought of in terms of features rather than cycles; shifting left can mean thinking about testing earlier in the design process of a feature, regardless of work cycles. [^simme]
[[Continuous Improvement|Continuous Testing]] is generally considered to be the alternative, [[Agile]] counterpart to shift-left testing.
## Shift-left [[Design]]
- Involving testers in the ideation phase, when a new product or feature is being specified
- Testing during the design phase enables demand planning, which informs [[Operational testing]] activities later on.
## Shift-left [[Requirements]] Analysis
- Questioning whether the plan, including resources, budget, and test strategies, are appropriate for the objective and feasible
- Giving TestOps advanced warning on infrastructure that will need to be set up for the types of testing the new feature will require
## Shift-left [[Software Development]]
- Code profiling with performance in mind (awareness of CPU and memory consumption)
- [[Test-Driven Development]]
- [[Root cause]] analysis
- Unit testing
- Performance testing (front-end and back-end)
## Shift-left [[Functional testing]]
- Review requirements and user stories before code is written
- [[Test-Driven Development]]
## Shift-left performance testing
- Test [[Frontend performance testing|front-end performance]] along with back-end.
- Empower and encourage business users, functional testers, and developers to run performance audits, especially with [[Frontend performance testing]] tools.
- Add performance testing to a [[Continuous Improvement|CICD]] pipeline.
- Examine application design documents, including architectural diagrams.
- Set up test environments, test data, etc. instead of relying on other teams, so that they can test earlier
- [[Raw data]] analysis
![[How to Go From Performance Tester to Performance Engineer - TechBeacon#^83298543]]
## See also
- [[How to Go From Performance Tester to Performance Engineer - TechBeacon]]
- [[Shift-Left Testing - Wikipedia]]
- [[It's Time for Shift-Left Performance Testing]]
## References
[^bmc]: [Ponemon Institute (2017)](https://www.ibm.com/account/reg/us-en/signup?formid=urx-46992) via [[Shift Left Testing - What, Why & How to Shift Left]]
[^crispin]: [[Lisa Crispin]] via [Mabl](https://www.mabl.com/blog/shift-left-shift-right-shifting-and-why)
[^simme]: Aronsson, S. (2021). _Shift-left testing and creating a culture of quality with Simon Prior (k6 Office Hours)_. Accessed in May 2021 from the [k6 YouTube channel](https://www.youtube.com/watch?v=w4pqfr5cu_4&t=2221s).