my journey as a developer
DESCRIPTION
How I learnt to release high quality software frequently. I started with no test automation and now I have CI and CD for all projects.TRANSCRIPT
“Software and cathedrals are much the same – we first build them, then we pray.”
- Samuel T. Redwine, Jr.
5
Code first is hard
12
Adding tests after the code is implemented without unit testing in mind is hard!
So much better
15
• Easier to write unit tests
• A lot less manual testing
• Faster releases
• Easier maintenance
Tdd: not a silver bullet
17
Unit tests cover a lot of things; but a lot of bugs happen in interaction between
units.
But now business can’t read my test cases
25
No manual testing means
No test cases which means
Hard to verify behavior by the business which means
Programmers could write the wrong thing
Self testing code: no silver bullet
26
• You misunderstand the requirements
• You write the wrong test
• You write the wrong code to pass the wrong test
• You have a green test suite
• But you’ve implemented the wrong thing
“The most important single aspect of software development is to be clear about what you are trying to build.”
– Bjarne Stroustrup
27
Behavior Driven Development Benefits
30
• Getting verification from BAs
• Automated regression suite defined by BAs
• Always up-to-date software requirements
• YAGNI
Continuous Integration
35
• Integrate the code frequently
• Build the code on each commit
• Run the fast tests on each commit
• Run the slow tests on schedules
CI Rules
36
• Fixing red CI is the highest priority
• If you break the build, you do push ups
• No one pulls from a red build
• No one pushes to a red build
Push to production continuously
39
If everything is tested and verified properly, then you can push it to
production at any time!
THANK YOUMehdi KhaliliSenior Consultant @ ThoughtWorks
www.mehdi-khalili.com@MehdiKhalili