The project I am working on is an Asp.Net MVC application. I wanted to add integration tests that call either controller actions or application services and test the integrated application. To do this I needed to:
- Automate the process of setting up an integration testing database environment.
- Duplicate my production IoC solution in such a way that it can be used in tests.
- Provide an easy way for integration tests to establish a context for the integration tests. This really just means simulating a logged in user.
Automate the Process of Setting Up an Integration Testing Database Environment
We manage our sql server database by keeping two sql scripts in subversion: a schema script and a test data script. Therefore to setup an integration database environment all I had to do was execute the two scripts. Here is the target I had to add to my NAnt build script:
No comments yet, be the first one to post comment.