MSTest in MSBuild - How to update stats and UI

Hello,

I have a project which builds with a simple MSBuild script. I had to use this because we're using TypeMock which requires some extra tasks. The build runs and the tests pass but the state of the tests are not updating the UI. I can only see the results by going to the All Messages page. Previously (before TypeMock) we where using the vs2008 solution build which updated the UI nicely with the number of test passes and failures. Here is my build script:

C:\Program Files\Typemock\Typemock Isolator "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe" /testcontainer: ]]>

You can see that we're using the Exec task to run the tests. So, my question is, how can I change my MSBuild script to run the MSTests and have them update the web UI just like if I was building the project via a vs2008 solution?

Thanks in advance

Andy

Edited by: Andy Pike on Apr 10, 2008 5:40 PM

3 comments

Hello,
It is possible to generate TeamCityInfo.xml file with information about
passed tests.
From the other hand, it is possible to use TeamCity service messages, say
output to commandline, to
let TeamCity know that some test passed/failed/so-on.

Please have a look to http://www.jetbrains.net/confluence/x/0Y8

Actually, we are going to support is soon, please have a look/watch to
http://www.jetbrains.net/tracker/issue/TW-4862 the issue on it.

--
Eugene Petrenko
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Hello,

I have a project which builds with a simple MSBuild script. I had to
use this because we're using TypeMock which requires some extra tasks.
The build runs and the tests pass but the state of the tests are not
updating the UI. I can only see the results by going to the All
Messages page. Previously (before TypeMock) we where using the vs2008
solution build which updated the UI nicely with the number of test
passes and failures. Here is my build script:

<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TypeMockDir>C:\Program Files\Typemock\Typemock
Isolator</TypeMockDir>
<MSTest>&quot;C:\Program Files\Microsoft Visual Studio
9.0\Common7\IDE\MSTest.exe&quot; /testcontainer:</MSTest>
</PropertyGroup>
<!-- Import Typemock Isolator Tasks-->
<Import Project ="$(TypeMockDir)\TypeMock.MSBuild.Tasks"/>
<!-- Build the solution-->
<Target Name="Rebuild">
<MSBuild Projects="MySolution.sln"
Properties="Configuration=Release" />
</Target>
<!-- Run tests with TypeMock enabled -->
<Target Name="RunTests" DependsOnTargets="Rebuild">
<TypeMockStart Target="2.0"/>
<Exec ContinueOnError="false"
Command="$(MSTest)&quot;MyTests.dll&quot; /nologo" />
<TypeMockStop/>
</Target>
</Project>

You can see that we're using the Exec task to run the tasks. So, my
question is, how can I change my MSBuild script to run the MSTests and
have them update the web UI just like if I was building the project
via a vs2008 solution?

Thanks in advance

Andy



0

So is it not possible to hook into the existing workflow for vs2008 solutions that currently runs these tests and updates the UI from an MSBuild script?

0

Hello,

You are right. There is an issue for that problem in our tracker at
http://www.jetbrains.net/tracker/issue/TW-4862
Could you please have a look to it and watch it to know the progress.

Thanks!
--
Eugene Petrenko
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0

Please sign in to leave a comment.