Deploy with Unit Test
I wish to use VSTSForDP to support my pre-existing unit tests. Currently the process we use is anytime we make a change to the database schema we use SQL management studio to generate a script that will create the database. We then check that .sql file into TFS as a solution item. Our unit tests have a piece of init code that reads in the .sql file and executes it against our test server to create a fresh database that our unit tests will use.
We wish to simplify this process using DataDude. When our Unit Test init code runs I would like to run the .sql file that is the result of the build on our DataDude project. How can I do this? With a solution item I can use the test run config to make that solution item deploy along with the unit tests. What is the process I should use to access the build output from my DataDude project from my unit tests?
[870 byte] By [
Optikal] at [2008-3-5]
For RTM, we will provide the ability to add a reference to a DBProject and have that project built/deployed as part of the unit test environment setup before any unit test execution.Unfortunately, this feature was not complete in time for the TechEd release.
The feature will work like this:
· Select the test project
· From the Test main menu, select Database Test Configuration…
· From this dialog, you will be able to configure the DBProject build configuration.
· Click save – the configuration will be persisted to the project’s app.config (relative path to the selected project file plus settings)
At test execution, the schema update will be deployed as part of the Assemble Initialize (you can see this method in the DBTestProvider.cs/.vb) before the population is executed.
Today, you could do this yourself by interacting directly with the MSBuild engine in the assembly initialize.In the CTP release, the configuration dialog does store the relative path to the selected project file, but we are looking at adding a specific section to store this information for RTM.
We are working on documentation for the build tasks, but they are not there now.Unfortunately, right now you cannot redirect the output of the build task or specify the input of the deploy task.We have just finished defining the inputs to the build tasks and these should be put into place by RTM.