Service Messages for MS Silverlight Testing Framework


I'm trying desparately to integrate the results of the Microsoft Silverlight Testing framework run into TeamCity, but I'm not having any success :( I trying to use the Service Message feature as written about here ] to integrate the MS Silverlight testing framework into our TeamCity build reports.

I'm doing the following:
1. I automate the execution of our Silverlight client tests through the Silverlight Testing Framework by using the WebAii web testing framework. WebAii automates the process of navigation to the Silverlight Test Page that hosts the test cases and it does this by creating a NUnit test fixture with a test that navigates to the page. When WebAii via NUnit opens the page, the Silverlight Test Framework automatically executes all the tests and writes the output into the html test page. A single NUnit test therefore automates the execution of all the Silverlight client tests.
2. I then parse the output of the html page using WebAii to create a list of individual tests that have passed/failed.
3. I write these test results to the NUnit Error and Output console to make the test run pass or fail. So in the end I have one NUnit test that executes n-many silverlight client tests. This process all works fine via TeamCity but TeamCity only reports that the single NUnit test executed succesfully or not. I thought that if the output of the NUnit test method is in the TeamCity ServiceMessage format it would report on all the silverlight client test cases executed as well.

Find attached a CommandLineBuild.log file that shows the output generated when I do the test run from a MSBuild command prompt on my PC. You will see that the NUnit output is nicely formatted according to the Service Messages specification. NUnit however still only shows 1 test passing - perhaps that is part of the problem? Also find attached a TeamCityBuild.log file that shows a TeamCity build using the MSBuild runner with the same parameters.

Two questions:
1. Is this possible?
2. If it is, what am I doing wrong.


Comment actions Permalink

Some further feedback - I got it working!! The problem was that the TeamCity NUnit runner was intercepting the calls which seems to negate the Service Message implementation. I got around the problem by running the NUnit WebAii test case from the command line using the NUnit-console. When I do this, TeamCity picks up the individual test runs and reports them back into the integrated build report. Cool I'm sure to blog about this when we've upgraded to RC0 as the RC0 Silverlight Test Framework includes the timing details for a test as well so I can log get accurate timings for the individual tests using the mechanism I described above. Sweet.

Comment actions Permalink

Looking forward to your blog post. Please let me know when it out.

Comment actions Permalink

It's more than a year later, but I finally blogged about the solution after extending it a bit more here.


Please sign in to leave a comment.