The previous post in this series was about the summary section of the build report. In this post we will see how to retrieve the build steps section details.
Using the BuildStore object we have created in the previous post we can get a list of BuildStepData objects that contain the needed information (an example on how to get the buildUri parameter value available in the previous post also):
BuildStepData[] buildSteps = buildStore.GetBuildSteps(buildUri);
Now we can go through all the objects in the collection and retrieve details for each one of them.
foreach (BuildStepData in buildSteps)
{
MessageBox.Show(buildStep.BuildStepMessage);
MessageBox.Show(buildStep.BuildStepName);
MessageBox.Show(buildStep.FinishTime.ToString());
MessageBox.Show(buildStep.Status.ToString());
}
Search This Blog
Showing posts with label team system anual event. Show all posts
Showing posts with label team system anual event. Show all posts
Tuesday, April 10, 2007
Wednesday, March 14, 2007
How to Get Build Result Details using TFS API - Part 1
In this series of posts I would explain how to use TFS API in order to retrieve build result details as they appear in the build report.

In order to retrieve result details for a build we need to create a BuildStore object. There is an example on how to create a BuildStore object on a previous post: Get Build Changes. The example take into consideration that you have already created the BuildStore object and it is named buildStore.
In this post we will see how to retrive the details under the summary section of the build report. First, we need to get the BuildData object for the build. Here's how to get the BuildData object:
BuildData buildData = buildStore.GetBuildDetails(buildStore.GetBuildUri(teamProject, buildNumber));
Now that we've got the BuildData object we can retrieve the build details that appear in the summary section of the report:
buildData.BuildNumber
buildData.RequestedBy
buildData.TeamProject
buildData.BuildType
buildData.BuildMachine
buildData.StartTime
buildData.FinishTime
buildData.LastChangedBy
buildData.LastChangedOn
buildData.BuildQuality
buildData.LogLocation
On the next post for this series I will explain how to retrieve the details for the "Build Steps" section of the report.
In order to retrieve result details for a build we need to create a BuildStore object. There is an example on how to create a BuildStore object on a previous post: Get Build Changes. The example take into consideration that you have already created the BuildStore object and it is named buildStore.
In this post we will see how to retrive the details under the summary section of the build report. First, we need to get the BuildData object for the build. Here's how to get the BuildData object:
BuildData buildData = buildStore.GetBuildDetails(buildStore.GetBuildUri(teamProject, buildNumber));
Now that we've got the BuildData object we can retrieve the build details that appear in the summary section of the report:
buildData.BuildNumber
buildData.RequestedBy
buildData.TeamProject
buildData.BuildType
buildData.BuildMachine
buildData.StartTime
buildData.FinishTime
buildData.LastChangedBy
buildData.LastChangedOn
buildData.BuildQuality
buildData.LogLocation
On the next post for this series I will explain how to retrieve the details for the "Build Steps" section of the report.
Thursday, December 14, 2006
As I mentioned before, yesterday, I spoke at the Team System event is Israel. I have joined SRL to a lecture on Configuration Management and Build Enhancements. It was a pleasure sharing the knowledge. Here I am:


Subscribe to:
Posts (Atom)