From the course: Advanced ASP.NET Core: Unit Testing
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Why unit testing? - ASP.NET Core Tutorial
From the course: Advanced ASP.NET Core: Unit Testing
Why unit testing?
- Unit testing is the base of a testing pyramid which means it's also really important for the other testing hierarchies. A strong base in a pyramid is so that the pyramid will also be strong and stable. The purpose of unit testing is to isolate each part or unit of our app and test that part if it works as expected. But why use unit testing and which are the main benefits of doing so? When you write an app you don't know from the top of your head how the app will turn out to be in the near future, you might want to add new features or remove existing ones, but changing the structure of your app has its own reasons. You might break existing features by changing the existing code. But having unit testing means that we know exactly what code we broke with our changes, so we can fix the issues without deploying the new version of our app. So having unit tests means that we can easily refactor our code. Also, when you write…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.