SlideShare una empresa de Scribd logo
1 de 23
.NET Code Coverage for
Continuous Integration
using TeamCity and dotCover
Maarten Balliauw
Technical Evangelist
maarten.balliauw@jetbrains.com
@maartenballiauw
Who am I?
Maarten Balliauw
Belgium (Antwerp)
Technical Evangelist, JetBrains
Focus on web
ASP.NET MVC, Windows Azure, ...
PHP, ...
Big passion: Cloud (Windows Azure)
Home brewer
http://blog.maartenballiauw.be
@maartenballiauw
Have a question?
Use the Question Pane. We’ll try and answer as we go along.
Recording
Recording will start now….
Agenda
Code coverage
dotCover
Code coverage during CI
Command line runner
TeamCity integration
TeamCity service messages
TeamCity Visual Studio plugin
Code Coverage
“Code coverage is a measure used to
describe the degree to which the source
code of a program is tested by a particular
test suite.”
Wikipedia - http://en.wikipedia.org/wiki/Code_coverage
demo
Code Coverage
Using dotCover to capture Code Coverage
Holy grail?
Code Coverage is just a tool
Verify # of statements executed during a test run
100% coverage != 100% bug free / well-tested code
It’s relatively easy to cover all lines of code
It’s much harder to test them correctly
Should we aim for 100%?
We should care about code coverage!
Identify parts of code not covered by any type of test and reduce chance of
defects
dotCover
Capture which statements have been executed (using profiler)
During unit test
During manual test
Display coverage percentage
Statement level coverage visualization
Hotspots to quickly identify parts that need testing
Filtering, exporting, ...
Navigate between code and test
Command line runner
demo
dotCover 101
A quick look at dotCover
When to perform code coverage?
Let’s counter that with a question:
When to run unit tests?
On developer machine is always nice, but…
Continuous Integration is our view of the truth
Compile, Run tests, Code coverage, …
TeamCity
JetBrains Continuous Integration Server
Project
Logical name/unit
Build Configuration
Something we want to run
Build Steps
Various steps we want to run (like compilation or unit tests, .NET, Java, deployment, …)
Build
Execution log and artifacts of a build configuration after run
Integrated build step for running NUnit + code coverage using dotCover
demo
TeamCity 101
A quick look at TeamCity
TeamCity Service Messages
Test resuls from xUnit were reported using TeamCity Service Messages
http://confluence.jetbrains.com/display/TCD8/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-
Reporting.NETCodeCoverageResults
##teamcity[testStarted name='testName' captureStandardOutput='<true/false>']
##teamcity[testFinished name='testName' duration='<test_duration_in_milliseconds>']
We can report coverage using this technique as well!
##teamcity[importData type='dotNetCoverage' tool='dotcover' path='coverage.xml'
Now all we need is way to run tests with coverage...
dotCover Command Line Runner
dotcover.exe
Create configuration (which executable, which assemblies, …)
Run dotcover.exe with that configuration
Export to XML, HTML, …
demo
dotCover
command line runner
Using the command line runner
demo
TeamCity plugin
for Visual Studio
Making the story complete
Conclusion
Code coverage
dotCover
Code coverage during CI
Command line runner
TeamCity integration
TeamCity service messages
Visual Studio Plugin
Questions
Leading by
example
Resources
Try dotCover now!
http://www.jetbrains.com/dotcover
Tutorials
Getting started
http://confluence.jetbrains.com/display/NETCOM/Getting+Started+with+dotCover
Command line runner
http://confluence.jetbrains.com/display/NETCOM/How+to+Run+Code+Coverage+from+Command+Line+in+dot
Cover
dotCover in TeamCity
http://confluence.jetbrains.com/display/NETCOM/How+to+Run+Code+Coverage+with+dotCover+in+TeamCity
TeamCity Service Messages
http://confluence.jetbrains.com/display/TCD8/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwit
hTeamCity-Reporting.NETCodeCoverageResults
More info
Home
Feedback
Videos
Blog
http://jetbrains.com/dotcover
maarten.balliauw@jetbrains.com
http://youtrack.jetbrains.com/issues/DCVR
http://www.youtube.com/jetbrainstv
.NET Tools Channel
http://blog.jetbrains.com/dotnet
Thank you for joining us!
Want to learn more?
Follow @dotcover on Twitter
to learn product tips and register
for upcoming webinars
.NET Code Coverage for Continuous Integrationusing TeamCity and dotCover

Más contenido relacionado

La actualidad más candente

How TeamCity Shines for You, May 26th Webinar
How TeamCity Shines for You, May 26th WebinarHow TeamCity Shines for You, May 26th Webinar
How TeamCity Shines for You, May 26th WebinarWes Higbee
 
Showdown CI/CD - TeamCity
Showdown CI/CD - TeamCityShowdown CI/CD - TeamCity
Showdown CI/CD - TeamCityBoyan Mihaylov
 
Continuous Integration with Bamboo for Salesforce
Continuous Integration with Bamboo for SalesforceContinuous Integration with Bamboo for Salesforce
Continuous Integration with Bamboo for SalesforceKlea Kolaric
 
BizTalk ALM (Toon Vanhoutte @ Integration Monday)
BizTalk ALM (Toon Vanhoutte @ Integration Monday)BizTalk ALM (Toon Vanhoutte @ Integration Monday)
BizTalk ALM (Toon Vanhoutte @ Integration Monday)Codit
 
Keeping Your CI/CD Pipeline as Fast as It Needs to Be
Keeping Your CI/CD Pipeline as Fast as It Needs to BeKeeping Your CI/CD Pipeline as Fast as It Needs to Be
Keeping Your CI/CD Pipeline as Fast as It Needs to BeAbraham Marin-Perez
 
Introduction To Continuous Integration
Introduction To Continuous IntegrationIntroduction To Continuous Integration
Introduction To Continuous IntegrationChristopher Read
 
Bamboo Continuous Integration Server - Brief
Bamboo Continuous Integration Server - BriefBamboo Continuous Integration Server - Brief
Bamboo Continuous Integration Server - BriefEllen Feaheny
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integrationelliando dias
 
Continuous Integration at T3CON08
Continuous Integration at T3CON08Continuous Integration at T3CON08
Continuous Integration at T3CON08Sebastian Kurfürst
 
Continuous integration
Continuous integrationContinuous integration
Continuous integrationamscanne
 
Continuous Integration In A PHP World
Continuous Integration In A PHP WorldContinuous Integration In A PHP World
Continuous Integration In A PHP WorldIdaf_1er
 
From Continuous integration to Continuous Delivery with TeamCity
From Continuous integration to Continuous Delivery with TeamCityFrom Continuous integration to Continuous Delivery with TeamCity
From Continuous integration to Continuous Delivery with TeamCitySergey Pak
 
Continuous integration using atlassian bamboo
Continuous integration using atlassian bambooContinuous integration using atlassian bamboo
Continuous integration using atlassian bambooAlexander Masalov
 
Continuous Integration, Build Pipelines and Continuous Deployment
Continuous Integration, Build Pipelines and Continuous DeploymentContinuous Integration, Build Pipelines and Continuous Deployment
Continuous Integration, Build Pipelines and Continuous DeploymentChristopher Read
 
Improving software quality using Continuous Integration
Improving software quality using Continuous IntegrationImproving software quality using Continuous Integration
Improving software quality using Continuous IntegrationWouter Konecny
 

La actualidad más candente (20)

How TeamCity Shines for You, May 26th Webinar
How TeamCity Shines for You, May 26th WebinarHow TeamCity Shines for You, May 26th Webinar
How TeamCity Shines for You, May 26th Webinar
 
Showdown CI/CD - TeamCity
Showdown CI/CD - TeamCityShowdown CI/CD - TeamCity
Showdown CI/CD - TeamCity
 
Continuous Integration with Bamboo for Salesforce
Continuous Integration with Bamboo for SalesforceContinuous Integration with Bamboo for Salesforce
Continuous Integration with Bamboo for Salesforce
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
 
BizTalk ALM (Toon Vanhoutte @ Integration Monday)
BizTalk ALM (Toon Vanhoutte @ Integration Monday)BizTalk ALM (Toon Vanhoutte @ Integration Monday)
BizTalk ALM (Toon Vanhoutte @ Integration Monday)
 
Keeping Your CI/CD Pipeline as Fast as It Needs to Be
Keeping Your CI/CD Pipeline as Fast as It Needs to BeKeeping Your CI/CD Pipeline as Fast as It Needs to Be
Keeping Your CI/CD Pipeline as Fast as It Needs to Be
 
Introduction To Continuous Integration
Introduction To Continuous IntegrationIntroduction To Continuous Integration
Introduction To Continuous Integration
 
Bamboo Continuous Integration Server - Brief
Bamboo Continuous Integration Server - BriefBamboo Continuous Integration Server - Brief
Bamboo Continuous Integration Server - Brief
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
 
Jenkins
JenkinsJenkins
Jenkins
 
Continuous Integration 101
Continuous Integration 101Continuous Integration 101
Continuous Integration 101
 
Continuous Integration at T3CON08
Continuous Integration at T3CON08Continuous Integration at T3CON08
Continuous Integration at T3CON08
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
 
Continuous Integration In A PHP World
Continuous Integration In A PHP WorldContinuous Integration In A PHP World
Continuous Integration In A PHP World
 
From Continuous integration to Continuous Delivery with TeamCity
From Continuous integration to Continuous Delivery with TeamCityFrom Continuous integration to Continuous Delivery with TeamCity
From Continuous integration to Continuous Delivery with TeamCity
 
Continuous integration using atlassian bamboo
Continuous integration using atlassian bambooContinuous integration using atlassian bamboo
Continuous integration using atlassian bamboo
 
Continuous Integration, Build Pipelines and Continuous Deployment
Continuous Integration, Build Pipelines and Continuous DeploymentContinuous Integration, Build Pipelines and Continuous Deployment
Continuous Integration, Build Pipelines and Continuous Deployment
 
Devops | CICD Pipeline
Devops | CICD PipelineDevops | CICD Pipeline
Devops | CICD Pipeline
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
 
Improving software quality using Continuous Integration
Improving software quality using Continuous IntegrationImproving software quality using Continuous Integration
Improving software quality using Continuous Integration
 

Similar a .NET Code Coverage for Continuous Integration using TeamCity and dotCover

Whidbey old
Whidbey old Whidbey old
Whidbey old grenaud
 
Agile azure manchester azure user group v3
Agile azure manchester azure user group  v3Agile azure manchester azure user group  v3
Agile azure manchester azure user group v3jaye Martin
 
Continuous integration
Continuous integrationContinuous integration
Continuous integrationLior Tal
 
Introduction to Continuous integration
Introduction to Continuous integrationIntroduction to Continuous integration
Introduction to Continuous integrationliortal53
 
Enabling Continuous Integration with Azure Pipelines
Enabling Continuous Integration with Azure PipelinesEnabling Continuous Integration with Azure Pipelines
Enabling Continuous Integration with Azure PipelinesEng Teong Cheah
 
Modern ASP.NET Webskills
Modern ASP.NET WebskillsModern ASP.NET Webskills
Modern ASP.NET WebskillsCaleb Jenkins
 
Continuous integration - CI
Continuous integration - CIContinuous integration - CI
Continuous integration - CINhan Nguyen
 
MASTER-CLASS: "CODE COVERAGE ON Μ-CONTROLLER" Sebastian Götzinger
MASTER-CLASS: "CODE COVERAGE ON Μ-CONTROLLER" Sebastian GötzingerMASTER-CLASS: "CODE COVERAGE ON Μ-CONTROLLER" Sebastian Götzinger
MASTER-CLASS: "CODE COVERAGE ON Μ-CONTROLLER" Sebastian GötzingerIevgenii Katsan
 
Visual Studio 2017 Launch Event
Visual Studio 2017 Launch EventVisual Studio 2017 Launch Event
Visual Studio 2017 Launch EventJames Montemagno
 
PVS-Studio and Continuous Integration: TeamCity. Analysis of the Open RollerC...
PVS-Studio and Continuous Integration: TeamCity. Analysis of the Open RollerC...PVS-Studio and Continuous Integration: TeamCity. Analysis of the Open RollerC...
PVS-Studio and Continuous Integration: TeamCity. Analysis of the Open RollerC...Andrey Karpov
 
Cloud continuous integration- A distributed approach using distinct services
Cloud continuous integration- A distributed approach using distinct servicesCloud continuous integration- A distributed approach using distinct services
Cloud continuous integration- A distributed approach using distinct servicesAndré Agostinho
 
Continuous Integration and development environment approach
Continuous Integration and development environment approachContinuous Integration and development environment approach
Continuous Integration and development environment approachAleksandr Tsertkov
 
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDEUse Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDEBenjamin Cabé
 
2018 Cisco DevNet Create : How to Treat a Network as a Container
2018 Cisco DevNet Create : How to Treat a Network as a Container2018 Cisco DevNet Create : How to Treat a Network as a Container
2018 Cisco DevNet Create : How to Treat a Network as a ContainerRosemary Wang
 
Windows service best practice
Windows service best practiceWindows service best practice
Windows service best practiceYu GUAN
 
The First C# Project Analyzed
The First C# Project AnalyzedThe First C# Project Analyzed
The First C# Project AnalyzedPVS-Studio
 

Similar a .NET Code Coverage for Continuous Integration using TeamCity and dotCover (20)

Whidbey old
Whidbey old Whidbey old
Whidbey old
 
Agile azure manchester azure user group v3
Agile azure manchester azure user group  v3Agile azure manchester azure user group  v3
Agile azure manchester azure user group v3
 
Tdd,Ioc
Tdd,IocTdd,Ioc
Tdd,Ioc
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
 
Introduction to Continuous integration
Introduction to Continuous integrationIntroduction to Continuous integration
Introduction to Continuous integration
 
Enabling Continuous Integration with Azure Pipelines
Enabling Continuous Integration with Azure PipelinesEnabling Continuous Integration with Azure Pipelines
Enabling Continuous Integration with Azure Pipelines
 
Modern ASP.NET Webskills
Modern ASP.NET WebskillsModern ASP.NET Webskills
Modern ASP.NET Webskills
 
Continuous integration - CI
Continuous integration - CIContinuous integration - CI
Continuous integration - CI
 
MASTER-CLASS: "CODE COVERAGE ON Μ-CONTROLLER" Sebastian Götzinger
MASTER-CLASS: "CODE COVERAGE ON Μ-CONTROLLER" Sebastian GötzingerMASTER-CLASS: "CODE COVERAGE ON Μ-CONTROLLER" Sebastian Götzinger
MASTER-CLASS: "CODE COVERAGE ON Μ-CONTROLLER" Sebastian Götzinger
 
Visual Studio 2017 Launch Event
Visual Studio 2017 Launch EventVisual Studio 2017 Launch Event
Visual Studio 2017 Launch Event
 
PVS-Studio and Continuous Integration: TeamCity. Analysis of the Open RollerC...
PVS-Studio and Continuous Integration: TeamCity. Analysis of the Open RollerC...PVS-Studio and Continuous Integration: TeamCity. Analysis of the Open RollerC...
PVS-Studio and Continuous Integration: TeamCity. Analysis of the Open RollerC...
 
Cloud continuous integration- A distributed approach using distinct services
Cloud continuous integration- A distributed approach using distinct servicesCloud continuous integration- A distributed approach using distinct services
Cloud continuous integration- A distributed approach using distinct services
 
Continuous Integration and development environment approach
Continuous Integration and development environment approachContinuous Integration and development environment approach
Continuous Integration and development environment approach
 
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDEUse Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
 
Azure from scratch part 4
Azure from scratch part 4Azure from scratch part 4
Azure from scratch part 4
 
Coding Naked 2023
Coding Naked 2023Coding Naked 2023
Coding Naked 2023
 
2018 Cisco DevNet Create : How to Treat a Network as a Container
2018 Cisco DevNet Create : How to Treat a Network as a Container2018 Cisco DevNet Create : How to Treat a Network as a Container
2018 Cisco DevNet Create : How to Treat a Network as a Container
 
About .net
About .net About .net
About .net
 
Windows service best practice
Windows service best practiceWindows service best practice
Windows service best practice
 
The First C# Project Analyzed
The First C# Project AnalyzedThe First C# Project Analyzed
The First C# Project Analyzed
 

Más de Maarten Balliauw

Bringing nullability into existing code - dammit is not the answer.pptx
Bringing nullability into existing code - dammit is not the answer.pptxBringing nullability into existing code - dammit is not the answer.pptx
Bringing nullability into existing code - dammit is not the answer.pptxMaarten Balliauw
 
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...Maarten Balliauw
 
Building a friendly .NET SDK to connect to Space
Building a friendly .NET SDK to connect to SpaceBuilding a friendly .NET SDK to connect to Space
Building a friendly .NET SDK to connect to SpaceMaarten Balliauw
 
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...Maarten Balliauw
 
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...Maarten Balliauw
 
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...Maarten Balliauw
 
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...Maarten Balliauw
 
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se...
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se....NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se...
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se...Maarten Balliauw
 
CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...
CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...
CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...Maarten Balliauw
 
NDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and Search
NDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and SearchNDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and Search
NDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and SearchMaarten Balliauw
 
Approaches for application request throttling - Cloud Developer Days Poland
Approaches for application request throttling - Cloud Developer Days PolandApproaches for application request throttling - Cloud Developer Days Poland
Approaches for application request throttling - Cloud Developer Days PolandMaarten Balliauw
 
Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...
Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...
Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...Maarten Balliauw
 
Approaches for application request throttling - dotNetCologne
Approaches for application request throttling - dotNetCologneApproaches for application request throttling - dotNetCologne
Approaches for application request throttling - dotNetCologneMaarten Balliauw
 
CodeStock - Exploring .NET memory management - a trip down memory lane
CodeStock - Exploring .NET memory management - a trip down memory laneCodeStock - Exploring .NET memory management - a trip down memory lane
CodeStock - Exploring .NET memory management - a trip down memory laneMaarten Balliauw
 
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...Maarten Balliauw
 
ConFoo Montreal - Approaches for application request throttling
ConFoo Montreal - Approaches for application request throttlingConFoo Montreal - Approaches for application request throttling
ConFoo Montreal - Approaches for application request throttlingMaarten Balliauw
 
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...Maarten Balliauw
 
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...Maarten Balliauw
 
DotNetFest - Let’s refresh our memory! Memory management in .NET
DotNetFest - Let’s refresh our memory! Memory management in .NETDotNetFest - Let’s refresh our memory! Memory management in .NET
DotNetFest - Let’s refresh our memory! Memory management in .NETMaarten Balliauw
 
VISUG - Approaches for application request throttling
VISUG - Approaches for application request throttlingVISUG - Approaches for application request throttling
VISUG - Approaches for application request throttlingMaarten Balliauw
 

Más de Maarten Balliauw (20)

Bringing nullability into existing code - dammit is not the answer.pptx
Bringing nullability into existing code - dammit is not the answer.pptxBringing nullability into existing code - dammit is not the answer.pptx
Bringing nullability into existing code - dammit is not the answer.pptx
 
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...
 
Building a friendly .NET SDK to connect to Space
Building a friendly .NET SDK to connect to SpaceBuilding a friendly .NET SDK to connect to Space
Building a friendly .NET SDK to connect to Space
 
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...
 
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...
 
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
 
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...
 
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se...
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se....NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se...
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se...
 
CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...
CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...
CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...
 
NDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and Search
NDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and SearchNDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and Search
NDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and Search
 
Approaches for application request throttling - Cloud Developer Days Poland
Approaches for application request throttling - Cloud Developer Days PolandApproaches for application request throttling - Cloud Developer Days Poland
Approaches for application request throttling - Cloud Developer Days Poland
 
Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...
Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...
Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...
 
Approaches for application request throttling - dotNetCologne
Approaches for application request throttling - dotNetCologneApproaches for application request throttling - dotNetCologne
Approaches for application request throttling - dotNetCologne
 
CodeStock - Exploring .NET memory management - a trip down memory lane
CodeStock - Exploring .NET memory management - a trip down memory laneCodeStock - Exploring .NET memory management - a trip down memory lane
CodeStock - Exploring .NET memory management - a trip down memory lane
 
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
 
ConFoo Montreal - Approaches for application request throttling
ConFoo Montreal - Approaches for application request throttlingConFoo Montreal - Approaches for application request throttling
ConFoo Montreal - Approaches for application request throttling
 
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
 
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
 
DotNetFest - Let’s refresh our memory! Memory management in .NET
DotNetFest - Let’s refresh our memory! Memory management in .NETDotNetFest - Let’s refresh our memory! Memory management in .NET
DotNetFest - Let’s refresh our memory! Memory management in .NET
 
VISUG - Approaches for application request throttling
VISUG - Approaches for application request throttlingVISUG - Approaches for application request throttling
VISUG - Approaches for application request throttling
 

Último

Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 

Último (20)

Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 

.NET Code Coverage for Continuous Integration using TeamCity and dotCover

  • 1. .NET Code Coverage for Continuous Integration using TeamCity and dotCover Maarten Balliauw Technical Evangelist maarten.balliauw@jetbrains.com @maartenballiauw
  • 2. Who am I? Maarten Balliauw Belgium (Antwerp) Technical Evangelist, JetBrains Focus on web ASP.NET MVC, Windows Azure, ... PHP, ... Big passion: Cloud (Windows Azure) Home brewer http://blog.maartenballiauw.be @maartenballiauw
  • 3. Have a question? Use the Question Pane. We’ll try and answer as we go along.
  • 5. Agenda Code coverage dotCover Code coverage during CI Command line runner TeamCity integration TeamCity service messages TeamCity Visual Studio plugin
  • 6. Code Coverage “Code coverage is a measure used to describe the degree to which the source code of a program is tested by a particular test suite.” Wikipedia - http://en.wikipedia.org/wiki/Code_coverage
  • 7. demo Code Coverage Using dotCover to capture Code Coverage
  • 8. Holy grail? Code Coverage is just a tool Verify # of statements executed during a test run 100% coverage != 100% bug free / well-tested code It’s relatively easy to cover all lines of code It’s much harder to test them correctly Should we aim for 100%? We should care about code coverage! Identify parts of code not covered by any type of test and reduce chance of defects
  • 9. dotCover Capture which statements have been executed (using profiler) During unit test During manual test Display coverage percentage Statement level coverage visualization Hotspots to quickly identify parts that need testing Filtering, exporting, ... Navigate between code and test Command line runner
  • 10. demo dotCover 101 A quick look at dotCover
  • 11. When to perform code coverage? Let’s counter that with a question: When to run unit tests? On developer machine is always nice, but… Continuous Integration is our view of the truth Compile, Run tests, Code coverage, …
  • 12. TeamCity JetBrains Continuous Integration Server Project Logical name/unit Build Configuration Something we want to run Build Steps Various steps we want to run (like compilation or unit tests, .NET, Java, deployment, …) Build Execution log and artifacts of a build configuration after run Integrated build step for running NUnit + code coverage using dotCover
  • 13. demo TeamCity 101 A quick look at TeamCity
  • 14. TeamCity Service Messages Test resuls from xUnit were reported using TeamCity Service Messages http://confluence.jetbrains.com/display/TCD8/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity- Reporting.NETCodeCoverageResults ##teamcity[testStarted name='testName' captureStandardOutput='<true/false>'] ##teamcity[testFinished name='testName' duration='<test_duration_in_milliseconds>'] We can report coverage using this technique as well! ##teamcity[importData type='dotNetCoverage' tool='dotcover' path='coverage.xml' Now all we need is way to run tests with coverage...
  • 15. dotCover Command Line Runner dotcover.exe Create configuration (which executable, which assemblies, …) Run dotcover.exe with that configuration Export to XML, HTML, …
  • 16. demo dotCover command line runner Using the command line runner
  • 17. demo TeamCity plugin for Visual Studio Making the story complete
  • 18. Conclusion Code coverage dotCover Code coverage during CI Command line runner TeamCity integration TeamCity service messages Visual Studio Plugin
  • 20. Resources Try dotCover now! http://www.jetbrains.com/dotcover Tutorials Getting started http://confluence.jetbrains.com/display/NETCOM/Getting+Started+with+dotCover Command line runner http://confluence.jetbrains.com/display/NETCOM/How+to+Run+Code+Coverage+from+Command+Line+in+dot Cover dotCover in TeamCity http://confluence.jetbrains.com/display/NETCOM/How+to+Run+Code+Coverage+with+dotCover+in+TeamCity TeamCity Service Messages http://confluence.jetbrains.com/display/TCD8/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwit hTeamCity-Reporting.NETCodeCoverageResults
  • 22. Thank you for joining us! Want to learn more? Follow @dotcover on Twitter to learn product tips and register for upcoming webinars