Unit testing
Unit Testing in Visual Studio
Unit Testing in Visual Studio
  • What is testing?
    • Different types of tests
    • Benefits of unit testing
    • Characteristics of tests
    • Frameworks for testing
    • Unit testing and DevOps
  • ▶️Testing a console app
  • ▶️Testing a web app
  • 🧪Edabit Examples
Powered by GitBook
On this page
  1. What is testing?

Characteristics of tests

Characteristics of a good unit test

  • Fast: It isn't uncommon for mature projects to have thousands of unit tests. Unit tests should take little time to run. Milliseconds.

  • Isolated: Unit tests are standalone, can be run in isolation, and have no dependencies on any outside factors such as a file system or database.

  • Repeatable: Running a unit test should be consistent with its results, that is, it always returns the same result if you don't change anything in between runs.

  • Self-Checking: The test should be able to automatically detect if it passed or failed without any human interaction.

  • Timely: Unit tests should be written close to when the code is written, ideally before or during the development process (TDD approach).

PreviousBenefits of unit testingNextFrameworks for testing

Last updated 8 months ago