SlideShare a Scribd company logo
Architecture-based Unit Testing of
    the Flight Software Product Line

Fraunhofer CESE                         NASA Goddard Space Flight Center

Dharmalingam Ganesan                    David McComas
Mikael Lindvall                         Maureen Bartholomew
                                        Steve Slegel
                                        Barbara Medina


                               © 2010 Fraunhofer USA, Inc.                 1
                       Center for Experimental Software Engineering
Background
• Unit testing deals with testing individual
  modules in isolation
  – Assuming the correctness of dependent
    modules
• Bugs found during unit testing are cheaper
  to fix than
  – Integration testing
  – System testing
  – Field reported defects
                        © 2010 Fraunhofer USA, Inc.
                                                               2
                Center for Experimental Software Engineering
Unit Testing Challenges in Practice
• Isolating the module under test from other
  modules
• Isolating from special OS and hardware
  features
• Handling the variability or configuration
  dimension
• Developing flexible build process (e.g.,
  Makefiles) that facilitates unit testing

                       © 2010 Fraunhofer USA, Inc.
                                                              3
               Center for Experimental Software Engineering
Research Questions
• What architectural design decisions
  facilitate or impede unit testing?

• How can we make use of the architecture
  to define the architecture of test code?

Approach: Case-study driven - NASA’s
 Core Flight Software Product Line (CFS)
                       © 2010 Fraunhofer USA, Inc.
                                                              4
               Center for Experimental Software Engineering
Reusable Analysis Questions
• Can modules be tested independently of other
  modules they use?
• Can modules be unit tested without access to
  special hardware and/or OS?
• How are variation points of each module being
  handled during unit testing?
• Is there a common look-and-feel in terms of the
  way the modules are unit tested?
• How easy it is to set-up a unit test?
 (additional questions are listed in the paper)
                         © 2010 Fraunhofer USA, Inc.
                                                                5
                 Center for Experimental Software Engineering
Technical Set-up for Analysis
                              Source Code               Makefiles




                                       1
                                           Data Extraction
               Test Suites              (Automated Parsing)


                                                                         Call relation, Include
                                                                          relation, variation
               Makefiles of                                               points for source
               test suites                     Call relation,                     code
                                             Include relation,
                                            variation points for
                                                test suites


                                                                    2   Visualization, Query and
                                                                                Analysis



Data extraction is automated using standard parsers

Data analysis and visualization are semi-automatic using tools:
   Relation Partition Algebra (RPA) query language
   SAVE-Light, SAVE
   Prefuse                                                                                        6
                                        © 2010 Fraunhofer USA, Inc.
                                Center for Experimental Software Engineering
Product Line Structure of the CFS
         CFS Application A           CFS Application B        CFS Application C        …
        Core Flight Executive (cFE) Services Layer


          Software Bus (SB)         Executive Services (ES)    Table Services (TBL)

           File Service (FS)
                                      Event Services (EVS)
                services



                                         cFE Board Support         Hardware Abstraction
         OS Abstraction Layer
                                        Package (BSP) Layer              Layer


                                      Board Support Package
            Real time OS                                              Device Drivers
                                              (BSP)


                                               Hardware




See our SPLC 2009 paper for:

 the heritage of the CFS
 the business goals of the CFS
 architectural analysis of the CFS implementation

                                                        © 2010 Fraunhofer USA, Inc.
                                                                                               7
                                                Center for Experimental Software Engineering
Run-time Structure of the CFS
                                         House-                                   Memory          Memory
                                         keeping             Checksum
                                                                              Manager             Dwell




*    cFE core Applications
                                            Inter-task Message Router (SW Bus)
    Some CFS Applications

    Some Mission Applications


                             Telemetry   Command        Software        Time          Executive         Event          Table           File
                                                    *              *                * Services     *              *              *
                              Output      Ingest          Bus          Services                        Services       Services       Services




        Applications communicate by publishing/subscribing messages to the bus
        Core applications can also directly talk to each other using function calls

         Example Variation Points:
         Maximum number of applications using the SW bus
         Maximum number of messages in the SW bus
         Maximum number of messages an application can receive

                                                                    © 2010 Fraunhofer USA, Inc.
                                                                                                                                                8
                                                            Center for Experimental Software Engineering
Missions using CFS/cFE
 Mission     Managed by         cFE         CFS Apps                              Status
CHIPS        GSFC                 ✓                                 Successfully demonstrated
DSILCAS      GSFC                 ✓                                        Integrated in FSW lab
GPM          GSFC                 ✓                ✓                       Integrated in FSW lab
LADEE        ARC                  ✓                ✓                       Integrated in FSW lab
LRO          APL                  ✓                                              On orbit
MMS          GSFC                 ✓                ✓                       Integrated in FSW lab
Nanosat-6    AFRL/Cornell         ✓                ✓                       Integrated in FSW lab
RBSP         APL                  ✓                                        Integrated in FSW lab
RLL          APL                  ✓                                        Integrated in FSW lab
Solar        APL                  ✓                                        Integrated in FSW lab
Probe Plus

   Many missions depend on the quality of CFS/cFE and
      the reusable components it provides!
                                    © 2010 Fraunhofer USA, Inc.
                                                                                                   9
                            Center for Experimental Software Engineering
Dependencies of Core Modules
          cFE - Core
                                         Executive Service (ES)



             Software Bus (SB)                                             Event Service (EVS)




              File Service (FS)                                             Table Service (TBL)

                                            Timing Service (Time)




 Reverse engineered from the source code of the CFS
 Boxes denote modules (i.e. directories)
 Arrows denote code relations (e.g. include, call)

  How to test each module independently of other modules?




                                          © 2010 Fraunhofer USA, Inc.
                                                                                                  10
                                  Center for Experimental Software Engineering
Unit Test Architecture of CFS
• Core idea is to
   – Define mocks/stubs for dependent modules
   – Systematically control return codes of
     dependent modules
• Mocks are independent of other mocks
• Mocks have the same signature as the real
  interface
• Modules can be bound to mock modules
  or to real modules
  – Facilitates incremental integration testing too!11
                         © 2010 Fraunhofer USA, Inc.
                 Center for Experimental Software Engineering
How Return Code is Controlled?
• UT_SetRtn_t is the key data structure:
  –   typedef struct {
        uint32 count;
        uint32 value;
      } UT_SetRtn_t;

• Mocked functions are forced to return
  values based on the state of count
• For every mocked function, there is an
  instance of UT_SetRtn_t


                                 © 2010 Fraunhofer USA, Inc.
                                             12
                         Center for Experimental Software Engineering
Controlling the Return Code - Example
extern UT_SetRtn_t    SB_CreatePipeRtn;

// mock implementation of create pipe
int32 CFE_SB_CreatePipe (CFE_SB_PipeId_t *PipeIdPtr,
                             uint16 Depth,                         void UT_SetRtnCode (UT_SetRtn_t *varPtr,
                             char *PipeName) {                                            int32 rtnVal,
                                                                                          int32 cnt){
   if (SB_CreatePipeRtn.count > 0) {
                                                                     varPtr->value = rtnVal;
       SB_CreatePipeRtn.count--;                                     varPtr->count = cnt;
       if(SB_CreatePipeRtn.count == 0) {                           }
          return SB_CreatePipeRtn.value;
       }
   }
   return CFE_SUCCESS;
}


         // forces CreatePipe to succeed in the first and fail in the second call
         UT_SetRtnCode (&SB_CreatePipeRtn, -1, 2);


                                       © 2010 Fraunhofer USA, Inc.
                                                   13
                               Center for Experimental Software Engineering
Binding to Mock Modules
                The test suite for
                 the Executive                   es_ut.c
                  Service (ES)

                                             Executive
                                            Service (ES)


 ut_evs_stubs   ut_sb_stubs      ut_time_stubs      ut_tbl_stubs     ut_fs_stubs        ut_osapi_stubs   ut_bsp_stubs




Executive Service module uses stub implementations of dependent modules

The unit tests of ES control the return code of dependent modules to cover all paths




                                                 © 2010 Fraunhofer USA, Inc.
                                                                                                                        14
                                         Center for Experimental Software Engineering
Testability and Module Secrets
int32 CFE_ES_LoadLibrary(char *EntryPoint,
                            char *LibName, …) {
  boolean LibSlotFound = FALSE;
  for ( i = 0; i < CFE_ES_MAX_LIBRARIES; i++ ) {                                CFE_ES_MAX_LIBRARIES is a
     if ( CFE_ES_Global.LibTable[i].RecordUsed == FALSE ) {                     variation point
         LibSlotFound = TRUE;
         break;                                                                 CFE_ES_Global is an internal global
     }                                                                          variable of the ES module
  }
  if(LibSlotFound == FALSE)
     return CFE_ES_ERR_LOAD_LIB; …;
}



How do we test for more than the max. no. of loaded libraries scenario?
                      /* Test for loading more than max number of libraries */
                       for (j= 0; j < CFE_ES_MAX_LIBRARIES; j++) {
                             CFE_ES_Global.LibTable[j].RecordUsed = TRUE;
                       }
                       Return = CFE_ES_LoadLibrary("EntryPoint","LibName“, …);
                       UT_Report(Return == CFE_ES_ERR_LOAD_LIB,
                      "CFE_ES_LoadLibrary“, ”No free library slots");

    Test code needs access to modules’ secrets!
                               © 2010 Fraunhofer USA, Inc.
                                                                                                              15
                                 Center for Experimental Software Engineering
Same Return Code Impede Testing
int32 CFE_SB_SendMsg(CFE_SB_Msg_t *MsgPtr) {
 /* check input parameter */
if(MsgPtr == NULL){
                                                                                        Test code
 CFE_EVS_SendEventWithAppID(“Send Err:Bad input argument”,…);                     void Test_SendMsg_NullPtr(void){
 return CFE_SB_BAD_ARGUMENT;                                                         …
}                                                                                 ActRtn = CFE_SB_SendMsg(NULL);
                                                                                   ExpRtn =
MsgId = CFE_SB_GetMsgId(MsgPtr);                                                  CFE_SB_BAD_ARGUMENT;
/* validate the msgid in the message */                                            if(ActRtn != ExpRtn){
if(CFE_SB_ValidateMsgId(MsgId) != CFE_SUCCESS) {                                      TestStat = CFE_FAIL;
 CFE_EVS_SendEventWithAppID(“Send Err:Invalid MsgId”, …);                          }
 return CFE_SB_BAD_ARGUMENT;
}                                                                                  ExpRtn = 1;
   …                                                                               ActRtn = UT_GetNumEventsSent();
}                                                                                  if(ActRtn != ExpRtn){
                                                                                      TestStat = CFE_FAIL;
                                                                                   }
  Test code cannot easily verify which                                            …
  path was actually taken                                                         }


  Have to count the number of times
  log events (SendEvent)are used to
  justify the intended path      © 2010 Fraunhofer USA, Inc.
                                                                                                             16
                                   Center for Experimental Software Engineering
Testability, Abstract Interfaces and
     Alternative Implementations
                                         Software Bus (SB)                                 options



      linux/osapi.c             rtems/osapi.c                    vxworks6/osapi.c           Test/ut_osapi_stubs.c
      int32 OS_QueuePut(...){   int32 OS_QueuePut(...){          int32 OS_QueuePut(...){    int32 OS_QueuePut (...) {
        ...                         ...                           ...                        // Mock Implementation
      sendTo(...);              rtems_message_queue_send(...);    msgQSend (...);           }
        ...                         ...                           ...
      }                         }                                }




Software Bus needs services of OS Queues
CFS needs to run on several OS types
OS APIs are often different among OS
For improved testability, variations among APIs have to be abstracted
Benefits:
   Mock light-weight implementations of APIs for unit testing
   Unit test code is free of variability issues to a large extent

                                            © 2010 Fraunhofer USA, Inc.
                                                                                                                        17
                                    Center for Experimental Software Engineering
Some Data
Core Module     # of Functions in Interface      # Directly invoked in Unit Tests
SB                              30                                 30
ES                              33                                 31                   Each public function has at least one
EVS                             7                                  7
Time                            24                                 24
                                                                                         dedicated test program
Table                           14                                 13
File                            5                                  5


Core Module   # of Functions Defined     # Directly invoked in Unit Tests
SB                        86                              45
ES                       117                              68
EVS                       33                              12                       All internal functions are transitively tested
Time                      72                              42
Table                     60                              41
File                      11                              11


        Stub SB Stub ES Stub EVS Stub Time                Stub TBL Stub FS
SB      NA                11             3            1            0           1
ES             10 NA                     4            3            1           4    Only a few stubs are needed because
EVS             8         10 NA                       1            0           1
Time            9           8            2 NA                      0
                                                                                     of well-defined abstract interfaces!
TBL             9         15             3            1 NA                     3
FS              0           2            0            1            0 NA




                                                                  © 2010 Fraunhofer USA, Inc.
                                                                                                                           18
                                                          Center for Experimental Software Engineering
Conclusion
• Programming to abstract interfaces is key
  for improved testability
• Internal details of modules have to be
  open to facilitate unit testing
  – Apply architectural rules to prevent misusages
• Complete graph of dependencies do NOT
  imply poor design and low testability
• Treating testing as variation points help
  unit and incremental integration testing
                        © 2010 Fraunhofer USA, Inc.
                                                               19
                Center for Experimental Software Engineering
Acknowledgement
• Lisa Montgomery of the NASA IV & V

• Sally Godfrey of the NASA GSFC

• All members of the CFS/cFE team




                      © 2010 Fraunhofer USA, Inc.
                                                             20
              Center for Experimental Software Engineering

More Related Content

What's hot

Software Processes
Software Processes Software Processes
Software Processes
Mayuran Ramanathan
 
A framework for distributed control and building performance simulation
A framework for distributed control and building performance simulationA framework for distributed control and building performance simulation
A framework for distributed control and building performance simulation
Daniele Gianni
 
Objectif cloud
Objectif cloudObjectif cloud
Objectif cloud
Nicolas De Loof
 
Continuous Integration to Shift Left Testing Across the Enterprise Stack
Continuous Integration to Shift Left Testing Across the Enterprise StackContinuous Integration to Shift Left Testing Across the Enterprise Stack
Continuous Integration to Shift Left Testing Across the Enterprise Stack
DevOps.com
 
HTAF 2.0 - A hybrid test automation framework.
HTAF 2.0 - A hybrid test automation framework.HTAF 2.0 - A hybrid test automation framework.
HTAF 2.0 - A hybrid test automation framework.
Mindtree Ltd.
 
Mullane stanley-hamilton-wise
Mullane stanley-hamilton-wiseMullane stanley-hamilton-wise
Mullane stanley-hamilton-wise
NASAPMC
 
Software Design for Testability
Software Design for TestabilitySoftware Design for Testability
Software Design for Testability
amr0mt
 
Blue Monitor Software Development
Blue Monitor Software DevelopmentBlue Monitor Software Development
Blue Monitor Software Development
urbantech
 
Software+struc+doc
Software+struc+docSoftware+struc+doc
Software+struc+doc
G.C Reddy
 
IBM Rational Software Conference 2009: Quality Management Track Keynote
IBM Rational Software Conference 2009: Quality Management Track KeynoteIBM Rational Software Conference 2009: Quality Management Track Keynote
IBM Rational Software Conference 2009: Quality Management Track Keynote
Kathy (Kat) Mandelstein
 
Basics to have competitive advantage of S/W in global Market
Basics to have competitive advantage of S/W in global MarketBasics to have competitive advantage of S/W in global Market
Basics to have competitive advantage of S/W in global Market
Young On Kim
 
Gen sessionthomas.riskofsystemproblemfinal23feb12
Gen sessionthomas.riskofsystemproblemfinal23feb12Gen sessionthomas.riskofsystemproblemfinal23feb12
Gen sessionthomas.riskofsystemproblemfinal23feb12
NASAPMC
 
Oop01 6
Oop01 6Oop01 6
Oop01 6
schwaa
 
An Approach To Erp Testing Using Services
An Approach To Erp Testing Using ServicesAn Approach To Erp Testing Using Services
An Approach To Erp Testing Using Services
Sagi Schliesser
 
Dev ops for mainframe innovate session 2402
Dev ops for mainframe innovate session 2402Dev ops for mainframe innovate session 2402
Dev ops for mainframe innovate session 2402
Rosalind Radcliffe
 
Chip ex 2011 faraday
Chip ex 2011 faradayChip ex 2011 faraday
Chip ex 2011 faraday
chiportal
 
Adv prod tools assgn5
Adv prod tools assgn5Adv prod tools assgn5
Adv prod tools assgn5
Susmita Pruthi
 
Ui Modeling In Action With PMF, e4(XWT) And EGF
Ui Modeling In Action With PMF, e4(XWT) And EGFUi Modeling In Action With PMF, e4(XWT) And EGF
Ui Modeling In Action With PMF, e4(XWT) And EGF
BENOIT_LANGLOIS
 
Introduction to RamLog
Introduction to RamLogIntroduction to RamLog
Introduction to RamLog
CorrieTaljaard
 

What's hot (19)

Software Processes
Software Processes Software Processes
Software Processes
 
A framework for distributed control and building performance simulation
A framework for distributed control and building performance simulationA framework for distributed control and building performance simulation
A framework for distributed control and building performance simulation
 
Objectif cloud
Objectif cloudObjectif cloud
Objectif cloud
 
Continuous Integration to Shift Left Testing Across the Enterprise Stack
Continuous Integration to Shift Left Testing Across the Enterprise StackContinuous Integration to Shift Left Testing Across the Enterprise Stack
Continuous Integration to Shift Left Testing Across the Enterprise Stack
 
HTAF 2.0 - A hybrid test automation framework.
HTAF 2.0 - A hybrid test automation framework.HTAF 2.0 - A hybrid test automation framework.
HTAF 2.0 - A hybrid test automation framework.
 
Mullane stanley-hamilton-wise
Mullane stanley-hamilton-wiseMullane stanley-hamilton-wise
Mullane stanley-hamilton-wise
 
Software Design for Testability
Software Design for TestabilitySoftware Design for Testability
Software Design for Testability
 
Blue Monitor Software Development
Blue Monitor Software DevelopmentBlue Monitor Software Development
Blue Monitor Software Development
 
Software+struc+doc
Software+struc+docSoftware+struc+doc
Software+struc+doc
 
IBM Rational Software Conference 2009: Quality Management Track Keynote
IBM Rational Software Conference 2009: Quality Management Track KeynoteIBM Rational Software Conference 2009: Quality Management Track Keynote
IBM Rational Software Conference 2009: Quality Management Track Keynote
 
Basics to have competitive advantage of S/W in global Market
Basics to have competitive advantage of S/W in global MarketBasics to have competitive advantage of S/W in global Market
Basics to have competitive advantage of S/W in global Market
 
Gen sessionthomas.riskofsystemproblemfinal23feb12
Gen sessionthomas.riskofsystemproblemfinal23feb12Gen sessionthomas.riskofsystemproblemfinal23feb12
Gen sessionthomas.riskofsystemproblemfinal23feb12
 
Oop01 6
Oop01 6Oop01 6
Oop01 6
 
An Approach To Erp Testing Using Services
An Approach To Erp Testing Using ServicesAn Approach To Erp Testing Using Services
An Approach To Erp Testing Using Services
 
Dev ops for mainframe innovate session 2402
Dev ops for mainframe innovate session 2402Dev ops for mainframe innovate session 2402
Dev ops for mainframe innovate session 2402
 
Chip ex 2011 faraday
Chip ex 2011 faradayChip ex 2011 faraday
Chip ex 2011 faraday
 
Adv prod tools assgn5
Adv prod tools assgn5Adv prod tools assgn5
Adv prod tools assgn5
 
Ui Modeling In Action With PMF, e4(XWT) And EGF
Ui Modeling In Action With PMF, e4(XWT) And EGFUi Modeling In Action With PMF, e4(XWT) And EGF
Ui Modeling In Action With PMF, e4(XWT) And EGF
 
Introduction to RamLog
Introduction to RamLogIntroduction to RamLog
Introduction to RamLog
 

Similar to Analysis of Testability of a Flight Software Product Line

Architecture Analysis of Systems based on Publish-Subscribe Systems
Architecture Analysis of Systems based on Publish-Subscribe SystemsArchitecture Analysis of Systems based on Publish-Subscribe Systems
Architecture Analysis of Systems based on Publish-Subscribe Systems
Dharmalingam Ganesan
 
AF3 Interner Tag Offene Tueren
AF3 Interner Tag Offene TuerenAF3 Interner Tag Offene Tueren
AF3 Interner Tag Offene Tueren
af_devel
 
Automated Testing of NASA Software
Automated Testing of NASA SoftwareAutomated Testing of NASA Software
Automated Testing of NASA Software
Dharmalingam Ganesan
 
Testing of C software components using Models
Testing of C software components using ModelsTesting of C software components using Models
Testing of C software components using Models
Dharmalingam Ganesan
 
2012 06-15-jazoon12-sub138-eranea-large-apps-migration
2012 06-15-jazoon12-sub138-eranea-large-apps-migration2012 06-15-jazoon12-sub138-eranea-large-apps-migration
2012 06-15-jazoon12-sub138-eranea-large-apps-migration
Didier Durand
 
Singularity Rethinking The Software Stack
Singularity    Rethinking The  Software  StackSingularity    Rethinking The  Software  Stack
Singularity Rethinking The Software Stack
alanocu
 
Model-based Testing of a Software Bus - Applied on Core Flight Executive
Model-based Testing of a Software Bus - Applied on Core Flight ExecutiveModel-based Testing of a Software Bus - Applied on Core Flight Executive
Model-based Testing of a Software Bus - Applied on Core Flight Executive
Dharmalingam Ganesan
 
ShwetaKBijay-resume
ShwetaKBijay-resumeShwetaKBijay-resume
ShwetaKBijay-resume
Kumari Shweta Bijay
 
ModifiedInternPresentation
ModifiedInternPresentationModifiedInternPresentation
ModifiedInternPresentation
Dan Petrisko
 
Psi multi accessgateway_casestudy
Psi multi accessgateway_casestudyPsi multi accessgateway_casestudy
Psi multi accessgateway_casestudy
Primesoftinc
 
Host Simulation
Host SimulationHost Simulation
Host Simulation
napoleaninlondon
 
Data driven automation testing of web applications using selenium
Data driven automation testing of web applications using seleniumData driven automation testing of web applications using selenium
Data driven automation testing of web applications using selenium
anandseelan
 
Tivoli Development Cloud Pennock Final Web
Tivoli Development Cloud Pennock Final WebTivoli Development Cloud Pennock Final Web
Tivoli Development Cloud Pennock Final Web
Kennisportal
 
MingLiuResume2016
MingLiuResume2016MingLiuResume2016
MingLiuResume2016
Ming Liu
 
2010-12 SCAP Explained
2010-12 SCAP Explained 2010-12 SCAP Explained
2010-12 SCAP Explained
Raleigh ISSA
 
V Labs Product Presentation
V Labs  Product PresentationV Labs  Product Presentation
V Labs Product Presentation
Wil Huijben
 
SharePoint Application Lifecycle Management (ALM)
SharePoint Application Lifecycle Management (ALM)SharePoint Application Lifecycle Management (ALM)
SharePoint Application Lifecycle Management (ALM)
Ayman El-Hattab
 
Cynthia everett-resume-022713-rtf
Cynthia everett-resume-022713-rtfCynthia everett-resume-022713-rtf
Cynthia everett-resume-022713-rtf
Cynthia Everett
 
manu_resume
manu_resumemanu_resume
manu_resume
Manu VS
 
A Software Factory Integrating Rational Team Concert and WebSphere tools
A Software Factory Integrating Rational Team Concert and WebSphere toolsA Software Factory Integrating Rational Team Concert and WebSphere tools
A Software Factory Integrating Rational Team Concert and WebSphere tools
Prolifics
 

Similar to Analysis of Testability of a Flight Software Product Line (20)

Architecture Analysis of Systems based on Publish-Subscribe Systems
Architecture Analysis of Systems based on Publish-Subscribe SystemsArchitecture Analysis of Systems based on Publish-Subscribe Systems
Architecture Analysis of Systems based on Publish-Subscribe Systems
 
AF3 Interner Tag Offene Tueren
AF3 Interner Tag Offene TuerenAF3 Interner Tag Offene Tueren
AF3 Interner Tag Offene Tueren
 
Automated Testing of NASA Software
Automated Testing of NASA SoftwareAutomated Testing of NASA Software
Automated Testing of NASA Software
 
Testing of C software components using Models
Testing of C software components using ModelsTesting of C software components using Models
Testing of C software components using Models
 
2012 06-15-jazoon12-sub138-eranea-large-apps-migration
2012 06-15-jazoon12-sub138-eranea-large-apps-migration2012 06-15-jazoon12-sub138-eranea-large-apps-migration
2012 06-15-jazoon12-sub138-eranea-large-apps-migration
 
Singularity Rethinking The Software Stack
Singularity    Rethinking The  Software  StackSingularity    Rethinking The  Software  Stack
Singularity Rethinking The Software Stack
 
Model-based Testing of a Software Bus - Applied on Core Flight Executive
Model-based Testing of a Software Bus - Applied on Core Flight ExecutiveModel-based Testing of a Software Bus - Applied on Core Flight Executive
Model-based Testing of a Software Bus - Applied on Core Flight Executive
 
ShwetaKBijay-resume
ShwetaKBijay-resumeShwetaKBijay-resume
ShwetaKBijay-resume
 
ModifiedInternPresentation
ModifiedInternPresentationModifiedInternPresentation
ModifiedInternPresentation
 
Psi multi accessgateway_casestudy
Psi multi accessgateway_casestudyPsi multi accessgateway_casestudy
Psi multi accessgateway_casestudy
 
Host Simulation
Host SimulationHost Simulation
Host Simulation
 
Data driven automation testing of web applications using selenium
Data driven automation testing of web applications using seleniumData driven automation testing of web applications using selenium
Data driven automation testing of web applications using selenium
 
Tivoli Development Cloud Pennock Final Web
Tivoli Development Cloud Pennock Final WebTivoli Development Cloud Pennock Final Web
Tivoli Development Cloud Pennock Final Web
 
MingLiuResume2016
MingLiuResume2016MingLiuResume2016
MingLiuResume2016
 
2010-12 SCAP Explained
2010-12 SCAP Explained 2010-12 SCAP Explained
2010-12 SCAP Explained
 
V Labs Product Presentation
V Labs  Product PresentationV Labs  Product Presentation
V Labs Product Presentation
 
SharePoint Application Lifecycle Management (ALM)
SharePoint Application Lifecycle Management (ALM)SharePoint Application Lifecycle Management (ALM)
SharePoint Application Lifecycle Management (ALM)
 
Cynthia everett-resume-022713-rtf
Cynthia everett-resume-022713-rtfCynthia everett-resume-022713-rtf
Cynthia everett-resume-022713-rtf
 
manu_resume
manu_resumemanu_resume
manu_resume
 
A Software Factory Integrating Rational Team Concert and WebSphere tools
A Software Factory Integrating Rational Team Concert and WebSphere toolsA Software Factory Integrating Rational Team Concert and WebSphere tools
A Software Factory Integrating Rational Team Concert and WebSphere tools
 

More from Dharmalingam Ganesan

.NET Deserialization Attacks
.NET Deserialization Attacks.NET Deserialization Attacks
.NET Deserialization Attacks
Dharmalingam Ganesan
 
Reverse Architecting using Relation Algebra.pdf
Reverse Architecting using Relation Algebra.pdfReverse Architecting using Relation Algebra.pdf
Reverse Architecting using Relation Algebra.pdf
Dharmalingam Ganesan
 
How to exploit rand()?
How to exploit rand()?How to exploit rand()?
How to exploit rand()?
Dharmalingam Ganesan
 
Cyclic Attacks on the RSA Trapdoor Function
Cyclic Attacks on the RSA Trapdoor FunctionCyclic Attacks on the RSA Trapdoor Function
Cyclic Attacks on the RSA Trapdoor Function
Dharmalingam Ganesan
 
An Analysis of RSA Public Exponent e
An Analysis of RSA Public Exponent eAn Analysis of RSA Public Exponent e
An Analysis of RSA Public Exponent e
Dharmalingam Ganesan
 
An Analysis of Secure Remote Password (SRP)
An Analysis of Secure Remote Password (SRP)An Analysis of Secure Remote Password (SRP)
An Analysis of Secure Remote Password (SRP)
Dharmalingam Ganesan
 
Thank-a-Gram
Thank-a-GramThank-a-Gram
Thank-a-Gram
Dharmalingam Ganesan
 
Active Attacks on DH Key Exchange
Active Attacks on DH Key ExchangeActive Attacks on DH Key Exchange
Active Attacks on DH Key Exchange
Dharmalingam Ganesan
 
Can I write to a read only file ?
Can I write to a read only file ?Can I write to a read only file ?
Can I write to a read only file ?
Dharmalingam Ganesan
 
How do computers exchange secrets using Math?
How do computers exchange secrets using Math?How do computers exchange secrets using Math?
How do computers exchange secrets using Math?
Dharmalingam Ganesan
 
On the Secrecy of RSA Private Keys
On the Secrecy of RSA Private KeysOn the Secrecy of RSA Private Keys
On the Secrecy of RSA Private Keys
Dharmalingam Ganesan
 
Computing the Square Roots of Unity to break RSA using Quantum Algorithms
Computing the Square Roots of Unity to break RSA using Quantum AlgorithmsComputing the Square Roots of Unity to break RSA using Quantum Algorithms
Computing the Square Roots of Unity to break RSA using Quantum Algorithms
Dharmalingam Ganesan
 
Analysis of Short RSA Secret Exponent d
Analysis of Short RSA Secret Exponent dAnalysis of Short RSA Secret Exponent d
Analysis of Short RSA Secret Exponent d
Dharmalingam Ganesan
 
Dependency Analysis of RSA Private Variables
Dependency Analysis of RSA Private VariablesDependency Analysis of RSA Private Variables
Dependency Analysis of RSA Private Variables
Dharmalingam Ganesan
 
Analysis of Shared RSA Modulus
Analysis of Shared RSA ModulusAnalysis of Shared RSA Modulus
Analysis of Shared RSA Modulus
Dharmalingam Ganesan
 
RSA Game using an Oracle
RSA Game using an OracleRSA Game using an Oracle
RSA Game using an Oracle
Dharmalingam Ganesan
 
RSA Two Person Game
RSA Two Person GameRSA Two Person Game
RSA Two Person Game
Dharmalingam Ganesan
 
RSA without Integrity Checks
RSA without Integrity ChecksRSA without Integrity Checks
RSA without Integrity Checks
Dharmalingam Ganesan
 
RSA without Padding
RSA without PaddingRSA without Padding
RSA without Padding
Dharmalingam Ganesan
 
Solutions to online rsa factoring challenges
Solutions to online rsa factoring challengesSolutions to online rsa factoring challenges
Solutions to online rsa factoring challenges
Dharmalingam Ganesan
 

More from Dharmalingam Ganesan (20)

.NET Deserialization Attacks
.NET Deserialization Attacks.NET Deserialization Attacks
.NET Deserialization Attacks
 
Reverse Architecting using Relation Algebra.pdf
Reverse Architecting using Relation Algebra.pdfReverse Architecting using Relation Algebra.pdf
Reverse Architecting using Relation Algebra.pdf
 
How to exploit rand()?
How to exploit rand()?How to exploit rand()?
How to exploit rand()?
 
Cyclic Attacks on the RSA Trapdoor Function
Cyclic Attacks on the RSA Trapdoor FunctionCyclic Attacks on the RSA Trapdoor Function
Cyclic Attacks on the RSA Trapdoor Function
 
An Analysis of RSA Public Exponent e
An Analysis of RSA Public Exponent eAn Analysis of RSA Public Exponent e
An Analysis of RSA Public Exponent e
 
An Analysis of Secure Remote Password (SRP)
An Analysis of Secure Remote Password (SRP)An Analysis of Secure Remote Password (SRP)
An Analysis of Secure Remote Password (SRP)
 
Thank-a-Gram
Thank-a-GramThank-a-Gram
Thank-a-Gram
 
Active Attacks on DH Key Exchange
Active Attacks on DH Key ExchangeActive Attacks on DH Key Exchange
Active Attacks on DH Key Exchange
 
Can I write to a read only file ?
Can I write to a read only file ?Can I write to a read only file ?
Can I write to a read only file ?
 
How do computers exchange secrets using Math?
How do computers exchange secrets using Math?How do computers exchange secrets using Math?
How do computers exchange secrets using Math?
 
On the Secrecy of RSA Private Keys
On the Secrecy of RSA Private KeysOn the Secrecy of RSA Private Keys
On the Secrecy of RSA Private Keys
 
Computing the Square Roots of Unity to break RSA using Quantum Algorithms
Computing the Square Roots of Unity to break RSA using Quantum AlgorithmsComputing the Square Roots of Unity to break RSA using Quantum Algorithms
Computing the Square Roots of Unity to break RSA using Quantum Algorithms
 
Analysis of Short RSA Secret Exponent d
Analysis of Short RSA Secret Exponent dAnalysis of Short RSA Secret Exponent d
Analysis of Short RSA Secret Exponent d
 
Dependency Analysis of RSA Private Variables
Dependency Analysis of RSA Private VariablesDependency Analysis of RSA Private Variables
Dependency Analysis of RSA Private Variables
 
Analysis of Shared RSA Modulus
Analysis of Shared RSA ModulusAnalysis of Shared RSA Modulus
Analysis of Shared RSA Modulus
 
RSA Game using an Oracle
RSA Game using an OracleRSA Game using an Oracle
RSA Game using an Oracle
 
RSA Two Person Game
RSA Two Person GameRSA Two Person Game
RSA Two Person Game
 
RSA without Integrity Checks
RSA without Integrity ChecksRSA without Integrity Checks
RSA without Integrity Checks
 
RSA without Padding
RSA without PaddingRSA without Padding
RSA without Padding
 
Solutions to online rsa factoring challenges
Solutions to online rsa factoring challengesSolutions to online rsa factoring challenges
Solutions to online rsa factoring challenges
 

Recently uploaded

zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
Alex Pruden
 
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
DanBrown980551
 
What is an RPA CoE? Session 2 – CoE Roles
What is an RPA CoE?  Session 2 – CoE RolesWhat is an RPA CoE?  Session 2 – CoE Roles
What is an RPA CoE? Session 2 – CoE Roles
DianaGray10
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
Edge AI and Vision Alliance
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
"What does it really mean for your system to be available, or how to define w...
"What does it really mean for your system to be available, or how to define w..."What does it really mean for your system to be available, or how to define w...
"What does it really mean for your system to be available, or how to define w...
Fwdays
 
High performance Serverless Java on AWS- GoTo Amsterdam 2024
High performance Serverless Java on AWS- GoTo Amsterdam 2024High performance Serverless Java on AWS- GoTo Amsterdam 2024
High performance Serverless Java on AWS- GoTo Amsterdam 2024
Vadym Kazulkin
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Pitangent Analytics & Technology Solutions Pvt. Ltd
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
Antonios Katsarakis
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
Pablo Gómez Abajo
 
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptxPRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
christinelarrosa
 
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeckPoznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
FilipTomaszewski5
 
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin..."$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
Fwdays
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
DianaGray10
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
Fwdays
 
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham HillinQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
LizaNolte
 

Recently uploaded (20)

zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
 
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
 
What is an RPA CoE? Session 2 – CoE Roles
What is an RPA CoE?  Session 2 – CoE RolesWhat is an RPA CoE?  Session 2 – CoE Roles
What is an RPA CoE? Session 2 – CoE Roles
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
"What does it really mean for your system to be available, or how to define w...
"What does it really mean for your system to be available, or how to define w..."What does it really mean for your system to be available, or how to define w...
"What does it really mean for your system to be available, or how to define w...
 
High performance Serverless Java on AWS- GoTo Amsterdam 2024
High performance Serverless Java on AWS- GoTo Amsterdam 2024High performance Serverless Java on AWS- GoTo Amsterdam 2024
High performance Serverless Java on AWS- GoTo Amsterdam 2024
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
 
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptxPRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
 
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeckPoznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
 
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin..."$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
 
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham HillinQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
 

Analysis of Testability of a Flight Software Product Line

  • 1. Architecture-based Unit Testing of the Flight Software Product Line Fraunhofer CESE NASA Goddard Space Flight Center Dharmalingam Ganesan David McComas Mikael Lindvall Maureen Bartholomew Steve Slegel Barbara Medina © 2010 Fraunhofer USA, Inc. 1 Center for Experimental Software Engineering
  • 2. Background • Unit testing deals with testing individual modules in isolation – Assuming the correctness of dependent modules • Bugs found during unit testing are cheaper to fix than – Integration testing – System testing – Field reported defects © 2010 Fraunhofer USA, Inc. 2 Center for Experimental Software Engineering
  • 3. Unit Testing Challenges in Practice • Isolating the module under test from other modules • Isolating from special OS and hardware features • Handling the variability or configuration dimension • Developing flexible build process (e.g., Makefiles) that facilitates unit testing © 2010 Fraunhofer USA, Inc. 3 Center for Experimental Software Engineering
  • 4. Research Questions • What architectural design decisions facilitate or impede unit testing? • How can we make use of the architecture to define the architecture of test code? Approach: Case-study driven - NASA’s Core Flight Software Product Line (CFS) © 2010 Fraunhofer USA, Inc. 4 Center for Experimental Software Engineering
  • 5. Reusable Analysis Questions • Can modules be tested independently of other modules they use? • Can modules be unit tested without access to special hardware and/or OS? • How are variation points of each module being handled during unit testing? • Is there a common look-and-feel in terms of the way the modules are unit tested? • How easy it is to set-up a unit test?  (additional questions are listed in the paper) © 2010 Fraunhofer USA, Inc. 5 Center for Experimental Software Engineering
  • 6. Technical Set-up for Analysis Source Code Makefiles 1 Data Extraction Test Suites (Automated Parsing) Call relation, Include relation, variation Makefiles of points for source test suites Call relation, code Include relation, variation points for test suites 2 Visualization, Query and Analysis Data extraction is automated using standard parsers Data analysis and visualization are semi-automatic using tools: Relation Partition Algebra (RPA) query language SAVE-Light, SAVE Prefuse 6 © 2010 Fraunhofer USA, Inc. Center for Experimental Software Engineering
  • 7. Product Line Structure of the CFS CFS Application A CFS Application B CFS Application C … Core Flight Executive (cFE) Services Layer Software Bus (SB) Executive Services (ES) Table Services (TBL) File Service (FS) Event Services (EVS) services cFE Board Support Hardware Abstraction OS Abstraction Layer Package (BSP) Layer Layer Board Support Package Real time OS Device Drivers (BSP) Hardware See our SPLC 2009 paper for:  the heritage of the CFS  the business goals of the CFS  architectural analysis of the CFS implementation © 2010 Fraunhofer USA, Inc. 7 Center for Experimental Software Engineering
  • 8. Run-time Structure of the CFS House- Memory Memory keeping Checksum Manager Dwell * cFE core Applications Inter-task Message Router (SW Bus) Some CFS Applications Some Mission Applications Telemetry Command Software Time Executive Event Table File * * * Services * * * Output Ingest Bus Services Services Services Services Applications communicate by publishing/subscribing messages to the bus Core applications can also directly talk to each other using function calls Example Variation Points: Maximum number of applications using the SW bus Maximum number of messages in the SW bus Maximum number of messages an application can receive © 2010 Fraunhofer USA, Inc. 8 Center for Experimental Software Engineering
  • 9. Missions using CFS/cFE Mission Managed by cFE CFS Apps Status CHIPS GSFC ✓ Successfully demonstrated DSILCAS GSFC ✓ Integrated in FSW lab GPM GSFC ✓ ✓ Integrated in FSW lab LADEE ARC ✓ ✓ Integrated in FSW lab LRO APL ✓ On orbit MMS GSFC ✓ ✓ Integrated in FSW lab Nanosat-6 AFRL/Cornell ✓ ✓ Integrated in FSW lab RBSP APL ✓ Integrated in FSW lab RLL APL ✓ Integrated in FSW lab Solar APL ✓ Integrated in FSW lab Probe Plus  Many missions depend on the quality of CFS/cFE and the reusable components it provides! © 2010 Fraunhofer USA, Inc. 9 Center for Experimental Software Engineering
  • 10. Dependencies of Core Modules cFE - Core Executive Service (ES) Software Bus (SB) Event Service (EVS) File Service (FS) Table Service (TBL) Timing Service (Time) Reverse engineered from the source code of the CFS Boxes denote modules (i.e. directories) Arrows denote code relations (e.g. include, call)  How to test each module independently of other modules? © 2010 Fraunhofer USA, Inc. 10 Center for Experimental Software Engineering
  • 11. Unit Test Architecture of CFS • Core idea is to – Define mocks/stubs for dependent modules – Systematically control return codes of dependent modules • Mocks are independent of other mocks • Mocks have the same signature as the real interface • Modules can be bound to mock modules or to real modules – Facilitates incremental integration testing too!11 © 2010 Fraunhofer USA, Inc. Center for Experimental Software Engineering
  • 12. How Return Code is Controlled? • UT_SetRtn_t is the key data structure: – typedef struct { uint32 count; uint32 value; } UT_SetRtn_t; • Mocked functions are forced to return values based on the state of count • For every mocked function, there is an instance of UT_SetRtn_t © 2010 Fraunhofer USA, Inc. 12 Center for Experimental Software Engineering
  • 13. Controlling the Return Code - Example extern UT_SetRtn_t SB_CreatePipeRtn; // mock implementation of create pipe int32 CFE_SB_CreatePipe (CFE_SB_PipeId_t *PipeIdPtr, uint16 Depth, void UT_SetRtnCode (UT_SetRtn_t *varPtr, char *PipeName) { int32 rtnVal, int32 cnt){ if (SB_CreatePipeRtn.count > 0) { varPtr->value = rtnVal; SB_CreatePipeRtn.count--; varPtr->count = cnt; if(SB_CreatePipeRtn.count == 0) { } return SB_CreatePipeRtn.value; } } return CFE_SUCCESS; } // forces CreatePipe to succeed in the first and fail in the second call UT_SetRtnCode (&SB_CreatePipeRtn, -1, 2); © 2010 Fraunhofer USA, Inc. 13 Center for Experimental Software Engineering
  • 14. Binding to Mock Modules The test suite for the Executive es_ut.c Service (ES) Executive Service (ES) ut_evs_stubs ut_sb_stubs ut_time_stubs ut_tbl_stubs ut_fs_stubs ut_osapi_stubs ut_bsp_stubs Executive Service module uses stub implementations of dependent modules The unit tests of ES control the return code of dependent modules to cover all paths © 2010 Fraunhofer USA, Inc. 14 Center for Experimental Software Engineering
  • 15. Testability and Module Secrets int32 CFE_ES_LoadLibrary(char *EntryPoint, char *LibName, …) { boolean LibSlotFound = FALSE; for ( i = 0; i < CFE_ES_MAX_LIBRARIES; i++ ) { CFE_ES_MAX_LIBRARIES is a if ( CFE_ES_Global.LibTable[i].RecordUsed == FALSE ) { variation point LibSlotFound = TRUE; break; CFE_ES_Global is an internal global } variable of the ES module } if(LibSlotFound == FALSE) return CFE_ES_ERR_LOAD_LIB; …; } How do we test for more than the max. no. of loaded libraries scenario? /* Test for loading more than max number of libraries */ for (j= 0; j < CFE_ES_MAX_LIBRARIES; j++) { CFE_ES_Global.LibTable[j].RecordUsed = TRUE; } Return = CFE_ES_LoadLibrary("EntryPoint","LibName“, …); UT_Report(Return == CFE_ES_ERR_LOAD_LIB, "CFE_ES_LoadLibrary“, ”No free library slots"); Test code needs access to modules’ secrets! © 2010 Fraunhofer USA, Inc. 15 Center for Experimental Software Engineering
  • 16. Same Return Code Impede Testing int32 CFE_SB_SendMsg(CFE_SB_Msg_t *MsgPtr) { /* check input parameter */ if(MsgPtr == NULL){ Test code CFE_EVS_SendEventWithAppID(“Send Err:Bad input argument”,…); void Test_SendMsg_NullPtr(void){ return CFE_SB_BAD_ARGUMENT; … } ActRtn = CFE_SB_SendMsg(NULL); ExpRtn = MsgId = CFE_SB_GetMsgId(MsgPtr); CFE_SB_BAD_ARGUMENT; /* validate the msgid in the message */ if(ActRtn != ExpRtn){ if(CFE_SB_ValidateMsgId(MsgId) != CFE_SUCCESS) { TestStat = CFE_FAIL; CFE_EVS_SendEventWithAppID(“Send Err:Invalid MsgId”, …); } return CFE_SB_BAD_ARGUMENT; } ExpRtn = 1; … ActRtn = UT_GetNumEventsSent(); } if(ActRtn != ExpRtn){ TestStat = CFE_FAIL; } Test code cannot easily verify which … path was actually taken } Have to count the number of times log events (SendEvent)are used to justify the intended path © 2010 Fraunhofer USA, Inc. 16 Center for Experimental Software Engineering
  • 17. Testability, Abstract Interfaces and Alternative Implementations Software Bus (SB) options linux/osapi.c rtems/osapi.c vxworks6/osapi.c Test/ut_osapi_stubs.c int32 OS_QueuePut(...){ int32 OS_QueuePut(...){ int32 OS_QueuePut(...){ int32 OS_QueuePut (...) { ... ... ... // Mock Implementation sendTo(...); rtems_message_queue_send(...); msgQSend (...); } ... ... ... } } } Software Bus needs services of OS Queues CFS needs to run on several OS types OS APIs are often different among OS For improved testability, variations among APIs have to be abstracted Benefits: Mock light-weight implementations of APIs for unit testing Unit test code is free of variability issues to a large extent © 2010 Fraunhofer USA, Inc. 17 Center for Experimental Software Engineering
  • 18. Some Data Core Module # of Functions in Interface # Directly invoked in Unit Tests SB 30 30 ES 33 31  Each public function has at least one EVS 7 7 Time 24 24 dedicated test program Table 14 13 File 5 5 Core Module # of Functions Defined # Directly invoked in Unit Tests SB 86 45 ES 117 68 EVS 33 12 All internal functions are transitively tested Time 72 42 Table 60 41 File 11 11 Stub SB Stub ES Stub EVS Stub Time Stub TBL Stub FS SB NA 11 3 1 0 1 ES 10 NA 4 3 1 4 Only a few stubs are needed because EVS 8 10 NA 1 0 1 Time 9 8 2 NA 0 of well-defined abstract interfaces! TBL 9 15 3 1 NA 3 FS 0 2 0 1 0 NA © 2010 Fraunhofer USA, Inc. 18 Center for Experimental Software Engineering
  • 19. Conclusion • Programming to abstract interfaces is key for improved testability • Internal details of modules have to be open to facilitate unit testing – Apply architectural rules to prevent misusages • Complete graph of dependencies do NOT imply poor design and low testability • Treating testing as variation points help unit and incremental integration testing © 2010 Fraunhofer USA, Inc. 19 Center for Experimental Software Engineering
  • 20. Acknowledgement • Lisa Montgomery of the NASA IV & V • Sally Godfrey of the NASA GSFC • All members of the CFS/cFE team © 2010 Fraunhofer USA, Inc. 20 Center for Experimental Software Engineering