The ability to deliver software to production speedily and reliably is critical to supporting a disruptive business landscape and covering implementation gaps. A key factor inhibiting this is testing. DevOps practices encourage shifting left, i.e., testing more during development using unit and component test rather than with QA using end-to-end tests. However, unit and component testing lack functional coverage that may exist in QA end-to-end tests. Shifting left with a domain focus may lead to component and unit tests that don't just guarantee that the software is built right but also that the right software is build.
3. Lead Time
Dev QA OPS
● Build
● Build-time tests
● Dev e2e tests
● Functional &
non-functional
tests
● Deployment to non-prod
environments
● Operate & monitor
Dev
Code
Commit
Deploy in Dev
Test in Dev
Deploy in QA
Test in QA
Deploy in UAT
Test in UAT
Prod
Lead Time
4. Lead Time
Lead Time = ∑Deployment Time + ∑Testing Time
● Reducing deployment time
– Automating deployments
– Reducing deployment errors
● Reducing testing time
– Faster tests
– Reliable tests
– Higher overall code and functional coverage
8. Ice Cream Cone Anti-Pattern
● Siloed QA focused on or tasked with testing.
● Legacy untestable code.
● Systems largely composed of third party
services.
10. End-to-End Testing Challenges
● Testing speed and throughput
– Test independence leads to larger, slower tests with
multiple common steps.
● Smart automation tools may compress tests.
– Test failures may leave environments in unstable
state.
11. Shifting Left to Accelerate
● More testing at build and pre-build stages.
– Developers to test within IDEs prior to commits and
merges.
● Increasing coverage to the tests on the left.
– Tests on the right to focus on integration.
Code
Commit
Deploy in Dev
Test in Dev
Deploy in QA
Test in QA
Deploy in UAT
Test in UAT
Prod
Increasing tests progressively to the left
12. Confidence in Testing
● Reliability
– Tests produce same results for given inputs and a
specified state of the system and the environment.
● Coverage.
– High code coverage.
– Complete functional coverage.
13. High Code Coverage Controversy
● Advantages,
– Tests cover majority of code.
– Code is testable, hence SOLID.
● But not a guarantee for fewer functional
defects,
The code may be built right but is it the right
code?
14. Quality Loopback
● Domain inclusive left shift.
– Aligning unit and component tests to the acceptance
criteria.
● Detecting functional and technical issues early
in the development process.
● Reduces the need for large number of end-to-
end test.
15. Quality Loopback Tools
● Acceptance criteria to build tests.
● Code reviews with testing evidence.
● Test coverage.
16. Looping Back In Legacy Code
● Bugs and end-to-end test failures to be
reproduced in unit and component tests.
● Incremental refactoring of legacy code for
testability.
● Consolidating end-to-end tests.
17. Challenges and Opportunities
● Mapping acceptance criteria to units, components,
microservices, etc. can be challenging.
● Stronger QA and development collaboration.
● Testable design and implementation leading to loosely
couple applications.
● Reduced lead time.