Steve Barker
2009-02-11 14:46:02 UTC
Hi all,
I have a team project with continuous integration enabled. I have enabled
running of the unit tests when the build fires. I originally enabled running
of tests in a list, using the TFSBuild.proj file as follows:
<MetaDataFile Include="$(BuildProjectFolderPath)/../../Test/Test.vsmdi">
<TestList>Main</TestList>
</MetaDataFile>
…which worked fine, and produced code coverage metrics. Then I decided to
extend this to include all tests in any DLL called “*test*.dll”, so that
tests that developers forget to add to the Main test list would also be run,
by including the following additional command:
<TestContainer Include="$(OutDir)\%2aTest%2a.dll" />
This works well, so I decided that I should take out the MetaDataFile
section altogether and just use the TestContainer tag, as this would ensure
that all tests would be run and no tests would be repeated.
Code coverage metrics are calculated when tests are run using the
MetaDataFile tag, but unfortunately, the coverage is not calculated when
using just TestContainer. Is there something I need to enable/change to allow
calculation of code coverage metrics when using just TestContainer?
Many thanks,
Steve.
I have a team project with continuous integration enabled. I have enabled
running of the unit tests when the build fires. I originally enabled running
of tests in a list, using the TFSBuild.proj file as follows:
<MetaDataFile Include="$(BuildProjectFolderPath)/../../Test/Test.vsmdi">
<TestList>Main</TestList>
</MetaDataFile>
…which worked fine, and produced code coverage metrics. Then I decided to
extend this to include all tests in any DLL called “*test*.dll”, so that
tests that developers forget to add to the Main test list would also be run,
by including the following additional command:
<TestContainer Include="$(OutDir)\%2aTest%2a.dll" />
This works well, so I decided that I should take out the MetaDataFile
section altogether and just use the TestContainer tag, as this would ensure
that all tests would be run and no tests would be repeated.
Code coverage metrics are calculated when tests are run using the
MetaDataFile tag, but unfortunately, the coverage is not calculated when
using just TestContainer. Is there something I need to enable/change to allow
calculation of code coverage metrics when using just TestContainer?
Many thanks,
Steve.