Index![]()
Downloads (PDF, HTML & XML formats)
[Bamboo Knowledge Base Home]
Documentation for Bamboo 4.1.x. Documentation for earlier versions of Bamboo is available too. 
![]()
This page describes how to configure a MSTest Runner executable for a Bamboo task. The MSTest Runner executable runs and parses tests for .NET builds.
When creating a new job or configuring an existing one, you need to specify the tasks that will execute the job's builds. You must specify an executable for each task. If you specify an Ant, Grails or Maven executable, you will also need to choose a JDK.
When creating a new plan, you can configure the tasks for the plan's default job.
An executable is a program external to Bamboo used to automate processes. Generally, executables compile source code to generate compiled executable files (referred to as artifacts in Bamboo). Ant, Maven, MSBuild or PHPUnit are just some examples of executables that can be used as part of your build process.New executables can be defined as capabilities in Bamboo. Once an executable has been defined in Bamboo, it can be configured as part of a task.
Before you begin:
To configure a MSTest Runner executable for a task:
Update the task settings:
Related pages:
| Setting | Description |
|---|---|
| Task Description | A description of the task, for display in Bamboo. |
| Executable | The MSTest Runner executable that you wish to use for this task (e.g. "Visual Studio 2010"). The executable that you select will become one of the task's capability requirements (and hence, one of the job's requirements). For details, please see Configuring a job's requirements. Specifically for MSTest, we recommend the executable to be defined with the Visual Studio IDE folder path. Example: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ This will allow Bamboo to find the necessary resources. |
| Environment Variables | Any extra environment variables you want to pass to your build. e.g. JAVA_OPTS="-Xmx256m -Xms128m". |
| Container | The test container, i.e. the file that contains the tests you want to run. For example, tests.dll. The value of this field is passed to the MSTest.exe as the /testcontainer parameter. See MSTest.exe Command-Line Options (MSDN). |
| Test Metadata | The path to the Test Metadata file relative to the working directory. For example, "MyApp\MyApp.vsmdi" |
| Result Filename | The file that you want to save the test results to. For example, testResults.trx. The value of this field is passed to the MSTest.exe as the /resultsfile parameter. See MSTest.exe Command-Line Options (MSDN). |
| Run Configuration | The run configuration that you want to use. For example, localtestrun.Testrunconfig. The value of this field is passed to the MSTest.exe as the /runconfig parameter. See MSTest.exe Command-Line Options (MSDN). |
1 Comment
Sean Dockery
Aug 06, 2012I've been experimenting with the MSTest Runner and used the simple values depicted in the screenshot on the right-hand side of this page. That is, I am using Visual Studio 2010 and have specified a Result Filename with a value of testresults.trx. On subsequent builds of my project, the build fails with the error:
In order to work around this problem, I've changed the Result Filename to a value of testresults-${bamboo.buildNumber}.trx. This avoids the name collision but results in trx files needlessly accumulating in the project working directory.
Is there a simple alternative or recommended way (other than a "force clean build") in which I should be configuring the MSTest Runner task that will avoid having these trx files pile up?