Bamboo 3.4 : MSTest Runner

This page describes how to configure a MSTest Runner executable for a 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.

Configuring a MSTest Runner Executable for a Task

Before you begin:

  • .Net Builder Tasks in Bamboo (e.g. NAnt) do not parse test information as part of the Task. You must configure a Test Task (e.g. MSTest Parser), if you want test results from the Builder Task to be parsed.

To configure a MSTest Runner executable for a Task:

  1. Navigate to the Task configuration for the Job (this will be the default Job if creating a new Plan).
  2. Click the name of the desired MSTest Runner Task, or click 'Add Task' and then 'MSTest Runner' if creating a new Task.
  3. Update the Task settings:
    • 'Task Description' — Enter a description of the Task, for display in Bamboo.
    • 'Executable' — In the 'Executable' dropdown, select the MSTest Runner executable that you wish to configure 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.

    • 'Container' — Specify 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).
    • 'Result Filename' — Specify 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' — Specify 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).
  4. Click the 'Save' button to save your changes.

Notes

Related Topics

Configuring Tasks
Editing a Job
Configuring a Test Task