SlideShare uma empresa Scribd logo
1 de 38
Code Coverage in Theory and in practice form the DO178B perspective  Daniel Liezrowice – Engineering Software Lab (The Israeli Center for Static Code Analysis ) Presentation is Supported by  Parasoft Makers of Automated DO178B Certified Analysis Tools & A Wind River Certified partner
Testing of Code Coverage is essential part of Safety-Critical Software Certification
A little bit of Baselining  ,[object Object],[object Object],[object Object],[object Object]
Why Certify? ,[object Object],[object Object]
What is DO-178B? ,[object Object],[object Object],[object Object],[object Object]
Software Criticality Levels ,[object Object],[object Object],[object Object]
Software Criticality Levels ,[object Object],[object Object]
Software Criticality Levels ,[object Object],[object Object],[object Object]
Testing Criticality Levels ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Testing Criticality Levels ,[object Object],[object Object],[object Object],[object Object]
Testing Criticality Levels ,[object Object],[object Object],[object Object],[object Object],[object Object]
Testing Criticality Levels ,[object Object],[object Object],[object Object],[object Object]
Testing Criticality Levels ,[object Object],[object Object],[object Object],[object Object],[object Object]
Sub summery  ,[object Object],[object Object],[object Object],[object Object]
Code Coverage Agenda  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Code Coverage classified as White Box Testing ,[object Object],[object Object],[object Object]
Working with Code Coverage ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Making Good Use of Code Coverage ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Code Coverage Tools Visualization of code not covered in the code editor Visualization of coverage rate achieved Warnings generated by the tool to point to code not covered Coverage rate achieved broken down by packages and classes
Method Coverage  (Function Coverage) ,[object Object],[object Object],[object Object],[object Object],[object Object]
Statement Coverage  (Line Coverage) ,[object Object],[object Object],[object Object],[object Object],true covers  all statement
Statement Coverage  (Line Coverage) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Branch Coverage  (Decision Coverage) ,[object Object],[object Object],[object Object],[object Object],true false
Branch Coverage (Decision Coverage) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Condition Coverage ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],true, true true, false false, true false, false
Condition Coverage  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Path Coverage  (Predicate Coverage) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
False Positive Problem: False Errors Solution By Data Flow Analysis  ,[object Object],10-Mar-05 1  int f(int x) { 2   int y; 3   if (x > 0) y = x; 4   if (x > 3) x = y; 5   return x; 6   } 3 4 6 (x  ≤  0) (x > 0) y = x 5 (x  ≤  3) (x > 3) x = y return x Warning Variable 'y' (line 2) may not have been initialized (x  ≤  0) (x > 3)
Code Coverage: Brief Summary Method coverage Statement coverage Branch coverage Condition coverage Path coverage
Condition/Decision Coverage Condition/Decision Coverage is a hybrid metric composed by the union of  condition coverage  and  decision coverage .
Modified Condition/Decision Coverage DO178B Level A Every point of entry and exit in the program has been invoked at least once, every condition in a decision has taken all possible outcomes at least once, every decision in the program has taken all possible outcomes at least once, and each condition in a decision has been shown to independently affect that decisions outcome. A condition is shown to independently affect a decisions outcome by varying just that condition while holding fixed all other possible conditions  This metric is specified for safety critical aviation software by RCTA/DO-178B
How It is Done?  - Instrumentation 1  void  foo()    2 {    3   found= false ;    4    for  (i=0;(i<100) && ( ! found );i++)    5   {    6      if  (i==50)  break ;    7      if  (i==20) found= true ;    8      if  (i==30) found= true ;    9   }   10   printf(&quot;foo&quot;);   11 }
How It is Done?  - Automatic Instrumentation.  Instrumentation for  statement coverage 1 char  inst[5];    2  void  foo()    3 {    4   found= false ;    5    for  (i=0;(i<100) && (! found);i++)    6   {    7      if  (i==50 ) {  inst[0]=1 ; break ;}    8      if  (i==20 ) {  inst[1]=1 ;found= true ;}    9      if  (i==30 ) {  inst[2]=1 ;found= true ;}   10     inst[3]=1 ; }   11   printf(&quot;foo&quot;);   12    inst[4]=1 ; }
How It is Done?  - Instrumentation Inserting the full instrumentation code for the condition coverage in this example will produce the following code:     1 char  inst[15] ;    2  void  foo()    3 {    4   found= false ;    5    for  (i=0;((i<100)? inst[0]=1 :inst[1]=1,0) && ((! found)? inst[2]=1 :inst[3]=1,0);i++)    6   {    7      if  ((i==50? inst[4]=1 : inst[5]=1 ,0) ) {  inst[6]=1 ; break ;}    8      if  ((i==20? inst[7]=1 : inst[8]=1 ,0) ) {  inst[9]=1 ;found= true ;}    9      if  ((i==30? inst[10]=1 : inst[11]=1 ,0) ) {  inst[12]=1 ;found= true ;}   10    inst[13]=1 ; }   11   printf(&quot;foo&quot;);   12  inst[14]=1 ; } Full code coverage instrumentation at condition level
References ,[object Object],[object Object],[object Object],[object Object]
Parasoft Corporate Overview ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Company Background
[object Object],[object Object]
Thank You  Daniel Liezrowice – Engineering Software Lab (The Israeli Center for Static Code Analysis & Dynamic testing) [email_address]   09-8855803  www.eswlab.com

Mais conteúdo relacionado

Mais procurados

Dynamic Polymorphism in C++
Dynamic Polymorphism in C++Dynamic Polymorphism in C++
Dynamic Polymorphism in C++Dharmisha Sharma
 
What are Software Testing Methodologies | Software Testing Techniques | Edureka
What are Software Testing Methodologies | Software Testing Techniques | EdurekaWhat are Software Testing Methodologies | Software Testing Techniques | Edureka
What are Software Testing Methodologies | Software Testing Techniques | EdurekaEdureka!
 
Top 50 Software Testing Interview Questions & Answers | Edureka
Top 50 Software Testing Interview Questions & Answers | EdurekaTop 50 Software Testing Interview Questions & Answers | Edureka
Top 50 Software Testing Interview Questions & Answers | EdurekaEdureka!
 
Software testing methods, levels and types
Software testing methods, levels and typesSoftware testing methods, levels and types
Software testing methods, levels and typesConfiz
 
Fundamentals of Language Processing
Fundamentals of Language ProcessingFundamentals of Language Processing
Fundamentals of Language ProcessingHemant Sharma
 
Selenium interview questions
Selenium interview questionsSelenium interview questions
Selenium interview questionsgirichinna27
 
Test Management introduction
Test Management introductionTest Management introduction
Test Management introductionOana Feidi
 
Selenium Interview Questions And Answers | Selenium Interview Questions | Sel...
Selenium Interview Questions And Answers | Selenium Interview Questions | Sel...Selenium Interview Questions And Answers | Selenium Interview Questions | Sel...
Selenium Interview Questions And Answers | Selenium Interview Questions | Sel...Simplilearn
 
What is Software Testing | Edureka
What is Software Testing | EdurekaWhat is Software Testing | Edureka
What is Software Testing | EdurekaEdureka!
 
Requierement traceability matrix
Requierement traceability matrixRequierement traceability matrix
Requierement traceability matrixLuthfia Ulinnuha
 
Verification Automation Using IPXACT
Verification Automation Using IPXACTVerification Automation Using IPXACT
Verification Automation Using IPXACTDVClub
 
Refueling study guide
Refueling study guideRefueling study guide
Refueling study guideloney624
 
Manual Testing Interview Questions | Edureka
Manual Testing Interview Questions | EdurekaManual Testing Interview Questions | Edureka
Manual Testing Interview Questions | EdurekaEdureka!
 

Mais procurados (20)

Dynamic Polymorphism in C++
Dynamic Polymorphism in C++Dynamic Polymorphism in C++
Dynamic Polymorphism in C++
 
Bdd and spec flow
Bdd and spec flowBdd and spec flow
Bdd and spec flow
 
What are Software Testing Methodologies | Software Testing Techniques | Edureka
What are Software Testing Methodologies | Software Testing Techniques | EdurekaWhat are Software Testing Methodologies | Software Testing Techniques | Edureka
What are Software Testing Methodologies | Software Testing Techniques | Edureka
 
Top 50 Software Testing Interview Questions & Answers | Edureka
Top 50 Software Testing Interview Questions & Answers | EdurekaTop 50 Software Testing Interview Questions & Answers | Edureka
Top 50 Software Testing Interview Questions & Answers | Edureka
 
Hybrid framework
Hybrid frameworkHybrid framework
Hybrid framework
 
Software testing methods, levels and types
Software testing methods, levels and typesSoftware testing methods, levels and types
Software testing methods, levels and types
 
Fundamentals of Language Processing
Fundamentals of Language ProcessingFundamentals of Language Processing
Fundamentals of Language Processing
 
White box testing
White box testingWhite box testing
White box testing
 
Selenium interview questions
Selenium interview questionsSelenium interview questions
Selenium interview questions
 
Test Management introduction
Test Management introductionTest Management introduction
Test Management introduction
 
Misra c rules
Misra c rulesMisra c rules
Misra c rules
 
ENOVIA v6 R2013x Tips and Tricks
ENOVIA v6 R2013x Tips and TricksENOVIA v6 R2013x Tips and Tricks
ENOVIA v6 R2013x Tips and Tricks
 
Data types IN JAVA
Data types IN JAVAData types IN JAVA
Data types IN JAVA
 
Parsing LL(1), SLR, LR(1)
Parsing LL(1), SLR, LR(1)Parsing LL(1), SLR, LR(1)
Parsing LL(1), SLR, LR(1)
 
Selenium Interview Questions And Answers | Selenium Interview Questions | Sel...
Selenium Interview Questions And Answers | Selenium Interview Questions | Sel...Selenium Interview Questions And Answers | Selenium Interview Questions | Sel...
Selenium Interview Questions And Answers | Selenium Interview Questions | Sel...
 
What is Software Testing | Edureka
What is Software Testing | EdurekaWhat is Software Testing | Edureka
What is Software Testing | Edureka
 
Requierement traceability matrix
Requierement traceability matrixRequierement traceability matrix
Requierement traceability matrix
 
Verification Automation Using IPXACT
Verification Automation Using IPXACTVerification Automation Using IPXACT
Verification Automation Using IPXACT
 
Refueling study guide
Refueling study guideRefueling study guide
Refueling study guide
 
Manual Testing Interview Questions | Edureka
Manual Testing Interview Questions | EdurekaManual Testing Interview Questions | Edureka
Manual Testing Interview Questions | Edureka
 

Destaque

Code coverage analysis in testing
Code coverage analysis in testingCode coverage analysis in testing
Code coverage analysis in testingNi
 
Tools and techniques of code coverage testing
Tools and techniques of code coverage testingTools and techniques of code coverage testing
Tools and techniques of code coverage testingIAEME Publication
 
Code Coverage Revised : EclEmma on JaCoCo
Code Coverage Revised : EclEmma on JaCoCoCode Coverage Revised : EclEmma on JaCoCo
Code Coverage Revised : EclEmma on JaCoCoEvgeny Mandrikov
 
Code coverage & tools
Code coverage & toolsCode coverage & tools
Code coverage & toolsRajesh Kumar
 
Coverage analysis from execution traces
Coverage analysis from execution tracesCoverage analysis from execution traces
Coverage analysis from execution tracesAdaCore
 
Couverture erts2012
Couverture erts2012Couverture erts2012
Couverture erts2012AdaCore
 
Collection pipeline par Mathieu Godart
Collection pipeline par  Mathieu GodartCollection pipeline par  Mathieu Godart
Collection pipeline par Mathieu GodartCocoaHeads France
 
Code Coverage Web Application
Code Coverage Web ApplicationCode Coverage Web Application
Code Coverage Web ApplicationAjay Singh
 
Java code coverage with JCov. Implementation details and use cases.
Java code coverage with JCov. Implementation details and use cases.Java code coverage with JCov. Implementation details and use cases.
Java code coverage with JCov. Implementation details and use cases.Alexandre (Shura) Iline
 
Amran Tuberi - the damage of cycling to the desert ecosystem
Amran Tuberi - the damage of cycling to the desert ecosystemAmran Tuberi - the damage of cycling to the desert ecosystem
Amran Tuberi - the damage of cycling to the desert ecosystemEngineering Software Lab
 
Parasoft Concerto A complete ALM platform that ensures quality software can b...
Parasoft Concerto A complete ALM platform that ensures quality software can b...Parasoft Concerto A complete ALM platform that ensures quality software can b...
Parasoft Concerto A complete ALM platform that ensures quality software can b...Engineering Software Lab
 
Nunit C# source code defects report by Parasoft dotTEST
Nunit  C# source code  defects report by Parasoft dotTEST Nunit  C# source code  defects report by Parasoft dotTEST
Nunit C# source code defects report by Parasoft dotTEST Engineering Software Lab
 
Perforce עשרת היתרונות המובילים של מערכת ניהול התצורה
Perforce עשרת היתרונות המובילים של מערכת ניהול התצורהPerforce עשרת היתרונות המובילים של מערכת ניהול התצורה
Perforce עשרת היתרונות המובילים של מערכת ניהול התצורהEngineering Software Lab
 
Parasoft .TEST, Write better C# Code Using Data Flow Analysis
Parasoft .TEST, Write better C# Code Using  Data Flow Analysis Parasoft .TEST, Write better C# Code Using  Data Flow Analysis
Parasoft .TEST, Write better C# Code Using Data Flow Analysis Engineering Software Lab
 

Destaque (19)

Code coverage analysis in testing
Code coverage analysis in testingCode coverage analysis in testing
Code coverage analysis in testing
 
Code coverage
Code coverageCode coverage
Code coverage
 
Tools and techniques of code coverage testing
Tools and techniques of code coverage testingTools and techniques of code coverage testing
Tools and techniques of code coverage testing
 
Code Coverage Revised : EclEmma on JaCoCo
Code Coverage Revised : EclEmma on JaCoCoCode Coverage Revised : EclEmma on JaCoCo
Code Coverage Revised : EclEmma on JaCoCo
 
Code coverage & tools
Code coverage & toolsCode coverage & tools
Code coverage & tools
 
Coverage analysis from execution traces
Coverage analysis from execution tracesCoverage analysis from execution traces
Coverage analysis from execution traces
 
Couverture erts2012
Couverture erts2012Couverture erts2012
Couverture erts2012
 
Collection pipeline par Mathieu Godart
Collection pipeline par  Mathieu GodartCollection pipeline par  Mathieu Godart
Collection pipeline par Mathieu Godart
 
Couverture de code
Couverture de codeCouverture de code
Couverture de code
 
Code Coverage Web Application
Code Coverage Web ApplicationCode Coverage Web Application
Code Coverage Web Application
 
Java code coverage with JCov. Implementation details and use cases.
Java code coverage with JCov. Implementation details and use cases.Java code coverage with JCov. Implementation details and use cases.
Java code coverage with JCov. Implementation details and use cases.
 
Parasoft fda software compliance part2
Parasoft fda software compliance   part2Parasoft fda software compliance   part2
Parasoft fda software compliance part2
 
Amran Tuberi - the damage of cycling to the desert ecosystem
Amran Tuberi - the damage of cycling to the desert ecosystemAmran Tuberi - the damage of cycling to the desert ecosystem
Amran Tuberi - the damage of cycling to the desert ecosystem
 
Parasoft Concerto A complete ALM platform that ensures quality software can b...
Parasoft Concerto A complete ALM platform that ensures quality software can b...Parasoft Concerto A complete ALM platform that ensures quality software can b...
Parasoft Concerto A complete ALM platform that ensures quality software can b...
 
A Scalable Software Build Accelerator
A Scalable Software Build AcceleratorA Scalable Software Build Accelerator
A Scalable Software Build Accelerator
 
Nunit C# source code defects report by Parasoft dotTEST
Nunit  C# source code  defects report by Parasoft dotTEST Nunit  C# source code  defects report by Parasoft dotTEST
Nunit C# source code defects report by Parasoft dotTEST
 
Perforce עשרת היתרונות המובילים של מערכת ניהול התצורה
Perforce עשרת היתרונות המובילים של מערכת ניהול התצורהPerforce עשרת היתרונות המובילים של מערכת ניהול התצורה
Perforce עשרת היתרונות המובילים של מערכת ניהול התצורה
 
Parasoft fda software compliance part1
Parasoft fda software compliance   part1Parasoft fda software compliance   part1
Parasoft fda software compliance part1
 
Parasoft .TEST, Write better C# Code Using Data Flow Analysis
Parasoft .TEST, Write better C# Code Using  Data Flow Analysis Parasoft .TEST, Write better C# Code Using  Data Flow Analysis
Parasoft .TEST, Write better C# Code Using Data Flow Analysis
 

Semelhante a Code Coverage in Theory and in practice form the DO178B perspective

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
 
Estimating test effort part 2 of 2
Estimating test effort part 2 of 2Estimating test effort part 2 of 2
Estimating test effort part 2 of 2Ian McDonald
 
ScioTalks | Coverage Based Testing
ScioTalks | Coverage Based TestingScioTalks | Coverage Based Testing
ScioTalks | Coverage Based TestingScio Consulting
 
Sech1920 1200112979886874-3
Sech1920 1200112979886874-3Sech1920 1200112979886874-3
Sech1920 1200112979886874-3Mateti Anilraja
 
Testing Interview Questions.pdf
Testing Interview Questions.pdfTesting Interview Questions.pdf
Testing Interview Questions.pdfPradeepaKannan6
 
Software Testing Introduction (Part 1)
Software Testing Introduction (Part 1)Software Testing Introduction (Part 1)
Software Testing Introduction (Part 1)Thapar Institute
 
Model Driven Testing: requirements, models & test
Model Driven Testing: requirements, models & test Model Driven Testing: requirements, models & test
Model Driven Testing: requirements, models & test Gregory Solovey
 
Dependable Software Development in Software Engineering SE18
Dependable Software Development in Software Engineering SE18Dependable Software Development in Software Engineering SE18
Dependable Software Development in Software Engineering SE18koolkampus
 
Softwar tetesting basic
Softwar tetesting basicSoftwar tetesting basic
Softwar tetesting basicparekhjigarh
 
Control Flow Testing
Control Flow TestingControl Flow Testing
Control Flow TestingHirra Sultan
 
A beginners guide to testing
A beginners guide to testingA beginners guide to testing
A beginners guide to testingPhilip Johnson
 
White-box testing.pptx
White-box testing.pptxWhite-box testing.pptx
White-box testing.pptxhalaalz3by
 
Application of theorem proving for safety-critical vehicle software
Application of theorem proving for safety-critical vehicle softwareApplication of theorem proving for safety-critical vehicle software
Application of theorem proving for safety-critical vehicle softwareAdaCore
 
st-notes-13-26-software-testing-is-the-act-of-examining-the-artifacts-and-the...
st-notes-13-26-software-testing-is-the-act-of-examining-the-artifacts-and-the...st-notes-13-26-software-testing-is-the-act-of-examining-the-artifacts-and-the...
st-notes-13-26-software-testing-is-the-act-of-examining-the-artifacts-and-the...mwpeexdvjgtqujwhog
 

Semelhante a Code Coverage in Theory and in practice form the DO178B perspective (20)

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
 
Estimating test effort part 2 of 2
Estimating test effort part 2 of 2Estimating test effort part 2 of 2
Estimating test effort part 2 of 2
 
ScioTalks | Coverage Based Testing
ScioTalks | Coverage Based TestingScioTalks | Coverage Based Testing
ScioTalks | Coverage Based Testing
 
Sech1920 1200112979886874-3
Sech1920 1200112979886874-3Sech1920 1200112979886874-3
Sech1920 1200112979886874-3
 
Testing Interview Questions.pdf
Testing Interview Questions.pdfTesting Interview Questions.pdf
Testing Interview Questions.pdf
 
Software Testing Introduction (Part 1)
Software Testing Introduction (Part 1)Software Testing Introduction (Part 1)
Software Testing Introduction (Part 1)
 
Model Driven Testing: requirements, models & test
Model Driven Testing: requirements, models & test Model Driven Testing: requirements, models & test
Model Driven Testing: requirements, models & test
 
Dependable Software Development in Software Engineering SE18
Dependable Software Development in Software Engineering SE18Dependable Software Development in Software Engineering SE18
Dependable Software Development in Software Engineering SE18
 
Softwar tetesting basic
Softwar tetesting basicSoftwar tetesting basic
Softwar tetesting basic
 
Control Flow Testing
Control Flow TestingControl Flow Testing
Control Flow Testing
 
A beginners guide to testing
A beginners guide to testingA beginners guide to testing
A beginners guide to testing
 
Testing techniques
Testing techniquesTesting techniques
Testing techniques
 
White-box testing.pptx
White-box testing.pptxWhite-box testing.pptx
White-box testing.pptx
 
testing
testingtesting
testing
 
Application of theorem proving for safety-critical vehicle software
Application of theorem proving for safety-critical vehicle softwareApplication of theorem proving for safety-critical vehicle software
Application of theorem proving for safety-critical vehicle software
 
Software testing (2)
Software testing (2)Software testing (2)
Software testing (2)
 
Testing
TestingTesting
Testing
 
Testing
TestingTesting
Testing
 
st-notes-13-26-software-testing-is-the-act-of-examining-the-artifacts-and-the...
st-notes-13-26-software-testing-is-the-act-of-examining-the-artifacts-and-the...st-notes-13-26-software-testing-is-the-act-of-examining-the-artifacts-and-the...
st-notes-13-26-software-testing-is-the-act-of-examining-the-artifacts-and-the...
 
Block 1 ms-034 unit-1
Block 1 ms-034 unit-1Block 1 ms-034 unit-1
Block 1 ms-034 unit-1
 

Mais de Engineering Software Lab

המדריך לכוון חיישן מצב מצערת באופנועי קטמ דגמי הזרקת דלק
המדריך לכוון חיישן מצב מצערת באופנועי קטמ דגמי הזרקת דלקהמדריך לכוון חיישן מצב מצערת באופנועי קטמ דגמי הזרקת דלק
המדריך לכוון חיישן מצב מצערת באופנועי קטמ דגמי הזרקת דלקEngineering Software Lab
 
Code coverage in theory and in practice form the do178 b perspective
Code coverage in theory and in practice form the do178 b perspectiveCode coverage in theory and in practice form the do178 b perspective
Code coverage in theory and in practice form the do178 b perspectiveEngineering Software Lab
 
WPF/ XamDataGrid Performance, Infragistics Seminar, Israel , November 2011
WPF/ XamDataGrid Performance, Infragistics Seminar, Israel , November 2011WPF/ XamDataGrid Performance, Infragistics Seminar, Israel , November 2011
WPF/ XamDataGrid Performance, Infragistics Seminar, Israel , November 2011Engineering Software Lab
 
Unit testing on embedded target with C++Test
Unit testing on embedded  target with C++TestUnit testing on embedded  target with C++Test
Unit testing on embedded target with C++TestEngineering Software Lab
 

Mais de Engineering Software Lab (9)

FDA software compliance 2016
FDA software compliance 2016FDA software compliance 2016
FDA software compliance 2016
 
המדריך לכוון חיישן מצב מצערת באופנועי קטמ דגמי הזרקת דלק
המדריך לכוון חיישן מצב מצערת באופנועי קטמ דגמי הזרקת דלקהמדריך לכוון חיישן מצב מצערת באופנועי קטמ דגמי הזרקת דלק
המדריך לכוון חיישן מצב מצערת באופנועי קטמ דגמי הזרקת דלק
 
ועד בית דב כרמי 1
ועד בית דב כרמי 1ועד בית דב כרמי 1
ועד בית דב כרמי 1
 
המסדרת הפכה למגוהצת
המסדרת הפכה למגוהצתהמסדרת הפכה למגוהצת
המסדרת הפכה למגוהצת
 
Palamida Open Source Compliance Solution
Palamida Open Source Compliance Solution Palamida Open Source Compliance Solution
Palamida Open Source Compliance Solution
 
Code coverage in theory and in practice form the do178 b perspective
Code coverage in theory and in practice form the do178 b perspectiveCode coverage in theory and in practice form the do178 b perspective
Code coverage in theory and in practice form the do178 b perspective
 
WPF/ XamDataGrid Performance, Infragistics Seminar, Israel , November 2011
WPF/ XamDataGrid Performance, Infragistics Seminar, Israel , November 2011WPF/ XamDataGrid Performance, Infragistics Seminar, Israel , November 2011
WPF/ XamDataGrid Performance, Infragistics Seminar, Israel , November 2011
 
Unit testing on embedded target with C++Test
Unit testing on embedded  target with C++TestUnit testing on embedded  target with C++Test
Unit testing on embedded target with C++Test
 
Introduction to Parasoft C++TEST
Introduction to Parasoft C++TEST Introduction to Parasoft C++TEST
Introduction to Parasoft C++TEST
 

Último

ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusZilliz
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 

Último (20)

ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

Code Coverage in Theory and in practice form the DO178B perspective

  • 1. Code Coverage in Theory and in practice form the DO178B perspective Daniel Liezrowice – Engineering Software Lab (The Israeli Center for Static Code Analysis ) Presentation is Supported by Parasoft Makers of Automated DO178B Certified Analysis Tools & A Wind River Certified partner
  • 2. Testing of Code Coverage is essential part of Safety-Critical Software Certification
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19. Code Coverage Tools Visualization of code not covered in the code editor Visualization of coverage rate achieved Warnings generated by the tool to point to code not covered Coverage rate achieved broken down by packages and classes
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29. Code Coverage: Brief Summary Method coverage Statement coverage Branch coverage Condition coverage Path coverage
  • 30. Condition/Decision Coverage Condition/Decision Coverage is a hybrid metric composed by the union of  condition coverage  and  decision coverage .
  • 31. Modified Condition/Decision Coverage DO178B Level A Every point of entry and exit in the program has been invoked at least once, every condition in a decision has taken all possible outcomes at least once, every decision in the program has taken all possible outcomes at least once, and each condition in a decision has been shown to independently affect that decisions outcome. A condition is shown to independently affect a decisions outcome by varying just that condition while holding fixed all other possible conditions  This metric is specified for safety critical aviation software by RCTA/DO-178B
  • 32. How It is Done? - Instrumentation 1  void  foo()    2 {    3   found= false ;    4    for  (i=0;(i<100) && ( ! found );i++)    5   {    6      if  (i==50)  break ;    7      if  (i==20) found= true ;    8      if  (i==30) found= true ;    9   }   10   printf(&quot;foo&quot;);   11 }
  • 33. How It is Done? - Automatic Instrumentation. Instrumentation for statement coverage 1 char inst[5];    2  void  foo()    3 {    4   found= false ;    5    for  (i=0;(i<100) && (! found);i++)    6   {    7      if  (i==50 ) { inst[0]=1 ; break ;}    8      if  (i==20 ) { inst[1]=1 ;found= true ;}    9      if  (i==30 ) { inst[2]=1 ;found= true ;}   10     inst[3]=1 ; }   11   printf(&quot;foo&quot;);   12   inst[4]=1 ; }
  • 34. How It is Done? - Instrumentation Inserting the full instrumentation code for the condition coverage in this example will produce the following code:     1 char inst[15] ;    2  void  foo()    3 {    4   found= false ;    5    for  (i=0;((i<100)? inst[0]=1 :inst[1]=1,0) && ((! found)? inst[2]=1 :inst[3]=1,0);i++)    6   {    7      if  ((i==50? inst[4]=1 : inst[5]=1 ,0) ) { inst[6]=1 ; break ;}    8      if  ((i==20? inst[7]=1 : inst[8]=1 ,0) ) { inst[9]=1 ;found= true ;}    9      if  ((i==30? inst[10]=1 : inst[11]=1 ,0) ) { inst[12]=1 ;found= true ;}   10    inst[13]=1 ; }   11   printf(&quot;foo&quot;);   12  inst[14]=1 ; } Full code coverage instrumentation at condition level
  • 35.
  • 36.
  • 37.
  • 38. Thank You Daniel Liezrowice – Engineering Software Lab (The Israeli Center for Static Code Analysis & Dynamic testing) [email_address] 09-8855803 www.eswlab.com

Notas do Editor

  1. Statement Coverage only requires one test case (condition evaluates to true) to satisfy this code Decision/Condition Coverage requires two test cases (condition evaluates to true and false) to satisfy this code
  2. Decision/Condition Coverage only requires two test cases, one to execute the if branch, one to execute the else branch MCDC requires 4 test cases Must make “A OR B” both true and false, while simultaneously making the entire statement true and false.
  3. White box testing is a structural technique, which is based on the structure of the test item. This structure is evaluated and measurements are taken from it. These assess characteristics such as The control flow of the item under test Data flows into, out of and within the item under test Which part of the source that have been covered by a particular set of tests In order to take these measurements, it is necessary to enhance the code with additional statements that record key events during execution. This is called  Instrumentation As instrumentation may influence the behaviour of the test object, all tests should be repeated without coverage measurement, to exclude the possibility of side effects.
  4. Code coverage as acceptance criteria: Statement about expected coverage in relation to the maximal possible coverage in terms of a certain coverage measurement. E.g. 90 % statement coverage means: 90% of all statements in the source code are covered by the tests executed. Empirical studies have shown that a incredibly difficult to achieve coverage rate must be reached to improve error detection noticeably (90 – 95 % or higher). This implies that punctually using coverage measurement to visualize areas of the code that are not covered with tests is superior to acceptance criteria using coverage measurement. Code Coverage as acceptance criteria may motivate developers to concentrate on developing test code to increase coverage (e.g. testing getter and setters) instead of to find errors in the code. It makes sense to concentrate on critical and complex parts of the code, where most bugs are expected to be. But those parts are often also hard to test and code coverage is increased only to a negligible degree by these tests.
  5. A good code coverage measurement tool is not only capable of measuring code coverage and check whether some acceptance criteria in terms of code coverage are met. A good code coverage tool should also provide means to visualize achieved coverage in order to help developers identifying source code in need of additional tests. A good example is the reasonable priced Clover, a coverage measurement and visualization tool for Java available from www.cenqua.com. It integrates nicely with the Eclipse IDE and will be used in the labs for this module.
  6. Method coverage doesn’t really help a lot. There is a need for more elaborate code coverage models.
  7. While statement coverage certainly is a weak coverage measurement, it can make sense to use it, if the code itself is not complex and does not contain many branches.
  8. Condition coverage reports the true or false outcome of each boolean sub-expression, separated by logical-and and logical-or if they occur. Condition coverage measures the sub-expressions independently of each other. Multiple condition coverage reports whether every possible combination of boolean sub-expressions occurs. Condition/Decision Coverage is a hybrid measure composed by the union of condition coverage and decision coverage.
  9. following red path, warning seems justified but red path is infeasible given error is from Flexelint; Orion reports no errors
  10. Method coverage focuses on called methods. Statement coverage focuses on called statements. Branch coverage focuses on decisions based on results of boolean expressions (true, false). Condition coverage focuses on decisions based each condition of an boolean expression. Path coverage focuses on each possible unique path through a method. Test coverage focuses on finding and elimination errors in the code.