Shift-Left Testing Strategy: A practical method to find bugs earlier and at lower cost
Shift-Left Testing Strategy Practice Guide - Advance testing to the early stages of development, covering requirements review, TDD, static analysis, Code Review and other methods to fundamentally reduce software defects and repair costs
This article introduces the general practice of Shift-Left testing strategy. The actual import method needs to be adjusted according to the team situation.
What is Shift-Left testing
Why Shift-Left is important
-
›
demand stage
Discovery: Repair cost 1x
-
›
design stage
Discovery: Repair cost 5x
-
›
development stage
Discovery: Repair cost 10x
-
›
testing phase
Discovery: Repair cost 20x
-
›
After going online
Discovery: Repair cost 100x
Five practices for Shift-Left
-
›
testable
Check whether the requirements are testable: vague requirements cannot write clear test cases
-
›
Contradictions and Omissions
Find out the contradictions and omissions in the requirements: whether there are conflicts between different functions
-
›
borderline situation
Raise edge cases: extreme situations that the PM may not have thought of
-
›
Acceptance criteria
Confirm acceptance criteria: Each User Story has a clear definition of Done
-
›
Automated testing
Is this architecture easy to automate testing?
-
›
Observability
How to: Are logs, metrics, and tracking sufficient?
-
›
fault injection
Is it feasible: Can various failure scenarios be simulated?
-
›
test environment
Requirements: Do you need special testing infrastructure?
-
›
Write the test first
Write failed test cases based on requirements
-
›
Rewrite the program
Write the minimum amount of code to make the test pass
-
›
Refactor
Optimize code structure under test protection
-
›
Static analysis tools
SonarQube, ESLint, and Pylint automatically check code quality
-
›
security scan
Snyk, OWASP Dependency Check check vulnerabilities
-
›
QA participates in Code Review
Review the program code from a testing perspective, such as whether error handling is complete and whether boundary conditions are handled
-
›
Pre-commit Hooks
Automate unit testing and linting before submission
-
›
Unit testing
Must run for every submission, coverage threshold (e.g. 80%)
-
›
Integration testing
Every PR must be run to ensure normal interaction between modules
-
›
E2E testing
The core process must be run before merging into the main branch
-
›
Performance testing
Execute regularly to prevent performance degradation
Common challenges with importing Shift-Left
Measuring the effectiveness of Shift-Left
-
›
Defect escape rate
Proportion of bugs discovered after launch to total bugs (goal: continuous decrease)
-
›
Defect distribution at each stage
Ratio of bugs discovered during the requirements and design phases (goal: continue to increase)
-
›
mean time to repair
Time from bug discovery to fix (goal: continuous reduction)
-
›
test coverage
Changes in coverage of unit tests and integration tests
FAQ
The transformation of QA’s role in agile teams: from gatekeeper to quality coach
QA Practical Guide to Agile Transformation - the role change from gatekeeper to quality coach, covering QA responsibilities in the Scrum ceremony, collaboration model with development, and Definition of Done formulation methods
How to choose a test automation framework: Selenium vs Cypress vs Playwright complete comparison
Test Automation Framework Selection Guide - An in-depth comparison of the advantages, disadvantages and applicable scenarios of Selenium, Cypress, and Playwright to help you choose the most suitable framework from the perspective of team technology stack and maintenance costs.
QA 工程師的一天:從手動測試到自動化的完整流程
分享 QA 工程師的日常工作,從需求分析、測試案例設計、手動測試執行到自動化測試導入的完整經驗。
General Disclaimer
The information provided on this site is for reference only. We do not guarantee its completeness or accuracy. Users should determine the applicability of the information on their own.