Book Image

Mastering Chef

By : Mayank Joshi
Book Image

Mastering Chef

By: Mayank Joshi

Overview of this book

Table of Contents (20 chapters)
Mastering Chef
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
2
Knife and Its Associated Plugins
10
Data Bags and Templates
Index

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 individual software modules are combined and tested as a collective group. During the integration test, input modules that have already been unit tested are taken as input, grouped into larger aggregates, and the tests defined in the integration test...