Giter Club home page Giter Club logo

ukhomeoffice.testing-guide-for-developers's Introduction

#Testing Guide for Developers

##Guiding principles (1) use the Testing Pyramid - you should have many more unit tests than UI tests

alt text

Unit tests are good because:

  • they are fast
  • they are reliable
  • they isolate failures

Acceptance tests may be UI tests, but end-to-end tests always are. Minimise UI tests! They are expensive to write, time consuming to run, and sometimes non-deterministic (ie there are often false positives) and brittle (easily broken). They can be useful but we shouldn't have many of them. If they fail and expose a bug, unit test(s) should be written to address the failing scenario first.

Google reported how end-to-end testing had the following problems:

  • difficult to find root cause of problems
  • partner failures and lab failures ruined the test results
  • many smaller bugs were hidden behind bigger bugs.

Ease of fixing bugs (mean time to repair) should be prioritised over having fewer test failures.

Interesting reading

Google blog - just say no to more end to end tests End to end testing considered harmful Yet another testing pyramid Ice Cream Cone anti-pattern

ukhomeoffice.testing-guide-for-developers's People

Contributors

jcavell avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.