Different types of automated tests

There are many different types of automated tests, but we will consider and talk about only three categories of such tests as listed here:

  • Unit testing
  • Integration testing
  • End to end testing

Unit testing

Unit tests are usually designed to test the functionality of individual pieces of our code in isolation. This usually means testing our functions and methods, one at a time, to make sure they do exactly what is expected of them.

We usually write such tests in a manner that can verify the functionality of our methods and individual pieces of our code in various scenarios.

There are two main styles of writing unit tests; Test Driven Development (TDD) and Behavioral Driven Development (BDD).

Let's have a simplified overview ...

Get Modular Programming with JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.