Unit Testing Anti-Patterns

Software development consists of many stages and if bugs are caught in the earlier stages it costs much less to fix them. That is why it’s important to get testing done as soon as possible. In this article, I’ll write about unit testing anti-patterns because they also exist, and there are many. All these patterns are based on several posts like stackoverflow.com.

1. Terminology

There many versions of the testing pyramid but I will focus on the definition of the test pyramid as presented below.

               '
              /=\
             /===\
            /=====\
           /==E2E==\
          /=========\
         /===========\
        /=INETGRATION=\
       /===============\
      /=================\
     /=======UNIT========\
    /=====================\

Therefore the two major test categories mentioned as unit and integration tests from now.

Test Focus on Require Speed Complexity Setup needed
Unit test class, method the source code very fast low No
Integration test component, service part of the running system slow medium Yes

2. Software Testing Anti-Pattern List

3. Conclusion

In this article, we seen Unit Testing Anti-Patterns. It is possible to find redundant patterns or repeated ones with other names. If you spot an error, please comment.