- Write unit tests as examples to other developers of how to use the underlying Fluid code. Chose Choose names in tests carefully to communicate clearly to other developers.
- Keep tests short so that future breakages point directly to the problem.
- Write unit tests for all common cases. Cover edge cases in your tests as well but balance these with the diminishing returns of the test and the cost of creation.
- When fixing a bug, write a unit test that proves the bug fix has worked and remains fixed.
- Ensure changes in implementation do not require a full rewrite of the unit tests.
Functional testing strategy
Functional tests cannot take the place of testing with real users. However, there are some benefits to having functional tests.
What will functional tests do for us?
- Capture interaction design requirements in code and provide regression for them.
- Test a solution end to end from the perspective of a user.
- Ensure less used but important functionality (such at as keyboard alternatives) remain in working condition.
I intend to look into Windmill by writing similar tests to determine which tool is better suited to the work that we are doing.
Any other tools that people have used and recommend?