Prerequisites for testing

Integration Testing (Real DB)

Prerequisites for testing with a real test database:
1. For the integration tests we use the Northwind database, for more information how to use the Northwind database see http://northwinddatabase.codeplex.com/.

2. Please modify the connection string in the App.config of System.Data.Entity.Repository.IntegrationTests and modify the following line:

<connectionStrings>
    <add name="RepositoryContext" connectionString="Data Source=[ServerName];Initial Catalog=[Catalog];Integrated Security=false;User ID=[UserName]; Password=[Password];" providerName="System.Data.SqlClient" />
</connectionStrings>

[ServerName] is the name of your server.
[Catalog] is the name of the Northwind database on your server.
[UserName] is the login name of your Sql server.
[Password] is the password for the user on your Sql server.

3. Happy testing.

Note: Some of the tests will take some time so if you're running the test in Debug Mode an Exception will be raised that visual studio cannot switch between contexts. The solution for this exception is to implement threading within the unit tests so the Debugger will wait for the unit test thread to complete. An example of this solution is provided in the testing projects.

Last edited Sep 27, 2012 at 9:31 AM by noodel1988, version 8

Comments

No comments yet.