May 2018
Intermediate to advanced
300 pages
7h 35m
English
Data-driven unit testing is an important concept of TDD that brings many benefits, by allowing you to test your code base extensively with real-life data from multiple data sources, giving you the insight needed to tweak and refactor code for better performance and robustness.
In this chapter, we covered the benefits of data-driven testing and how to write effective data-driven tests using the inline and properties attributes of xUnit.net. Furthermore, we explored data-driven unit testing using the Theory attribute available in xUnit.net. This allows you to unit test your code for appropriate validation and verification over a wide range of inputs coming from different data sources.
While the default data source attributes provided ...