![Show Menu](styles/mobile-menu.png)
![Page Background](./../common/page-substrates/page0467.png)
— Vagrant
• Think through deployment painpoints: the database, static files, dependencies, how
to customise settings, etc.
• Build a CI server as soon as possible, so that you don’t have to rely on self-discipline
to see the tests run.
Relevant chapters:
Chapter 8,
Chapter 9 , Chapter 20 , Appendix CGeneral Testing Best Practices
• Each test should test one thing.
• One test file per application code source file.
• Consider at least a placeholder test for every function and class, no matter how
simple.
• “Don’t test constants”.
• Try to test behaviour rather than implementation.
• Try to think beyond the charmed path through the code, and think through edge
cases and error cases.
Relevant chapters:
Chapter 4,
Chapter 10 , Chapter 11Selenium/Functional Testing Best Practices
• Use explicit rather than implicit waits, and the interaction/wait pattern.
• Avoid duplication of test code—helper methods in base class, or Page pattern are
one way to go.
• Avoid double-testing functionality. If you have a test that covers a time-consuming
process (eg, login), consider ways of skipping it in other tests (but be aware of
unexpected interactions between seemingly unrelated bits of functionality).
• Look into BDD tools as another way of structuring your FTs.
Relevant chapters:
Chapter 17,
Chapter 20 , Chapter 21General Testing Best Practices
|
439