Eli Aleyner - @ealeyner
× × × ×
Co-founder AtomicJar Inc Founding team @AWS Founding team @Bing.com
Slide 7
shownotes
× × × ×
speaking.jbaru.ch Slides Video All the links!
Slide 8
Slide 9
Slide 10
Don’t ruin the flow
Slide 11
“The build takes forever, I am distracted to do other things and the context switch is terrible”
Slide 12
Slide 13
Don’t frustrate the developers
Slide 14
“we have a flanky test, it is irrelevant 99.5% of the time , but it always runs and it is last in the suite”
Slide 15
Slide 16
Don’t boil the frog
Slide 17
“I have a feeling that everything is slower somehow…”
Slide 18
Slide 19
Developer Productivity == A/M Autonomy
/P == motivation
Tools and people aren’t in my way
Mastery
Tools and processes help me to excel
Purpose
I want to be productive, i.e. create the product
Slide 20
Developer productivity Enginee
ring!
Slide 21
Developer Productivity Enginee Foster Faster Feedback
Collaborate through Effective Tooling
Eliminate Toil for Developers
Dedicated Organizational Mindset
ring Embrace Rigorous Observability for Proactive Improvement
Prioritize Automation and Eliminate Bottlenecks Outcomes Over Output
Slide 22
Talk is cheap, show me the goods! 22
Slide 23
Small DPE improvements make a × × × × ×
huge difference
Generate code faster: Better IDE Test better: Testcontainers Enforce better code: Sonar Test more reliably: Flaky test detection Foster Faster Feedback:
Slide 24
feedback efficiency × × × ×
IDE: Sub-seconds (I type, it marks it red) Build: Seconds CI: Minutes Production: Hours/Days
Slide 25
Reverse dependency on distance from developers IDE
Build
CI
Feedback Time
Faster
Slower Distance from Developers Expected
Production
Slide 26
Reverse dependency on distance from developers IDE
Build
CI
Production
Feedback Time
Faster
Slower Distance from Developers Expected
Real
Slide 27
Slide 28
It is slow!
Slide 29
Slide 30
It is slow and the developers h
ave no idea why!
Slide 31
What is build? × × × × ×
Project setup Downloading the Internet Artifact generation: Compilation, packaging, etc Tests Artifact deployment
Slide 32
What can go wrong? × × × × ×
Project setup Downloading the Internet Artifact generation: Compilation, packaging, etc Tests Artifact deployment
Slide 33
When can it go wrong?
At any time.
Slide 34
The Build frustrates the developers
Slide 35
Let’s ask Chatgpt
Slide 36
What the actual f*ck?!
× Skipping tests defeats the purpose of the build! × How about skipping compilation? × We want faster feedback, not less feedback
Two types of feedback x e.g., CI/CD x we never wait for it x results are distracting x e.g., build x we’ll wait for it in the flow x we’ll be pissed off when it’s slow
Slide 41
Reverse dependency on distance from developers IDE
Build
CI
Feedback Time
Faster
Slower
Distance from Developers
Production
Slide 42
Reverse dependency on distance from developers Faster
IDE
Build
CI
Feedback Time
Commit time synchronous asynchronous
Slower
Distance from Developers
Production
Delightful build (pick two): ☑ provides max feedback ☑ fast
Slide 46
Skip what can be skipped (but no more!)
Slide 47
Avoidance: Incremental build
× Don’t build what didn’t changed × Don’t build what isn’t affected
Slide 48
Avoidance: Incremental build s hortcomings × Relies on produced artifacts × Relies on architectural decisions
Slide 49
Avoidance: Caching
× × × ×
Makes the build faster Makes the build faster for everybody Makes the build faster always Makes all parts of the build faster
Slide 50
Slide 51
Avoidance: Predictive test selec tion × Learns code changes effects de-facto × Skips tests with high degree of confidence
Slide 52
How test prediction works × Code changes and test results are thrown into learning model × After a while, the model predicts which changes fail which tests
Slide 53
Test prediction
What changed Where it changed
Correlate with observed test failures
Predictions which changes will fail which tests
Slide 54
Black magic in action × The more tests a project has, the less they break × Refactorings in Java break tests less than in JavaScript
Slide 55
Slide 56
Speed up what can’t be skipped
Slide 57
Test parallelization
× Use max power of local machine × (Yes, your boss should buy you the bleeding edge)
Slide 58
Slide 59
Test distribution
× × × ×
CI uses fan-out to speed-up tests Shouldn’t you enjoy it for local tests? Use the cloud to distribute test load RUN ALL THE TESTS!
Slide 60
Why not just using ci fan-out ?
× Relying on shared CI infrastructure × CI infrastructure is not optimized for real-time feedback! × Are the agents as fast as they can be?
Slide 61
Don’t let it slide
Slide 62
Observe and improve
× Measure local build times across time and environments × Detect downfacing trends × Find root causes and improve
Slide 63
Slide 64
Same tradeoff for tests
expensive, slow, but prod-like Or naïve, useless, but fast
Slide 65
AWS S3 - Bunny!
× Integration Tests – as main quality gate × Creative, Relatable test status × Sad and depressed outcome over time
Slide 66
Why the Depressed bunny?
× Flakiness due to:
× Data, Deployments, Environment × Don’t care syndrome × Self-fulfilling prophecies
Slide 67
Delightful Test (pick two): ☑ Prod-like ☑ Local
Slide 68
Self contained tests are the a nswer × Real tests (not just mocks) × No dependency on centralized
resources × No interdependency of tests × Treated as code! Same life-cycle × Allow for clone-and-run
Slide 69
Ehe.. But how?
Testcontainers is the answer
Slide 70
Slide 71
Testcontainers is used by
Slide 72
Test against any database, message broker, browser… or just about anything that runs in a Docker container!
Slide 73
Very nais!
Slide 74
But We can Go Further! Foster Faster Feedback
Collaborate through Effective Tooling
Eliminate Toil for Developers
Dedicated Organizational Mindset
Embrace Rigorous Observability for Proactive Improvement
Prioritize Automation and Eliminate Bottlenecks Outcomes Over Output
Slide 75
Test Observability & Debugging Eliminate Toil for Developers
Embrace Rigorous Observability for Proactive Improvement Outcomes Over Output
Slide 76
Testcontainers Desktop: Batter
× × × ×
ies Included Freeze container shutdown Service configuration Enables re-usable containers Bonus: Embedded Runtime
Slide 77
Slide 78
Test Consistency , Repeatability & Scale Dedicated Organizational Mindset
Prioritize Automation and Eliminate Bottlenecks
Outcomes Over Output
Slide 79
Testcontainers Cloud: Consist
× × × ×
ent Experience for all
Apple-silicon? Windows? - No problem! Docker-in-Docker in CI? – No problem! Turbo mode – for parallelization Team and enterprise-wide visibility for your Testcontainers usage
Slide 80
Slide 81
How it works
Slide 82
Testcontainers is DPE: Foster Faster Feedback
Collaborate through Effective Tooling
Eliminate Toil for Developers
Dedicated Organizational Mindset
Embrace Rigorous Observability for Proactive Improvement
Prioritize Automation and Eliminate Bottlenecks Outcomes Over Output
Slide 83
The gains are real!
Slide 84
Slide 85
Slide 86
Learn more and try it today!
× × × ×
Take the Gradle/Maven Speed Challenge! Be DPE Agent of Change! Read the DPE Handbook! Watch the DPE Summit videos!
x
speaking.jbaru.ch