SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

Airworthiness Review Certificate
Airworthiness Review CertificateAirworthiness Review Certificate
Airworthiness Review CertificateS P Singh
 
Overview of DO-254: Design Assurance Guidance For Airborne Electronic Hardware
Overview of DO-254: Design Assurance Guidance For Airborne Electronic HardwareOverview of DO-254: Design Assurance Guidance For Airborne Electronic Hardware
Overview of DO-254: Design Assurance Guidance For Airborne Electronic HardwareOak Systems
 
Understanding DO-178: Importance and How It Affects Your Company
Understanding DO-178: Importance and How It Affects Your CompanyUnderstanding DO-178: Importance and How It Affects Your Company
Understanding DO-178: Importance and How It Affects Your CompanyAversan Inc.
 
A400 m training 2012
A400 m training 2012A400 m training 2012
A400 m training 2012ICSA, LLC
 
Airworthiness Requirements (ADs, SBs, Maintenance)
Airworthiness Requirements (ADs, SBs, Maintenance)Airworthiness Requirements (ADs, SBs, Maintenance)
Airworthiness Requirements (ADs, SBs, Maintenance)Phillip Clonch
 
Airworthiness Management Camo
Airworthiness Management CamoAirworthiness Management Camo
Airworthiness Management CamoS P Singh
 
AIP Operations Basic Training 020904
AIP Operations Basic Training 020904AIP Operations Basic Training 020904
AIP Operations Basic Training 020904AiDY
 
European Aviation Safety Agency (EASA) - EU Regulation 2042/2003
European Aviation Safety Agency (EASA) - EU Regulation 2042/2003European Aviation Safety Agency (EASA) - EU Regulation 2042/2003
European Aviation Safety Agency (EASA) - EU Regulation 2042/2003Noman Khan - MBA (Aviation Mgt)
 
Aircraft Inspection and Maintenance Records
Aircraft Inspection and Maintenance RecordsAircraft Inspection and Maintenance Records
Aircraft Inspection and Maintenance RecordsFernando Araujo
 
Cat i;ii;iii operations jakub muransky
Cat i;ii;iii operations jakub muranskyCat i;ii;iii operations jakub muransky
Cat i;ii;iii operations jakub muranskyJakub Muransky
 
Recuperação de Atitudes Anormais
Recuperação de Atitudes AnormaisRecuperação de Atitudes Anormais
Recuperação de Atitudes AnormaisLucas Carramenha
 
5.1 Electronic Instrument Systems
5.1 Electronic Instrument Systems5.1 Electronic Instrument Systems
5.1 Electronic Instrument Systemslpapadop
 

Tendances (20)

CAR 66
 CAR 66  CAR 66
CAR 66
 
ME5539-ME5309 AAA
ME5539-ME5309 AAAME5539-ME5309 AAA
ME5539-ME5309 AAA
 
Car m
Car mCar m
Car m
 
Airworthiness Review Certificate
Airworthiness Review CertificateAirworthiness Review Certificate
Airworthiness Review Certificate
 
Overview of DO-254: Design Assurance Guidance For Airborne Electronic Hardware
Overview of DO-254: Design Assurance Guidance For Airborne Electronic HardwareOverview of DO-254: Design Assurance Guidance For Airborne Electronic Hardware
Overview of DO-254: Design Assurance Guidance For Airborne Electronic Hardware
 
Understanding DO-178: Importance and How It Affects Your Company
Understanding DO-178: Importance and How It Affects Your CompanyUnderstanding DO-178: Importance and How It Affects Your Company
Understanding DO-178: Importance and How It Affects Your Company
 
A400 m training 2012
A400 m training 2012A400 m training 2012
A400 m training 2012
 
Airworthiness Requirements (ADs, SBs, Maintenance)
Airworthiness Requirements (ADs, SBs, Maintenance)Airworthiness Requirements (ADs, SBs, Maintenance)
Airworthiness Requirements (ADs, SBs, Maintenance)
 
Reglamento del Aire - Anexo 2 - OACI
Reglamento del Aire -  Anexo 2 - OACI Reglamento del Aire -  Anexo 2 - OACI
Reglamento del Aire - Anexo 2 - OACI
 
Airworthiness Management Camo
Airworthiness Management CamoAirworthiness Management Camo
Airworthiness Management Camo
 
AIP Operations Basic Training 020904
AIP Operations Basic Training 020904AIP Operations Basic Training 020904
AIP Operations Basic Training 020904
 
Failure to Follow Procedures
Failure to Follow Procedures   Failure to Follow Procedures
Failure to Follow Procedures
 
European Aviation Safety Agency (EASA) - EU Regulation 2042/2003
European Aviation Safety Agency (EASA) - EU Regulation 2042/2003European Aviation Safety Agency (EASA) - EU Regulation 2042/2003
European Aviation Safety Agency (EASA) - EU Regulation 2042/2003
 
Arinc 429 part 2
Arinc 429 part 2Arinc 429 part 2
Arinc 429 part 2
 
ifr
ifrifr
ifr
 
data bus Mil1553 b
data bus Mil1553 bdata bus Mil1553 b
data bus Mil1553 b
 
Aircraft Inspection and Maintenance Records
Aircraft Inspection and Maintenance RecordsAircraft Inspection and Maintenance Records
Aircraft Inspection and Maintenance Records
 
Cat i;ii;iii operations jakub muransky
Cat i;ii;iii operations jakub muranskyCat i;ii;iii operations jakub muransky
Cat i;ii;iii operations jakub muransky
 
Recuperação de Atitudes Anormais
Recuperação de Atitudes AnormaisRecuperação de Atitudes Anormais
Recuperação de Atitudes Anormais
 
5.1 Electronic Instrument Systems
5.1 Electronic Instrument Systems5.1 Electronic Instrument Systems
5.1 Electronic Instrument Systems
 

En vedette

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
 

En vedette (20)

Code Coverage
Code CoverageCode Coverage
Code Coverage
 
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
 
Code coverage
Code coverageCode coverage
Code coverage
 
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
 

Similaire à 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
 
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
 
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
 
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!
 
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
 

Similaire à 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
 
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
 
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
 
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
 
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
 

Plus 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
 

Plus 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
 

Dernier

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
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
 
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
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
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
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
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
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 

Dernier (20)

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
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
 
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...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
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
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
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
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
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
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 

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

Notes de l'éditeur

  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.