Abstract
In this chapter, I demonstrate how to unit test MVC applications. Unit testing is a form of testing in which individual components are isolated from the rest of the application so their behavior can be thoroughly validated. ASP.NET Core MVC has been designed to make it easy to create unit tests, and Visual Studio provides support for a wide range of unit testing frameworks. I show you how to set up a unit test project, explain how to install one of the most popular testing frameworks, and describe the process for writing and running tests.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsAuthor information
Authors and Affiliations
Rights and permissions
Copyright information
© 2016 Adam Freeman
About this chapter
Cite this chapter
Freeman, A. (2016). Unit Testing MVC Applications. In: Pro ASP.NET Core MVC . Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-0397-2_7
Download citation
DOI: https://doi.org/10.1007/978-1-4842-0397-2_7
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-0398-9
Online ISBN: 978-1-4842-0397-2
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)