Test Automation Anti-Patterns


Test Automation Anti-patterns:

There is enough data out there which explains what testing anti-patterns are, we will look at some of the most interesting test automation anti-patterns here:

The first one and the most important one is the right amount of UI testing in the testing pyramid:


  • Whenever we talk to most stakeholders about test automation, they think about UI automation.
  • "A team is doing too much UI automation when they are finding NPEs (Null pointer exceptions) via their UI automated tests."
  • Manual Session based testing is a fancy way of saying exploratory testing
  • Automated API tests are the best bang for the buck wrt tests that are easy to write and stable and a reliable signal.
  • Integration Tests are always valuable; but we need to ration the number of integration tests one writes as they can be more difficult to debug and have a high noise factor due to all the moving pieces
  • Automated component testing allows one to test a particular component (server) in isolation. you mock everything else out and ensure this component behaves as intended
For more anti patterns in the testing pyramid like the ICE-CREAM CONE, CUPCAKE PATTERN , HOURGLASS, DUAL PYRAMID read this:


A similar catalog has been created for anti-patterns in unit testing

Some other classic test automation anti-patterns:
  1. Including business logic at the test case level instead of building a business layer. Existing pattern: Page Object Pattern
  2. Declaring page elements inline in test cases with locator information instead of in the business layer. Existing pattern: Page Object Pattern
  3. Sleeping for arbitrary amounts of time. Existing pattern: polling, explicit/implicit waits.
  4. Assertions as part of PageObject class Existing pattern:  PageObject just provides status of the element to the caller. The caller itself will verify the status
  5. Different Stack The automated tests (also test frameworks) are implemented using a different software stack than the SUT uses.
Good read: http://qabok.com/tdd-patterns-and-anti-patterns/

Source: 
https://docs.google.com/presentation/d/15gNk21rjer3xo-b1ZqyQVGebOp_aPvHU3YH7YnOMxtE/edit#slide=id.g437663ce1_53_98
http://sqa.stackexchange.com/questions/8508/what-are-anti-patterns-in-test-automation



Comments

  1. Very true and inspiring article, I strongly believe all your points. I also learnt a lot from your post. Cheers and thank you for the clear path.
    Selenium Training Chennai
    software testing selenium training

    ReplyDelete

Post a Comment

Popular posts from this blog

Software Testing @ Microsoft

Trim / Remove spaces in Xpath?