SlideShare una empresa de Scribd logo
1 de 39
Descargar para leer sin conexión
Code Coverage 
a stab to the questions of What, When, Why, and How 
Aug 2011 the nugget presentation 
prepared by Ernani Omar Cruz 
Thursday, August 25, 11
Usual Developer’s Coding Cycle 
Code Test Diagnose Fix 
usually a time 
consuming process 
= COST 
Overall Goal is to minimize time spent on “Fixing” 
Thursday, August 25, 11
What? 
Code Coverage 
is a measure used in software testing. It describes the degree 
to which the source code of a program has been tested. 
It is a form of testing that inspects the code directly 
and is therefore a form of white box testing. 
Thursday, August 25, 11
Some Types of Code 
Coverages 
• Statement 
• Function 
• Path 
• Condition 
• Branch 
Statement coverage is a code coverage metric that tells you whether the flow of control reached every 
executable statement of source code at least once. 
Has each function in the program been called? This metric reports whether you invoked each 
function or procedure. 
This metric reports whether each of the possible paths in each function have been followed. A 
path is a unique sequence of branches from the function entry to the exit. 
Condition coverage reports the true or false outcome of each condition. 
A branch is the outcome of a decision, so branch coverage simply measures which decision outcomes 
have been tested. 
and more! 
Thursday, August 25, 11
Which Do We Use? 
It Depends to What We are trying to Code! 
Accomplish 
But the Point to Note is To Have A Tested Code that it 
does what is EXPECTED of It to Do. 
Thursday, August 25, 11
When? 
It Starts with Construction 
Thursday, August 25, 11
Early detection of flaws 
Higher Confidence 
Everyone Happy 
Thursday, August 25, 11
Why? 
Early detection of flaws 
Higher Confidence 
Everyone Happy 
Thursday, August 25, 11
Why? 
Why do we need to do this? 
Early detection of flaws 
Higher Confidence 
Everyone Happy 
Thursday, August 25, 11
Why? 
Why do we need to do this? 
To Ensure Quality 
Early detection of flaws 
Higher Confidence 
Everyone Happy 
Thursday, August 25, 11
Why? 
Why do we need to do this? 
To Ensure Quality 
Minimize Bugs/Defects 
Early detection of flaws 
Higher Confidence 
Everyone Happy 
Thursday, August 25, 11
Why? 
Why do we need to do this? 
To Ensure Quality 
Minimize Bugs/Defects 
Early detection of flaws 
Avoid Cost due to Rework and Delay 
Higher Confidence 
Everyone Happy 
Thursday, August 25, 11
How much? 
How much are we going to need to do this properly? 
It Depends. 
Requires Discretion 
70-80% Coverage 
Code coverage of 70-80% is a reasonable goal for system test of most 
projects with most coverage metrics. Use a higher goal for projects 
specifically organized for high testability or that have high failure costs. 
Minimum code coverage for unit testing can be 10-20% higher than for 
system testing. --- Bullseye “http://www.bullseye.com/minimum.html” 
Thursday, August 25, 11
Why Not 100% 
Coverage? 
Although 100% code coverage may appear like a best 
possible effort, even 100% code coverage is estimated to 
only expose about half the faults in a system. Low code 
coverage indicates inadequate testing, but high code 
coverage guarantees nothing. 
In a large system, achieving 100% code coverage is generally not cost effective. Some reasons are listed below. 
• Some test cases are expensive to reproduce but are highly improbable. The cost to benefit ratio does not justify repeating these tests 
simply to record the code coverage. 
• Checks may exist for unexpected error conditions. Layers of code might obscure whether errors in low-level code propagate up to 
higher level code. An engineer might decide that handling all errors creates a more robust solution than tracing the possible errors. 
• Unreachable code in the current version might become reachable in a future version. An engineer might address uncertainty about 
future development by investing a little more effort to add some capability that is not currently needed. 
• Code shared among several projects is only partially utilized by the project under test. 
Generally, the tester should stop increasing code coverage when the tests become contrived. When you focus more and more on making the 
coverage numbers better, your motivation shifts away from finding bugs. 
Thursday, August 25, 11
“100% code coverage isn't an achievement, it's a minimum 
requirement. If you write a line of code, you'd better test it.” 
- Robert Cecil Martin aka “Uncle Bob” 
In the end it all boils down to ROI and pragmatism. Some apps need more testing than others. 
Some modules need more testing than others. Some bugs need more fixing than others. There 
will always be a judgment call about whether additional time and money spent on automated 
testing and coverage are justified or are just a premature optimization. 
Thursday, August 25, 11
Roles Each Has to Fill 
• Project Manager 
• Team Lead 
• Developer 
• Peer 
• Tester/QAs 
The one who allocates resources, shapes priorities, coordinates interactions with 
project stakeholders and keeps team focused on goals. 
The leader of the Development team on the project. 
The team member who writes the software and performs the unit tests. 
Co-Team member; The one who can help out, review, and check the 
work of a team member (usually developer) 
The one responsible to drive out proper testing and validates 
functionality 
Everyone Has A Responsibility/Stake in Ensuring Quality 
Thursday, August 25, 11
(some) Tools Available 
that can help us measure/analyze code 
coverage 
• Cobertura 
• Clover 
• DevPartner 
• Emma 
• JTest 
• Kalistick 
• CoView and CoAnt 
• Bullseye for C++ 
• Sonar 
Thursday, August 25, 11
(some) Tools Available 
that can help us measure/analyze code 
coverage 
• Cobertura 
• Clover 
• DevPartner 
• Emma 
• JTest 
• Kalistick 
• CoView and CoAnt 
• Bullseye for C++ 
• Sonar 
Cobertura is an open source tool that measures test coverage by instrumenting a code base and watching which lines of 
code are and are not executed as the test suite runs 
Thursday, August 25, 11
(some) Tools Available 
that can help us measure/analyze code 
coverage 
• Cobertura 
• Clover 
• DevPartner 
• Emma 
• JTest 
• Kalistick 
• CoView and CoAnt 
• Bullseye for C++ 
• Sonar 
Cobertura is an open source tool that measures test coverage by instrumenting a code base and watching which lines of 
code are and are not executed as the test suite runs 
Some features include historical reporting, complete control over the coverage gathering process, command line toolset and 
API for legacy integration and more.Clover also allows testing time to be reduced by only running the tests that cover the 
application code that was modified since the previous build. 
Thursday, August 25, 11
(some) Tools Available 
that can help us measure/analyze code 
coverage 
• Cobertura 
• Clover 
• DevPartner 
• Emma 
• JTest 
• Kalistick 
• CoView and CoAnt 
• Bullseye for C++ 
• Sonar 
Cobertura is an open source tool that measures test coverage by instrumenting a code base and watching which lines of 
code are and are not executed as the test suite runs 
Some features include historical reporting, complete control over the coverage gathering process, command line toolset and 
API for legacy integration and more.Clover also allows testing time to be reduced by only running the tests that cover the 
application code that was modified since the previous build. 
DevPartner Java Edition (DPJ) integrates a set of functionality enabling developers to analyze Java code for Code Quality and 
Complexity, Memory Leak Detection, Memory Profiling and Optimization, Performance Profiling and Optimization, Thread 
Analysis and dead-lock detection, Code Coverage Analysis. 
Thursday, August 25, 11
(some) Tools Available 
that can help us measure/analyze code 
coverage 
• Cobertura 
• Clover 
• DevPartner 
• Emma 
• JTest 
• Kalistick 
• CoView and CoAnt 
• Bullseye for C++ 
• Sonar 
Cobertura is an open source tool that measures test coverage by instrumenting a code base and watching which lines of 
code are and are not executed as the test suite runs 
Some features include historical reporting, complete control over the coverage gathering process, command line toolset and 
API for legacy integration and more.Clover also allows testing time to be reduced by only running the tests that cover the 
application code that was modified since the previous build. 
DevPartner Java Edition (DPJ) integrates a set of functionality enabling developers to analyze Java code for Code Quality and 
Complexity, Memory Leak Detection, Memory Profiling and Optimization, Performance Profiling and Optimization, Thread 
Analysis and dead-lock detection, Code Coverage Analysis. 
EMMA supports class, method, line, and basic block coverage, aggregated at "all", package, source file, class, and method 
levels. Line and block metrics are offered in "normal" and "weighted" varieties. Other entries in this FAQ provide details on 
these. EMMA does not do branch or path coverage. However, EMMA reports fractional line coverage to help you visualize 
untested branches in code. 
Thursday, August 25, 11
(some) Tools Available 
that can help us measure/analyze code 
coverage 
• Cobertura 
• Clover 
• DevPartner 
• Emma 
• JTest 
• Kalistick 
• CoView and CoAnt 
• Bullseye for C++ 
• Sonar 
Cobertura is an open source tool that measures test coverage by instrumenting a code base and watching which lines of 
code are and are not executed as the test suite runs 
Some features include historical reporting, complete control over the coverage gathering process, command line toolset and 
API for legacy integration and more.Clover also allows testing time to be reduced by only running the tests that cover the 
application code that was modified since the previous build. 
DevPartner Java Edition (DPJ) integrates a set of functionality enabling developers to analyze Java code for Code Quality and 
Complexity, Memory Leak Detection, Memory Profiling and Optimization, Performance Profiling and Optimization, Thread 
Analysis and dead-lock detection, Code Coverage Analysis. 
EMMA supports class, method, line, and basic block coverage, aggregated at "all", package, source file, class, and method 
levels. Line and block metrics are offered in "normal" and "weighted" varieties. Other entries in this FAQ provide details on 
these. EMMA does not do branch or path coverage. However, EMMA reports fractional line coverage to help you visualize 
untested branches in code. 
JTest’s basic functionality includes Unit test-case generation, static analysis, regression testing, runtime error 
detection, and code review. 
Thursday, August 25, 11
(some) Tools Available 
that can help us measure/analyze code 
coverage 
• Cobertura 
• Clover 
• DevPartner 
• Emma 
• JTest 
• Kalistick 
• CoView and CoAnt 
• Bullseye for C++ 
• Sonar 
Cobertura is an open source tool that measures test coverage by instrumenting a code base and watching which lines of 
code are and are not executed as the test suite runs 
Some features include historical reporting, complete control over the coverage gathering process, command line toolset and 
API for legacy integration and more.Clover also allows testing time to be reduced by only running the tests that cover the 
application code that was modified since the previous build. 
DevPartner Java Edition (DPJ) integrates a set of functionality enabling developers to analyze Java code for Code Quality and 
Complexity, Memory Leak Detection, Memory Profiling and Optimization, Performance Profiling and Optimization, Thread 
Analysis and dead-lock detection, Code Coverage Analysis. 
EMMA supports class, method, line, and basic block coverage, aggregated at "all", package, source file, class, and method 
levels. Line and block metrics are offered in "normal" and "weighted" varieties. Other entries in this FAQ provide details on 
these. EMMA does not do branch or path coverage. However, EMMA reports fractional line coverage to help you visualize 
untested branches in code. 
JTest’s basic functionality includes Unit test-case generation, static analysis, regression testing, runtime error 
detection, and code review. 
A third party application that analyzes the codes with different perspectives that aids users in strategizing release plans. 
Thursday, August 25, 11
(some) Tools Available 
that can help us measure/analyze code 
coverage 
• Cobertura 
• Clover 
• DevPartner 
• Emma 
• JTest 
• Kalistick 
• CoView and CoAnt 
• Bullseye for C++ 
• Sonar 
Cobertura is an open source tool that measures test coverage by instrumenting a code base and watching which lines of 
code are and are not executed as the test suite runs 
Some features include historical reporting, complete control over the coverage gathering process, command line toolset and 
API for legacy integration and more.Clover also allows testing time to be reduced by only running the tests that cover the 
application code that was modified since the previous build. 
DevPartner Java Edition (DPJ) integrates a set of functionality enabling developers to analyze Java code for Code Quality and 
Complexity, Memory Leak Detection, Memory Profiling and Optimization, Performance Profiling and Optimization, Thread 
Analysis and dead-lock detection, Code Coverage Analysis. 
EMMA supports class, method, line, and basic block coverage, aggregated at "all", package, source file, class, and method 
levels. Line and block metrics are offered in "normal" and "weighted" varieties. Other entries in this FAQ provide details on 
these. EMMA does not do branch or path coverage. However, EMMA reports fractional line coverage to help you visualize 
untested branches in code. 
JTest’s basic functionality includes Unit test-case generation, static analysis, regression testing, runtime error 
detection, and code review. 
A third party application that analyzes the codes with different perspectives that aids users in strategizing release plans. 
Codign Software is committed to providing a valuable, affordable solution for metrics, automating JUnit 
tests, mock object creation, path & branch coverage and code testability. We keep our costs low because 
we only develop features that have benefit and make sense. 
Thursday, August 25, 11
(some) Tools Available 
that can help us measure/analyze code 
coverage 
• Cobertura 
• Clover 
• DevPartner 
• Emma 
• JTest 
• Kalistick 
• CoView and CoAnt 
• Bullseye for C++ 
• Sonar 
Cobertura is an open source tool that measures test coverage by instrumenting a code base and watching which lines of 
code are and are not executed as the test suite runs 
Some features include historical reporting, complete control over the coverage gathering process, command line toolset and 
API for legacy integration and more.Clover also allows testing time to be reduced by only running the tests that cover the 
application code that was modified since the previous build. 
DevPartner Java Edition (DPJ) integrates a set of functionality enabling developers to analyze Java code for Code Quality and 
Complexity, Memory Leak Detection, Memory Profiling and Optimization, Performance Profiling and Optimization, Thread 
Analysis and dead-lock detection, Code Coverage Analysis. 
EMMA supports class, method, line, and basic block coverage, aggregated at "all", package, source file, class, and method 
levels. Line and block metrics are offered in "normal" and "weighted" varieties. Other entries in this FAQ provide details on 
these. EMMA does not do branch or path coverage. However, EMMA reports fractional line coverage to help you visualize 
untested branches in code. 
JTest’s basic functionality includes Unit test-case generation, static analysis, regression testing, runtime error 
detection, and code review. 
A third party application that analyzes the codes with different perspectives that aids users in strategizing release plans. 
Codign Software is committed to providing a valuable, affordable solution for metrics, automating JUnit 
tests, mock object creation, path & branch coverage and code testability. We keep our costs low because 
we only develop features that have benefit and make sense. 
BullseyeCoverage is a code coverage analyzer for C++ and C that tells you how much of your source code 
was tested. You can use this information to quickly focus your testing effort and pinpoint areas that need to 
be reviewed. Code coverage analysis is useful during unit testing, integration testing, and final release. 
Thursday, August 25, 11
(some) Tools Available 
that can help us measure/analyze code 
coverage 
• Cobertura 
• Clover 
• DevPartner 
• Emma 
• JTest 
• Kalistick 
• CoView and CoAnt 
• Bullseye for C++ 
• Sonar 
Cobertura is an open source tool that measures test coverage by instrumenting a code base and watching which lines of 
code are and are not executed as the test suite runs 
Some features include historical reporting, complete control over the coverage gathering process, command line toolset and 
API for legacy integration and more.Clover also allows testing time to be reduced by only running the tests that cover the 
application code that was modified since the previous build. 
DevPartner Java Edition (DPJ) integrates a set of functionality enabling developers to analyze Java code for Code Quality and 
Complexity, Memory Leak Detection, Memory Profiling and Optimization, Performance Profiling and Optimization, Thread 
Analysis and dead-lock detection, Code Coverage Analysis. 
EMMA supports class, method, line, and basic block coverage, aggregated at "all", package, source file, class, and method 
levels. Line and block metrics are offered in "normal" and "weighted" varieties. Other entries in this FAQ provide details on 
these. EMMA does not do branch or path coverage. However, EMMA reports fractional line coverage to help you visualize 
untested branches in code. 
JTest’s basic functionality includes Unit test-case generation, static analysis, regression testing, runtime error 
detection, and code review. 
A third party application that analyzes the codes with different perspectives that aids users in strategizing release plans. 
Codign Software is committed to providing a valuable, affordable solution for metrics, automating JUnit 
tests, mock object creation, path & branch coverage and code testability. We keep our costs low because 
we only develop features that have benefit and make sense. 
BullseyeCoverage is a code coverage analyzer for C++ and C that tells you how much of your source code 
was tested. You can use this information to quickly focus your testing effort and pinpoint areas that need to 
be reviewed. Code coverage analysis is useful during unit testing, integration testing, and final release. 
Sonar is an open platform to manage code quality. As such, it covers the 7 axes of code quality: Architecture and Design, Duplications, 
Thursday, August 25, 11
(some) Tools Available 
that can help us measure/analyze code 
coverage 
• Cobertura 
• Clover 
• DevPartner 
• Emma 
• JTest 
• Kalistick 
• CoView and CoAnt 
• Bullseye for C++ 
• Sonar 
Cobertura is an open source tool that measures test coverage by instrumenting a code base and watching which lines of 
code are and are not executed as the test suite runs 
Some features include historical reporting, complete control over the coverage gathering process, command line toolset and 
API for legacy integration and more.Clover also allows testing time to be reduced by only running the tests that cover the 
application code that was modified since the previous build. 
DevPartner Java Edition (DPJ) integrates a set of functionality enabling developers to analyze Java code for Code Quality and 
Complexity, Memory Leak Detection, Memory Profiling and Optimization, Performance Profiling and Optimization, Thread 
Analysis and dead-lock detection, Code Coverage Analysis. 
EMMA supports class, method, line, and basic block coverage, aggregated at "all", package, source file, class, and method 
levels. Line and block metrics are offered in "normal" and "weighted" varieties. Other entries in this FAQ provide details on 
these. EMMA does not do branch or path coverage. However, EMMA reports fractional line coverage to help you visualize 
untested branches in code. 
JTest’s basic functionality includes Unit test-case generation, static analysis, regression testing, runtime error 
detection, and code review. 
A third party application that analyzes the codes with different perspectives that aids users in strategizing release plans. 
Codign Software is committed to providing a valuable, affordable solution for metrics, automating JUnit 
tests, mock object creation, path & branch coverage and code testability. We keep our costs low because 
we only develop features that have benefit and make sense. 
BullseyeCoverage is a code coverage analyzer for C++ and C that tells you how much of your source code 
was tested. You can use this information to quickly focus your testing effort and pinpoint areas that need to 
be reviewed. Code coverage analysis is useful during unit testing, integration testing, and final release. 
Sonar is an open platform to manage code quality. As such, it covers the 7 axes of code quality: Architecture and Design, Duplications, 
comments, coding rules, unit tests, potential bugs, and complexity. 
Thursday, August 25, 11
So What do we Use? 
Any. 
Thursday, August 25, 11
Thursday, August 25, 11
Quality is central 
Sonar is a web-based application. Rules, alerts, thresholds, exclusions, settings… can be configured online. By leveraging its database, Sonar not only allows to combine metrics 
altogether but also to mix them with historical measures. 
Sonar has got a very efficient way of navigating, a balance between high-level view, dashboard, TimeMachine and defect hunting 
tools. This enables to quickly uncover projects and / or components that are in Technical Debt to establish action plans. 
Thursday, August 25, 11
Features 
All projects at a glance 
Drill down to source code 
Coding rules 
Unit Tests 
Standard Metrics 
Time Machine 
Maven Ready 
Easiness 
Leverage existing components 
Plugins 
Security 
Thursday, August 25, 11
Thursday, August 25, 11
Software Quality Assessment based on 
Lifecycle Expectations 
The SQALE method is particularly devoted to the 
management of the Technical debt (or design debt) of 
AGILE software developments. It allows: 
1 To define clearly what creates the technical debt 
2 To estimate correctly this debt 
3 To describe this debt into various parts relating to 
the testability, the reliability, the changeability, the 
maintainability… This classification allows to 
analyze the impact of the debt and to define the 
priority of code refactoring/remediation activities. 
Text 
Thursday, August 25, 11
Having Automated Test Suites 
Prepares Us Towards Automated Integration 
Thursday, August 25, 11
It’s Free. 
Thursday, August 25, 11
Thank You. 
Thursday, August 25, 11
References 
• http://en.wikipedia.org/wiki/Code_coverage 
• http://www.bullseye.com/statementCoverage.html 
• http://www.bullseye.com/paper.html 
• http://www.bullseye.com/minimum.html 
• http://www.sonarsource.org/ 
• http://www.atlassian.com/software/clover/ 
• http://www.bullseye.com/coverage.html 
• http://www.codign.com/pathbranchcode.html 
• http://software-development-thoughts.blogspot.com/2011/04/ 
how-much-code-coverage-do-you-really.html 
Thursday, August 25, 11
References 
• http://en.wikipedia.org/wiki/Code_coverage#Software_tools 
• http://www.codecoveragetools.com/index.php/coverage-process/ 
code-coverage-tools-java.html 
• http://emma.sourceforge.net/faq.html#faq-N10042 
• http://en.wikipedia.org/wiki/EMMA_(code_coverage_tool) 
• http://en.wikipedia.org/wiki/DevPartner 
• http://en.wikipedia.org/wiki/Clover_(software) 
• http://cobertura.sourceforge.net/ 
• http://en.wikipedia.org/wiki/Jtest 
Thursday, August 25, 11
References 
• http://www.kalistick.com/software-radiography- 
platform.html 
• http://www.codign.com/ 
• http://www.bullseye.com/productInfo.html 
• http://www.sqale.org/details 
Thursday, August 25, 11

Más contenido relacionado

La actualidad más candente

Understanding Unit Testing
Understanding Unit TestingUnderstanding Unit Testing
Understanding Unit Testingikhwanhayat
 
Testing concepts ppt
Testing concepts pptTesting concepts ppt
Testing concepts pptRathna Priya
 
Software Testing Process
Software Testing ProcessSoftware Testing Process
Software Testing Processguest1f2740
 
Unit Testing Concepts and Best Practices
Unit Testing Concepts and Best PracticesUnit Testing Concepts and Best Practices
Unit Testing Concepts and Best PracticesDerek Smith
 
UNIT TESTING PPT
UNIT TESTING PPTUNIT TESTING PPT
UNIT TESTING PPTsuhasreddy1
 
Unit Testing And Mocking
Unit Testing And MockingUnit Testing And Mocking
Unit Testing And MockingJoe Wilson
 
Basic software-testing-concepts
Basic software-testing-conceptsBasic software-testing-concepts
Basic software-testing-conceptsmedsherb
 
Automation testing introduction for FujiNet
Automation testing introduction for FujiNetAutomation testing introduction for FujiNet
Automation testing introduction for FujiNetHai Tran Son
 
Software Testing 101
Software Testing 101Software Testing 101
Software Testing 101QA Hannah
 
Introduction to Automation Testing
Introduction to Automation TestingIntroduction to Automation Testing
Introduction to Automation TestingArchana Krushnan
 
Agile testing - Testing From Day 1
Agile testing - Testing From Day 1Agile testing - Testing From Day 1
Agile testing - Testing From Day 1Kaizenko
 
Software testing.ppt
Software testing.pptSoftware testing.ppt
Software testing.pptKomal Garg
 
INTRODUCTION TO ISTQB FOUNDATION LEVEL - CTFL
INTRODUCTION TO ISTQB FOUNDATION LEVEL - CTFLINTRODUCTION TO ISTQB FOUNDATION LEVEL - CTFL
INTRODUCTION TO ISTQB FOUNDATION LEVEL - CTFLRahul R Pandya
 
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...Ankit Prajapati
 

La actualidad más candente (20)

Understanding Unit Testing
Understanding Unit TestingUnderstanding Unit Testing
Understanding Unit Testing
 
Testing concepts ppt
Testing concepts pptTesting concepts ppt
Testing concepts ppt
 
Testing in Agile Development
Testing in Agile DevelopmentTesting in Agile Development
Testing in Agile Development
 
Software Testing Process
Software Testing ProcessSoftware Testing Process
Software Testing Process
 
Test automation process
Test automation processTest automation process
Test automation process
 
Automation testing
Automation testingAutomation testing
Automation testing
 
Unit Testing Concepts and Best Practices
Unit Testing Concepts and Best PracticesUnit Testing Concepts and Best Practices
Unit Testing Concepts and Best Practices
 
Testing methodology
Testing methodologyTesting methodology
Testing methodology
 
UNIT TESTING PPT
UNIT TESTING PPTUNIT TESTING PPT
UNIT TESTING PPT
 
Unit Testing And Mocking
Unit Testing And MockingUnit Testing And Mocking
Unit Testing And Mocking
 
Basic software-testing-concepts
Basic software-testing-conceptsBasic software-testing-concepts
Basic software-testing-concepts
 
Automation testing introduction for FujiNet
Automation testing introduction for FujiNetAutomation testing introduction for FujiNet
Automation testing introduction for FujiNet
 
Software Testing 101
Software Testing 101Software Testing 101
Software Testing 101
 
Introduction to Automation Testing
Introduction to Automation TestingIntroduction to Automation Testing
Introduction to Automation Testing
 
Agile testing - Testing From Day 1
Agile testing - Testing From Day 1Agile testing - Testing From Day 1
Agile testing - Testing From Day 1
 
Software testing.ppt
Software testing.pptSoftware testing.ppt
Software testing.ppt
 
INTRODUCTION TO ISTQB FOUNDATION LEVEL - CTFL
INTRODUCTION TO ISTQB FOUNDATION LEVEL - CTFLINTRODUCTION TO ISTQB FOUNDATION LEVEL - CTFL
INTRODUCTION TO ISTQB FOUNDATION LEVEL - CTFL
 
Manual testing ppt
Manual testing pptManual testing ppt
Manual testing ppt
 
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
 
Junit
JunitJunit
Junit
 

Similar a Code Coverage

Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald BelchamGetting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham.NET Conf UY
 
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-54&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5hemasubbu08
 
Topic production code
Topic production codeTopic production code
Topic production codeKavi Kumar
 
Cross functional peer review preso 10-01-2013
Cross functional peer review preso 10-01-2013Cross functional peer review preso 10-01-2013
Cross functional peer review preso 10-01-2013SmartBear
 
SW Verification presentation
SW Verification presentationSW Verification presentation
SW Verification presentationKiril Delovski
 
Unit testing - what is its importance
Unit testing - what is its importanceUnit testing - what is its importance
Unit testing - what is its importanceTestingXperts
 
Automating The Process For Building Reliable Software
Automating The Process For Building Reliable SoftwareAutomating The Process For Building Reliable Software
Automating The Process For Building Reliable Softwareguest8861ff
 
Automated Testing Using Selenium
Automated Testing Using SeleniumAutomated Testing Using Selenium
Automated Testing Using SeleniumTechWell
 
Google, quality and you
Google, quality and youGoogle, quality and you
Google, quality and younelinger
 
Testing and Mocking Object - The Art of Mocking.
Testing and Mocking Object - The Art of Mocking.Testing and Mocking Object - The Art of Mocking.
Testing and Mocking Object - The Art of Mocking.Deepak Singhvi
 
How to Actually DO High-volume Automated Testing
How to Actually DO High-volume Automated TestingHow to Actually DO High-volume Automated Testing
How to Actually DO High-volume Automated TestingTechWell
 
Top 5 Pitfalls of Test Automation and How To Avoid Them
Top 5 Pitfalls of Test Automation and How To Avoid ThemTop 5 Pitfalls of Test Automation and How To Avoid Them
Top 5 Pitfalls of Test Automation and How To Avoid ThemSundar Sritharan
 
5 Steps to Jump Start Your Test Automation
5 Steps to Jump Start Your Test Automation5 Steps to Jump Start Your Test Automation
5 Steps to Jump Start Your Test AutomationSauce Labs
 
Code Quality - Security
Code Quality - SecurityCode Quality - Security
Code Quality - Securitysedukull
 

Similar a Code Coverage (20)

Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald BelchamGetting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham
 
Why test with flex unit
Why test with flex unitWhy test with flex unit
Why test with flex unit
 
Software testing
Software testingSoftware testing
Software testing
 
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-54&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Topic production code
Topic production codeTopic production code
Topic production code
 
Cross functional peer review preso 10-01-2013
Cross functional peer review preso 10-01-2013Cross functional peer review preso 10-01-2013
Cross functional peer review preso 10-01-2013
 
SW Verification presentation
SW Verification presentationSW Verification presentation
SW Verification presentation
 
Unit testing - what is its importance
Unit testing - what is its importanceUnit testing - what is its importance
Unit testing - what is its importance
 
Automating The Process For Building Reliable Software
Automating The Process For Building Reliable SoftwareAutomating The Process For Building Reliable Software
Automating The Process For Building Reliable Software
 
Automated Testing Using Selenium
Automated Testing Using SeleniumAutomated Testing Using Selenium
Automated Testing Using Selenium
 
Software testing (2)
Software testing (2)Software testing (2)
Software testing (2)
 
Google, quality and you
Google, quality and youGoogle, quality and you
Google, quality and you
 
Testing and Mocking Object - The Art of Mocking.
Testing and Mocking Object - The Art of Mocking.Testing and Mocking Object - The Art of Mocking.
Testing and Mocking Object - The Art of Mocking.
 
testing
testingtesting
testing
 
How to Actually DO High-volume Automated Testing
How to Actually DO High-volume Automated TestingHow to Actually DO High-volume Automated Testing
How to Actually DO High-volume Automated Testing
 
Top 5 Pitfalls of Test Automation and How To Avoid Them
Top 5 Pitfalls of Test Automation and How To Avoid ThemTop 5 Pitfalls of Test Automation and How To Avoid Them
Top 5 Pitfalls of Test Automation and How To Avoid Them
 
5 Steps to Jump Start Your Test Automation
5 Steps to Jump Start Your Test Automation5 Steps to Jump Start Your Test Automation
5 Steps to Jump Start Your Test Automation
 
Software testing
Software testingSoftware testing
Software testing
 
Code Quality - Security
Code Quality - SecurityCode Quality - Security
Code Quality - Security
 

Último

Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 

Último (20)

Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 

Code Coverage

  • 1. Code Coverage a stab to the questions of What, When, Why, and How Aug 2011 the nugget presentation prepared by Ernani Omar Cruz Thursday, August 25, 11
  • 2. Usual Developer’s Coding Cycle Code Test Diagnose Fix usually a time consuming process = COST Overall Goal is to minimize time spent on “Fixing” Thursday, August 25, 11
  • 3. What? Code Coverage is a measure used in software testing. It describes the degree to which the source code of a program has been tested. It is a form of testing that inspects the code directly and is therefore a form of white box testing. Thursday, August 25, 11
  • 4. Some Types of Code Coverages • Statement • Function • Path • Condition • Branch Statement coverage is a code coverage metric that tells you whether the flow of control reached every executable statement of source code at least once. Has each function in the program been called? This metric reports whether you invoked each function or procedure. This metric reports whether each of the possible paths in each function have been followed. A path is a unique sequence of branches from the function entry to the exit. Condition coverage reports the true or false outcome of each condition. A branch is the outcome of a decision, so branch coverage simply measures which decision outcomes have been tested. and more! Thursday, August 25, 11
  • 5. Which Do We Use? It Depends to What We are trying to Code! Accomplish But the Point to Note is To Have A Tested Code that it does what is EXPECTED of It to Do. Thursday, August 25, 11
  • 6. When? It Starts with Construction Thursday, August 25, 11
  • 7. Early detection of flaws Higher Confidence Everyone Happy Thursday, August 25, 11
  • 8. Why? Early detection of flaws Higher Confidence Everyone Happy Thursday, August 25, 11
  • 9. Why? Why do we need to do this? Early detection of flaws Higher Confidence Everyone Happy Thursday, August 25, 11
  • 10. Why? Why do we need to do this? To Ensure Quality Early detection of flaws Higher Confidence Everyone Happy Thursday, August 25, 11
  • 11. Why? Why do we need to do this? To Ensure Quality Minimize Bugs/Defects Early detection of flaws Higher Confidence Everyone Happy Thursday, August 25, 11
  • 12. Why? Why do we need to do this? To Ensure Quality Minimize Bugs/Defects Early detection of flaws Avoid Cost due to Rework and Delay Higher Confidence Everyone Happy Thursday, August 25, 11
  • 13. How much? How much are we going to need to do this properly? It Depends. Requires Discretion 70-80% Coverage Code coverage of 70-80% is a reasonable goal for system test of most projects with most coverage metrics. Use a higher goal for projects specifically organized for high testability or that have high failure costs. Minimum code coverage for unit testing can be 10-20% higher than for system testing. --- Bullseye “http://www.bullseye.com/minimum.html” Thursday, August 25, 11
  • 14. Why Not 100% Coverage? Although 100% code coverage may appear like a best possible effort, even 100% code coverage is estimated to only expose about half the faults in a system. Low code coverage indicates inadequate testing, but high code coverage guarantees nothing. In a large system, achieving 100% code coverage is generally not cost effective. Some reasons are listed below. • Some test cases are expensive to reproduce but are highly improbable. The cost to benefit ratio does not justify repeating these tests simply to record the code coverage. • Checks may exist for unexpected error conditions. Layers of code might obscure whether errors in low-level code propagate up to higher level code. An engineer might decide that handling all errors creates a more robust solution than tracing the possible errors. • Unreachable code in the current version might become reachable in a future version. An engineer might address uncertainty about future development by investing a little more effort to add some capability that is not currently needed. • Code shared among several projects is only partially utilized by the project under test. Generally, the tester should stop increasing code coverage when the tests become contrived. When you focus more and more on making the coverage numbers better, your motivation shifts away from finding bugs. Thursday, August 25, 11
  • 15. “100% code coverage isn't an achievement, it's a minimum requirement. If you write a line of code, you'd better test it.” - Robert Cecil Martin aka “Uncle Bob” In the end it all boils down to ROI and pragmatism. Some apps need more testing than others. Some modules need more testing than others. Some bugs need more fixing than others. There will always be a judgment call about whether additional time and money spent on automated testing and coverage are justified or are just a premature optimization. Thursday, August 25, 11
  • 16. Roles Each Has to Fill • Project Manager • Team Lead • Developer • Peer • Tester/QAs The one who allocates resources, shapes priorities, coordinates interactions with project stakeholders and keeps team focused on goals. The leader of the Development team on the project. The team member who writes the software and performs the unit tests. Co-Team member; The one who can help out, review, and check the work of a team member (usually developer) The one responsible to drive out proper testing and validates functionality Everyone Has A Responsibility/Stake in Ensuring Quality Thursday, August 25, 11
  • 17. (some) Tools Available that can help us measure/analyze code coverage • Cobertura • Clover • DevPartner • Emma • JTest • Kalistick • CoView and CoAnt • Bullseye for C++ • Sonar Thursday, August 25, 11
  • 18. (some) Tools Available that can help us measure/analyze code coverage • Cobertura • Clover • DevPartner • Emma • JTest • Kalistick • CoView and CoAnt • Bullseye for C++ • Sonar Cobertura is an open source tool that measures test coverage by instrumenting a code base and watching which lines of code are and are not executed as the test suite runs Thursday, August 25, 11
  • 19. (some) Tools Available that can help us measure/analyze code coverage • Cobertura • Clover • DevPartner • Emma • JTest • Kalistick • CoView and CoAnt • Bullseye for C++ • Sonar Cobertura is an open source tool that measures test coverage by instrumenting a code base and watching which lines of code are and are not executed as the test suite runs Some features include historical reporting, complete control over the coverage gathering process, command line toolset and API for legacy integration and more.Clover also allows testing time to be reduced by only running the tests that cover the application code that was modified since the previous build. Thursday, August 25, 11
  • 20. (some) Tools Available that can help us measure/analyze code coverage • Cobertura • Clover • DevPartner • Emma • JTest • Kalistick • CoView and CoAnt • Bullseye for C++ • Sonar Cobertura is an open source tool that measures test coverage by instrumenting a code base and watching which lines of code are and are not executed as the test suite runs Some features include historical reporting, complete control over the coverage gathering process, command line toolset and API for legacy integration and more.Clover also allows testing time to be reduced by only running the tests that cover the application code that was modified since the previous build. DevPartner Java Edition (DPJ) integrates a set of functionality enabling developers to analyze Java code for Code Quality and Complexity, Memory Leak Detection, Memory Profiling and Optimization, Performance Profiling and Optimization, Thread Analysis and dead-lock detection, Code Coverage Analysis. Thursday, August 25, 11
  • 21. (some) Tools Available that can help us measure/analyze code coverage • Cobertura • Clover • DevPartner • Emma • JTest • Kalistick • CoView and CoAnt • Bullseye for C++ • Sonar Cobertura is an open source tool that measures test coverage by instrumenting a code base and watching which lines of code are and are not executed as the test suite runs Some features include historical reporting, complete control over the coverage gathering process, command line toolset and API for legacy integration and more.Clover also allows testing time to be reduced by only running the tests that cover the application code that was modified since the previous build. DevPartner Java Edition (DPJ) integrates a set of functionality enabling developers to analyze Java code for Code Quality and Complexity, Memory Leak Detection, Memory Profiling and Optimization, Performance Profiling and Optimization, Thread Analysis and dead-lock detection, Code Coverage Analysis. EMMA supports class, method, line, and basic block coverage, aggregated at "all", package, source file, class, and method levels. Line and block metrics are offered in "normal" and "weighted" varieties. Other entries in this FAQ provide details on these. EMMA does not do branch or path coverage. However, EMMA reports fractional line coverage to help you visualize untested branches in code. Thursday, August 25, 11
  • 22. (some) Tools Available that can help us measure/analyze code coverage • Cobertura • Clover • DevPartner • Emma • JTest • Kalistick • CoView and CoAnt • Bullseye for C++ • Sonar Cobertura is an open source tool that measures test coverage by instrumenting a code base and watching which lines of code are and are not executed as the test suite runs Some features include historical reporting, complete control over the coverage gathering process, command line toolset and API for legacy integration and more.Clover also allows testing time to be reduced by only running the tests that cover the application code that was modified since the previous build. DevPartner Java Edition (DPJ) integrates a set of functionality enabling developers to analyze Java code for Code Quality and Complexity, Memory Leak Detection, Memory Profiling and Optimization, Performance Profiling and Optimization, Thread Analysis and dead-lock detection, Code Coverage Analysis. EMMA supports class, method, line, and basic block coverage, aggregated at "all", package, source file, class, and method levels. Line and block metrics are offered in "normal" and "weighted" varieties. Other entries in this FAQ provide details on these. EMMA does not do branch or path coverage. However, EMMA reports fractional line coverage to help you visualize untested branches in code. JTest’s basic functionality includes Unit test-case generation, static analysis, regression testing, runtime error detection, and code review. Thursday, August 25, 11
  • 23. (some) Tools Available that can help us measure/analyze code coverage • Cobertura • Clover • DevPartner • Emma • JTest • Kalistick • CoView and CoAnt • Bullseye for C++ • Sonar Cobertura is an open source tool that measures test coverage by instrumenting a code base and watching which lines of code are and are not executed as the test suite runs Some features include historical reporting, complete control over the coverage gathering process, command line toolset and API for legacy integration and more.Clover also allows testing time to be reduced by only running the tests that cover the application code that was modified since the previous build. DevPartner Java Edition (DPJ) integrates a set of functionality enabling developers to analyze Java code for Code Quality and Complexity, Memory Leak Detection, Memory Profiling and Optimization, Performance Profiling and Optimization, Thread Analysis and dead-lock detection, Code Coverage Analysis. EMMA supports class, method, line, and basic block coverage, aggregated at "all", package, source file, class, and method levels. Line and block metrics are offered in "normal" and "weighted" varieties. Other entries in this FAQ provide details on these. EMMA does not do branch or path coverage. However, EMMA reports fractional line coverage to help you visualize untested branches in code. JTest’s basic functionality includes Unit test-case generation, static analysis, regression testing, runtime error detection, and code review. A third party application that analyzes the codes with different perspectives that aids users in strategizing release plans. Thursday, August 25, 11
  • 24. (some) Tools Available that can help us measure/analyze code coverage • Cobertura • Clover • DevPartner • Emma • JTest • Kalistick • CoView and CoAnt • Bullseye for C++ • Sonar Cobertura is an open source tool that measures test coverage by instrumenting a code base and watching which lines of code are and are not executed as the test suite runs Some features include historical reporting, complete control over the coverage gathering process, command line toolset and API for legacy integration and more.Clover also allows testing time to be reduced by only running the tests that cover the application code that was modified since the previous build. DevPartner Java Edition (DPJ) integrates a set of functionality enabling developers to analyze Java code for Code Quality and Complexity, Memory Leak Detection, Memory Profiling and Optimization, Performance Profiling and Optimization, Thread Analysis and dead-lock detection, Code Coverage Analysis. EMMA supports class, method, line, and basic block coverage, aggregated at "all", package, source file, class, and method levels. Line and block metrics are offered in "normal" and "weighted" varieties. Other entries in this FAQ provide details on these. EMMA does not do branch or path coverage. However, EMMA reports fractional line coverage to help you visualize untested branches in code. JTest’s basic functionality includes Unit test-case generation, static analysis, regression testing, runtime error detection, and code review. A third party application that analyzes the codes with different perspectives that aids users in strategizing release plans. Codign Software is committed to providing a valuable, affordable solution for metrics, automating JUnit tests, mock object creation, path & branch coverage and code testability. We keep our costs low because we only develop features that have benefit and make sense. Thursday, August 25, 11
  • 25. (some) Tools Available that can help us measure/analyze code coverage • Cobertura • Clover • DevPartner • Emma • JTest • Kalistick • CoView and CoAnt • Bullseye for C++ • Sonar Cobertura is an open source tool that measures test coverage by instrumenting a code base and watching which lines of code are and are not executed as the test suite runs Some features include historical reporting, complete control over the coverage gathering process, command line toolset and API for legacy integration and more.Clover also allows testing time to be reduced by only running the tests that cover the application code that was modified since the previous build. DevPartner Java Edition (DPJ) integrates a set of functionality enabling developers to analyze Java code for Code Quality and Complexity, Memory Leak Detection, Memory Profiling and Optimization, Performance Profiling and Optimization, Thread Analysis and dead-lock detection, Code Coverage Analysis. EMMA supports class, method, line, and basic block coverage, aggregated at "all", package, source file, class, and method levels. Line and block metrics are offered in "normal" and "weighted" varieties. Other entries in this FAQ provide details on these. EMMA does not do branch or path coverage. However, EMMA reports fractional line coverage to help you visualize untested branches in code. JTest’s basic functionality includes Unit test-case generation, static analysis, regression testing, runtime error detection, and code review. A third party application that analyzes the codes with different perspectives that aids users in strategizing release plans. Codign Software is committed to providing a valuable, affordable solution for metrics, automating JUnit tests, mock object creation, path & branch coverage and code testability. We keep our costs low because we only develop features that have benefit and make sense. BullseyeCoverage is a code coverage analyzer for C++ and C that tells you how much of your source code was tested. You can use this information to quickly focus your testing effort and pinpoint areas that need to be reviewed. Code coverage analysis is useful during unit testing, integration testing, and final release. Thursday, August 25, 11
  • 26. (some) Tools Available that can help us measure/analyze code coverage • Cobertura • Clover • DevPartner • Emma • JTest • Kalistick • CoView and CoAnt • Bullseye for C++ • Sonar Cobertura is an open source tool that measures test coverage by instrumenting a code base and watching which lines of code are and are not executed as the test suite runs Some features include historical reporting, complete control over the coverage gathering process, command line toolset and API for legacy integration and more.Clover also allows testing time to be reduced by only running the tests that cover the application code that was modified since the previous build. DevPartner Java Edition (DPJ) integrates a set of functionality enabling developers to analyze Java code for Code Quality and Complexity, Memory Leak Detection, Memory Profiling and Optimization, Performance Profiling and Optimization, Thread Analysis and dead-lock detection, Code Coverage Analysis. EMMA supports class, method, line, and basic block coverage, aggregated at "all", package, source file, class, and method levels. Line and block metrics are offered in "normal" and "weighted" varieties. Other entries in this FAQ provide details on these. EMMA does not do branch or path coverage. However, EMMA reports fractional line coverage to help you visualize untested branches in code. JTest’s basic functionality includes Unit test-case generation, static analysis, regression testing, runtime error detection, and code review. A third party application that analyzes the codes with different perspectives that aids users in strategizing release plans. Codign Software is committed to providing a valuable, affordable solution for metrics, automating JUnit tests, mock object creation, path & branch coverage and code testability. We keep our costs low because we only develop features that have benefit and make sense. BullseyeCoverage is a code coverage analyzer for C++ and C that tells you how much of your source code was tested. You can use this information to quickly focus your testing effort and pinpoint areas that need to be reviewed. Code coverage analysis is useful during unit testing, integration testing, and final release. Sonar is an open platform to manage code quality. As such, it covers the 7 axes of code quality: Architecture and Design, Duplications, Thursday, August 25, 11
  • 27. (some) Tools Available that can help us measure/analyze code coverage • Cobertura • Clover • DevPartner • Emma • JTest • Kalistick • CoView and CoAnt • Bullseye for C++ • Sonar Cobertura is an open source tool that measures test coverage by instrumenting a code base and watching which lines of code are and are not executed as the test suite runs Some features include historical reporting, complete control over the coverage gathering process, command line toolset and API for legacy integration and more.Clover also allows testing time to be reduced by only running the tests that cover the application code that was modified since the previous build. DevPartner Java Edition (DPJ) integrates a set of functionality enabling developers to analyze Java code for Code Quality and Complexity, Memory Leak Detection, Memory Profiling and Optimization, Performance Profiling and Optimization, Thread Analysis and dead-lock detection, Code Coverage Analysis. EMMA supports class, method, line, and basic block coverage, aggregated at "all", package, source file, class, and method levels. Line and block metrics are offered in "normal" and "weighted" varieties. Other entries in this FAQ provide details on these. EMMA does not do branch or path coverage. However, EMMA reports fractional line coverage to help you visualize untested branches in code. JTest’s basic functionality includes Unit test-case generation, static analysis, regression testing, runtime error detection, and code review. A third party application that analyzes the codes with different perspectives that aids users in strategizing release plans. Codign Software is committed to providing a valuable, affordable solution for metrics, automating JUnit tests, mock object creation, path & branch coverage and code testability. We keep our costs low because we only develop features that have benefit and make sense. BullseyeCoverage is a code coverage analyzer for C++ and C that tells you how much of your source code was tested. You can use this information to quickly focus your testing effort and pinpoint areas that need to be reviewed. Code coverage analysis is useful during unit testing, integration testing, and final release. Sonar is an open platform to manage code quality. As such, it covers the 7 axes of code quality: Architecture and Design, Duplications, comments, coding rules, unit tests, potential bugs, and complexity. Thursday, August 25, 11
  • 28. So What do we Use? Any. Thursday, August 25, 11
  • 30. Quality is central Sonar is a web-based application. Rules, alerts, thresholds, exclusions, settings… can be configured online. By leveraging its database, Sonar not only allows to combine metrics altogether but also to mix them with historical measures. Sonar has got a very efficient way of navigating, a balance between high-level view, dashboard, TimeMachine and defect hunting tools. This enables to quickly uncover projects and / or components that are in Technical Debt to establish action plans. Thursday, August 25, 11
  • 31. Features All projects at a glance Drill down to source code Coding rules Unit Tests Standard Metrics Time Machine Maven Ready Easiness Leverage existing components Plugins Security Thursday, August 25, 11
  • 33. Software Quality Assessment based on Lifecycle Expectations The SQALE method is particularly devoted to the management of the Technical debt (or design debt) of AGILE software developments. It allows: 1 To define clearly what creates the technical debt 2 To estimate correctly this debt 3 To describe this debt into various parts relating to the testability, the reliability, the changeability, the maintainability… This classification allows to analyze the impact of the debt and to define the priority of code refactoring/remediation activities. Text Thursday, August 25, 11
  • 34. Having Automated Test Suites Prepares Us Towards Automated Integration Thursday, August 25, 11
  • 35. It’s Free. Thursday, August 25, 11
  • 36. Thank You. Thursday, August 25, 11
  • 37. References • http://en.wikipedia.org/wiki/Code_coverage • http://www.bullseye.com/statementCoverage.html • http://www.bullseye.com/paper.html • http://www.bullseye.com/minimum.html • http://www.sonarsource.org/ • http://www.atlassian.com/software/clover/ • http://www.bullseye.com/coverage.html • http://www.codign.com/pathbranchcode.html • http://software-development-thoughts.blogspot.com/2011/04/ how-much-code-coverage-do-you-really.html Thursday, August 25, 11
  • 38. References • http://en.wikipedia.org/wiki/Code_coverage#Software_tools • http://www.codecoveragetools.com/index.php/coverage-process/ code-coverage-tools-java.html • http://emma.sourceforge.net/faq.html#faq-N10042 • http://en.wikipedia.org/wiki/EMMA_(code_coverage_tool) • http://en.wikipedia.org/wiki/DevPartner • http://en.wikipedia.org/wiki/Clover_(software) • http://cobertura.sourceforge.net/ • http://en.wikipedia.org/wiki/Jtest Thursday, August 25, 11
  • 39. References • http://www.kalistick.com/software-radiography- platform.html • http://www.codign.com/ • http://www.bullseye.com/productInfo.html • http://www.sqale.org/details Thursday, August 25, 11