Advanced Unit Testing LabVIEW Code / instacoverage.io
LabVIEW Unit Testing
Outlook & Tutorial
Advanced Unit Testing LabVIEW Code / instacoverage.io
Peter Bokor
InstaCoverage team lead at IncQuery Labs
Barnabas Reischl
InstaCoverage engineer at IncQuery Labs
Advanced Unit Testing LabVIEW Code / instacoverage.io
Unit Testing – Why?
Advanced Unit Testing LabVIEW Code / instacoverage.io
Correctness & Completeness
Test your SW for correctness (common sense, V model etc.)
EXAMPLE
Divide(6,3) = 2 PASSED
Test your SW for completeness/”coverage” (ISO etc.)
EXAMPLE
Divide(6,0) = 0 FAILED
Test your SW units (divide and conquer/modularity)
EXAMPLE
Add(3,Divide(6,0)) = 3 FAILED (‘Add’ or ‘Divide’ failed?)
Advanced Unit Testing LabVIEW Code / instacoverage.io
A LabVIEW example
Challenge 1: write test for critical (“cover critical”)
Challenge 2: measure that critical is tested
Advanced Unit Testing LabVIEW Code / instacoverage.io
Coverage
▪ Avoid untested code
▪ Prove reachability (no “dead code”)
▪ Required by
▪ Standards, e.g., ISO 26262
▪ Companies
Advanced Unit Testing LabVIEW Code / instacoverage.io
Unit Testing LabVIEW code – Tool options
Advanced Unit Testing LabVIEW Code / instacoverage.io
Unit testing tool alternatives for LabVIEW
Advanced Unit Testing LabVIEW Code / instacoverage.io
MEMS Mics Test – Running example
Advanced Unit Testing LabVIEW Code / instacoverage.io
Advanced Unit Testing LabVIEW Code / instacoverage.io
TBMP 280 – Configure.vi
@myRIO
DUT
configure in-range clock rate
configure out-range clock rate
Setup
TEST
CASE
TEST
CASE
expected = no error + chip ID
expected = error
Teardown
TEST
CASE
TEST
CASE
COVERAGE <100%Unit test VI under test
ISSUE [COVERAGE]:
Not reproducible
Advanced Unit Testing LabVIEW Code / instacoverage.io
Demo – InstaCoverage
Advanced Unit Testing LabVIEW Code / instacoverage.io
Quo vadis InstaCoverage? – Roadmap
Advanced Unit Testing LabVIEW Code / instacoverage.io
NIWeek
(May 20-23)
2019
CLA Summit
(Apr 2-4)
GDevCon
(Aug 21-22)
past* planned
< May 31
past* planned
NXG
Classic
May reverse
Apr 2 May 3
May reverse
…
…
2020
May reverse
NI Europe
(Nov 20-21)
CoreNXG CoreClassic Pro ProNXG ProClassicCoreClassic ProNXGCoreClassic
SUBMITTED BETA AT NIWEEK
2018
ProClassic CoreNXG
…
*details at instacoverage.io

Ni week 2019 - LabVIEW Unit Testing Outlook & Tutorial

  • 1.
    Advanced Unit TestingLabVIEW Code / instacoverage.io
  • 2.
  • 3.
    Advanced Unit TestingLabVIEW Code / instacoverage.io Peter Bokor InstaCoverage team lead at IncQuery Labs Barnabas Reischl InstaCoverage engineer at IncQuery Labs
  • 4.
    Advanced Unit TestingLabVIEW Code / instacoverage.io Unit Testing – Why?
  • 5.
    Advanced Unit TestingLabVIEW Code / instacoverage.io Correctness & Completeness Test your SW for correctness (common sense, V model etc.) EXAMPLE Divide(6,3) = 2 PASSED Test your SW for completeness/”coverage” (ISO etc.) EXAMPLE Divide(6,0) = 0 FAILED Test your SW units (divide and conquer/modularity) EXAMPLE Add(3,Divide(6,0)) = 3 FAILED (‘Add’ or ‘Divide’ failed?)
  • 6.
    Advanced Unit TestingLabVIEW Code / instacoverage.io A LabVIEW example Challenge 1: write test for critical (“cover critical”) Challenge 2: measure that critical is tested
  • 7.
    Advanced Unit TestingLabVIEW Code / instacoverage.io Coverage ▪ Avoid untested code ▪ Prove reachability (no “dead code”) ▪ Required by ▪ Standards, e.g., ISO 26262 ▪ Companies
  • 8.
    Advanced Unit TestingLabVIEW Code / instacoverage.io Unit Testing LabVIEW code – Tool options
  • 9.
    Advanced Unit TestingLabVIEW Code / instacoverage.io Unit testing tool alternatives for LabVIEW
  • 10.
    Advanced Unit TestingLabVIEW Code / instacoverage.io MEMS Mics Test – Running example
  • 11.
    Advanced Unit TestingLabVIEW Code / instacoverage.io
  • 12.
    Advanced Unit TestingLabVIEW Code / instacoverage.io TBMP 280 – Configure.vi @myRIO DUT configure in-range clock rate configure out-range clock rate Setup TEST CASE TEST CASE expected = no error + chip ID expected = error Teardown TEST CASE TEST CASE COVERAGE <100%Unit test VI under test
  • 13.
  • 14.
    Advanced Unit TestingLabVIEW Code / instacoverage.io Demo – InstaCoverage
  • 15.
    Advanced Unit TestingLabVIEW Code / instacoverage.io Quo vadis InstaCoverage? – Roadmap
  • 16.
    Advanced Unit TestingLabVIEW Code / instacoverage.io NIWeek (May 20-23) 2019 CLA Summit (Apr 2-4) GDevCon (Aug 21-22) past* planned < May 31 past* planned NXG Classic May reverse Apr 2 May 3 May reverse … … 2020 May reverse NI Europe (Nov 20-21) CoreNXG CoreClassic Pro ProNXG ProClassicCoreClassic ProNXGCoreClassic SUBMITTED BETA AT NIWEEK 2018 ProClassic CoreNXG … *details at instacoverage.io