Figure 4: All you need to do is going to Automated Tests Section.
He you will find a standard test run configuration that runs all tests that are in assemblies that contains the word “test” in it.
Once everything is in place, I use a Build Agent inside a Virtual Machine, (where I’ve set the Test.
Tailspin Toys Test Site environment variable to point to my Azure Test Site), then I configured a standard tfs build, added right Ms Build arguments to deploy web site and finally I specified the integration tests to run.
In those articles I’ve explained how you can automatically publish your web site to a standard IIS hosted web site or to an Azure Web Site.
The cool part is that you just need to add extra Ms Build arguments to TFS Build process definition and the game is done.
The nice aspect of build summary is that it shows immediately the name of the test that is failing (Smoke Call Pages ), the whole test result can also downloaded locally to better identify the cause of the problem.
Figure 7: From test result you can spot immediately the request that failed and if you have some form of logging enabled, like Elmah, you can have a better clue on what is happened simply looking at log page.
For Azure Web Sites you also have a dedicated template for publishing that will also manage an integration with the Azure Web site dashboard (as you can see in the following figure)Figure 1: If you use the standard Default Template workflow (with Ms Build arguments) Deployments Tab will not be populated, but you can use it to also deploy TF Service project that uses Git (actually not supported by the standard azure deploy template).
But the main question is: Even if your team is committed to Unit Testing, we all know that many problems arise from wrong deployment, wrong configuration files in production, bug with production data and so on.
Since all test results are automatically pushed to TFS it is simple to understand the reason of a failure as you can see in the following build Summary.
Figure 6: There are two distinct test runs, the first one is using the standard agile test runner and runs standard unit test, it is then followed by the results of integration testing.
Another advantage of automatic deployment is detailed log of every operation done from the scriptsthat allows you to diagnose problems quickly.