Selenium/Explanation/Anti-patterns

This list is not complete. Please help me complete it.


 * Never trust a test you did not see fail.

A good test:


 * Is as small as possible. While still providing value.
 * Is as simple as possible. It is more important for tests to be simple than DRY.
 * Tests as little as possible. When it breaks, it should be easy to find why.
 * Uses API for setup. As much as possible. It’s both faster and more robust.
 * Uses page objects. Exceptions are possible but not probable.
 * Doesn’t depend on others. Test suite should pass when tests are running in random order or in parallel.
 * Sets up it’s environment.
 * Users, pages, files...
 * It does not depend on the environment being in a certain state.
 * Is at a lower level.
 * What could be tested at a lower level should not be tested at a higher lever.
 * There should be as little high level tests as possible.

See also:


 * Selenium/Reference/Example Code
 * T246880 Software testing anti-patterns: Selenium
 * T234635 Wikimedia Technical Conference 2019 Session: System level testing: patterns and anti-patterns with Selenium
 * slides
 * reviewed repositories T234635
 * http://blog.codepipes.com/testing/software-testing-antipatterns.html
 * https://watirmelon.blog/testing-pyramids/