O'Reilly logo

Mastering Chef by Mayank Joshi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Types of tests

The following are the two main categories of tests that are written by developers:

Unit tests:

These tests are meant to test an individual component and such testing is also known as "component testing". Ideally, each test case is independent of the other. It's written to ensure that the code meets its design and behaves as intended.

Unit tests are usually written before the code is written. When the tests pass, the code is considered to be complete. In case the test fails, it's an indicator of a bug in the code or test itself.

The following are the key points related to unit tests:

  1. Tests only a single component.
Does not require other components.
  2. Should be fast.

Integration tests:

Integration testing is a phase in software testing where ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required