This document contains advice from Marcin Dryka on test-driven development (TDD) and best practices for writing unit tests. Some of the key points made include:
1. TDD is a design process, not just a testing process. Tests should describe desired functionality before writing code.
2. Tests should have single, well-defined purposes and only test one interaction at a time. Avoid complex logic in tests.
3. Mock external dependencies but not the system under test. Tests should be deterministic and independent from each other.
49. Mike Holford, Angelina Litvin, Eric
Parks, Daniil Silantev, Caleb Martin,
Harm Weustink, Kelly Sikkema, Billy
Pasco, Luis Perdigao, CloudVisual,
Sergey Pesterev, Søren Astrup
Jørgensen, Andrew Rice, James
Fuller, Matthew Smith, Ambitious
Creative Co. - Rick Barrett,
Armando Tobar, Vincent van
Zalinge, Edouard TAMBA, Patti
Black, Jeffrey Hovland, Cris Saur,
Emiel Molenaar, Dominik Scythe,
chuttersnap, Tom Pumford
Editor's Notes
wyjaśnienie ficzera, zarówno wcześniej, jak i później. Dokumentacja
zaprojektowanie wewnętrznej jakości aplikacji
sprawdzenie wyników działania (testowanie)