Can''t publish my test results

Hi,

We are using TFS 2005 and visual studio team suite 2005.

I have made a test project which test some websites.

Every tests runs fine. I am trying to upload the test results to the TFS Server.

I run a test, after it is completed I select it (checked) and click on publish.

The build flavor has been greyed out and I can't press OK.

If I create a new project everything works fine. I can't recreate this project easily since

we would lose a lot of information (work items/bugs)

Any suggestions ?

Constantijn Enders

[581 byte] By [ConstantijnEnders] at [2008-1-10]
# 1

Okay, I did some testing and I pinpointed the problem.

My solution contains some report projects, analysis service projects and integration service projects.

MSBuild doesn't accept these projects. So what I did is that I copied Microsoft.TeamFoundation.Build.targets and

changed the line

<!-- Build using MSBuild task -->

<MSBuild

Condition=" '@(SolutionToBuild)'!='' "

Projects="@(SolutionToBuild)"

Properties="Configuration=%(ConfigurationToBuild.FlavorToBuild);Platform=%(ConfigurationToBuild.PlatformToBuild);SkipInvalidConfigurations=true;VCBuildOverride=$(MSBuildProjectDirectory)\TFSBuild.vsprops;FxCopDir=$(FxCopDir);OutDir=$(OutDir);ReferencePath=$(ReferencePath);TeamBuildConstants=$(TeamBuildConstants);$(CodeAnalysisOption)"

Targets="Build" />

to

<!-- Build using DEVENV -->

<Exec Command="%22$(VisualStudio8)%22 %22@(SolutionToBuild)%22 /Rebuild %(ConfigurationToBuild.FlavorToBuild)" ></Exec>

Apperently using devenv will give me the correct build but I can't get the flavor. And MSTest needs a flavor otherwise it can't publish. So what else is MSBUILD doing behind the scenes ?

The build scripts are the same.

With regards,

Constantijn Enders

ConstantijnEnders at 2007-10-3 > top of Msdn Tech,Visual Studio Team System,Visual Studio Team System - Web and Load Testing...
# 2

The flavor option, input as a string, is mandatory for publishing test results. The values of /flavor and /platform must match a valid combination of values for the completed build identified by the /publishbuild option. When you run the MSTest utility with the options for publishing, it first finishes running tests and then it sets the flavor and platform properties of the test run before publishing the test run results.

Examples of using /flavor: /flavorBig Smileebug, /flavor:retail

The build flavor is detemined by the build definition (defined within TFSBuild.proj) you created. The build definitions are under the Team Builds folder of your project. An excerpt from that file contains the following xml fragment which defines what flavors are created.

<ItemGroup>

<!-- CONFIGURATIONS

The list of configurations to build. To add/delete configurations, edit

this value. For example, to add a new configuration, add following lines -

<ConfigurationToBuild Include="Debug|x86">

<FlavorToBuild>Debug</FlavorToBuild>

<PlatformToBuild>x86</PlatformToBuild>

</ConfigurationToBuild>

The Include attribute value should be unique for each ConfigurationToBuild node.

-->

<ConfigurationToBuild Include="Release|Any CPU">

<FlavorToBuild>Release</FlavorToBuild>

<PlatformToBuild>Any CPU</PlatformToBuild>

</ConfigurationToBuild>

<ConfigurationToBuild Include="Debug|Any CPU">

<FlavorToBuild>Debug</FlavorToBuild>

<PlatformToBuild>Any CPU</PlatformToBuild>

</ConfigurationToBuild>

</ItemGroup>

You can also look a the results for a specific build. In that report, you will see the build results for each flavor.

Hope this helps.

JerryNoll at 2007-10-3 > top of Msdn Tech,Visual Studio Team System,Visual Studio Team System - Web and Load Testing...

Visual Studio Team System

Site Classified