11

Unit Testing

Unit testing is a software testing technique that involves testing individual units or components of a software application in isolation, ensuring that they work correctly. These units are typically minor testable software parts, such as functions, methods, or classes. The primary purpose of unit testing is to validate that each unit of code performs its intended functionality as expected.

In this chapter, we’re going to cover unit testing by looking at the following main topics:

  • The principles of unit testing
  • The advantages of unit testing
  • Unit testing frameworks
  • An example of enterprise secure unit tests

By the end of the chapter, you will have learned the benefits of unit testing and how it can contribute to more secure ...

Get Security-Driven Software Development 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.