An evaluation license is waiting in your email.
Let’s get started! Choose your build server: TeamCity, Bamboo, Jenkins, or Azure DevOps.
1. In TeamCity build steps, add build step button
2. Select Command Line as Runner Type
3. In the Custom script, add a command to run SmartRunner Console, for example:
1 2 |
TypeMock.SmartRunner.Console.exe -t TestsAssembly.dll -c "" CoveredAssembly.dll --CoverageReportTypes Html,TeamCity --CoverageOutput "Coverage" -o -k "" |
4. Add another Build Step, select command line as runner type, add the following script body:
1 |
@echo ##teamcity[publishArtifacts 'TestResults/coverage/'] |
5. Go to project settings, in General Settings, click Report Tabs
6. Click the “Create new project report” tab, select build configuration, and fill “Tab Title”, use index.htm as “Start page”
7. Click the “Create new build report” tab, fill “Tab Title”, and use index.htm as the Start page
8. Get your code coverage summary in the “Overview” of your project
1. Go to job configuration and in the task menu click on “Add Task”
2. Select “Script” in the “Task types” window
3. Choose a name and select “bin/sh or cmd.exe” as the Interpreter
4. Add script body:
1 2 |
"Typemock.SmartRunner.Console.exe" --TestAssemblies "" --CoveredAssembly "" -- ResultFormat MsTest --ResultsFile "results.trx" --CoverageReportTypes NCover,Html --CoverageOutput "Coverage" |
5. Add another script of the same type and place it after SmartRunner Script, add following body:
1 |
ren Coverage.ncover Coverage.xml |
6. Add the final task “MSTest Parser”
7. Go to the other settings tab and make sure “Clean working directory after each build” is clicked on and place a back slash() in NCOVER XML Directory
8. Go to the artifacts tab and click “Create artifact”, Fill the fields in the following pattern:
9. Final step: In Bamboo Administration go to “Security settings” and make sure you “Allow artifacts to be embedded in Bamboo pages”
10. Now you can run the pipeline and the coverage report will be available in artifacts, click on it will immediately display the Test report.
1. In the Jenkins pipeline configuration build step add the SmartRunner variable
2. Add Post-build action with script invoking the runner with relevant parameters, for example:
1 |
TypeMock.SmartRunner.Console.exe -t -c --CoverageReportTypes= --CoverageOutput=coverage -o -k "" |
3. Add “Publish Coverage Report” action
4. Add “Publish HTML reports” action
HTML directory to the archive should be dir/coverage
5. Coverage summary will be available on the main project menu
6. Simple click on “Coverage Report Action” will display a more detailed summary
7. Typemock Coverage HTML will open a full HTML report immediately on your browser for in-depth analysis
1. In the Azure server go to extensions in the right top corner and click Browse Marketplace
2. In the marketplace search for “Typemock”
3. Click on “Typemock Run Unit Tests”
4. On the results page click “Get it free”
5. Choose the relevant test project, click install then proceed to the collection
6. In the Pipelines section click add a task and search for “Typemock”
7. Choose SmartRunner and click add
8. Fill the SmartRunner task fields