Integrating with Bamboo
1. Go to a job configuration page, select Tasks, click Add task. Select Script in pop-up Task types window. In Script configuration page: select "bin/sh or cmd.exe" as Interpreter. Add Script body:
"(PathToTypemockIsolator)\SmartRunner\Typemock.SmartRunner.Console.exe" --TestAssemblies "(PathToTestsAssemblies)" --CoveredAssembly "(PathToCoveredAssembly)" --ResultFormat MsTest --ResultsFile "(PathToResults)\results.trx" --CoverageReportTypes NCover,Html --CoverageOutput "Coverage" --License (Company) (Key)
This runs tests with SmartRunner and saves tests and coverage results.
2. Add a new script task. In Script configuration page: select "bin/sh or cmd.exe" as Interpreter. Add Script body:
ren Coverage.ncover Coverage.xml
This renames Coverage.ncover, produced by SmartRunner, to Coverage.xml.
3. Add a task of type MSTest Parser.
This searches for *.trx (MSBuild test results format) and parse them, so
Bamboo could represent test results.
4. Go to Other settings, check Clean working directory after each
build and NCover output will be produced. Enter "\" in NCover XML Directory input field.
This is required for representation of Coverage results produced by
SmartRunner in Bamboo.
5. Go to a job configuration page, select Artifacts, click Create
artifact button. Fill input fields in pop-up window - Name: "Coverage.html", Location "Coverage", Copy
pattern: "*.*". Click Save button.
This adds Typemock html coverage report as an artifact.
6. Go to Bamboo administration page, select Security settings, click Edit button, select Allow
artifacts to be embedded in Bamboo pages, click Save button.
This allows you see .html artifacts without downloading them.
It's recommended to set English (United States) as Regional format in Windows Region settings, because of known issues with some other formats in Bamboo .NET plugins.
Information about deploying Typemock Isolator: Auto-Deploy.