GitHub repository: logcorner/Asp.Net-Web-Api-Core-Integration-testing-using-EntityFrameworkCore-LocalDb-and-Xunit2
Primary language: C#
Created: 2017-06-22T23:15:25Z
Description: Compared to unit testing, Integration testing gives us a better return on test investment.  Nowadays, we have a lot of tools to set it up easily, and it can go faster and gives us more confidence with code we have changing knowing we have not breaking existing functionalities.  It can help us to catch regression errors, before we deploy to a test environment, and fewer bugs in new features, resulting Higher velocity and higher quality solution  Unit testing test behaviour of a class and drive its implementation, run in memory and mocks the Data Access Laywer while Integration testing test the entire system and focus on interactions between many classes, uses the real database and test the Data Access Laywer and its value is to catch regressions. So Integration testing may catch errors that passes on  unit testing  In my previous tutorial , Asp.Net Core Web Api Integration testing using InMemory EntityFrameworkCore Sqlite and XUnit2 I used SqlLite InMemory  Note : InMemory is not a relational database. It is designed to be a general purpose database for testing, and is not designed to mimic a relational database.  So it will allow us to save data that would violate referential integrity constraints in a relational database.  In this tutorial, I will talk about Asp.Net Web Api Core Integration testing using EntityFrameworkCore LocalDB and Xunit2  So lets go ahead and implement some integration tests for the solution discussed on this tutorial Token Based Authentication using Asp.net Web Api Core  Lets start and create a XUnit Test Project using Visual Studio 2017