have to reason about what you‘re doing • It‘s not easy to write good and meaningful tests • No 100% guarantee that your code is bug free 13.10.2017 www.silverstrip.es 12
how to code • Repeatable – don‘t throw away your (manual) tests • Future investment • 90% less bugs in production • Bugs are found during development phase, not after shipping – That‘s cheaper 13.10.2017 www.silverstrip.es 14
– Structure – How the code should solve the given problem • Documentation of how your code is supposed to work • Makes you a better developer • Refactoring becomes easier 13.10.2017 www.silverstrip.es 15
your code, usually a method • Component tests – Bigger unit, – might use database – takes longer to run • Functional test – End to end, incl. GET / POST request etc.. 13.10.2017 www.silverstrip.es 21
Run that test – Watch it failing • Write code to fulfill your test • Run the test again – Watch it passing • Refactor your code 13.10.2017 www.silverstrip.es 23
test • You have to reason about the existing code • Tests create a backlog for technical debt – Technial debt is a bad thing that backfires. Always • Proof that legacy code works – or not • A safeguard for refactoring 13.10.2017 www.silverstrip.es 30