SlideShare uma empresa Scribd logo
1 de 21
Baixar para ler offline
Automated Test Generation for
        Flight Software (FSW)

Dharmalingam Ganesan                                                                           David McComas
Mikael Lindvall                                                                                Nicholas Yanchik
Christoph Schulze                                                                              Alan Cudmore
Gunnar Cortes                                                                                  Steve Slegel
                                                                                                         Goddard	
  Space	
  Flight	
  Center	
  
                                                                                                         Code	
  582,	
  Flight	
  So>ware	
  	
  
Fraunhofer	
  Center	
  Maryland	
  
                                                                                                         Systems	
  	
  Branch	
  


                                                      ©	
  2011	
  Fraunhofer	
  USA,	
  Inc.	
  
                                       	
  Center	
  for	
  Experimental	
  So>ware	
  Engineering	
  
Problems with Current Testing
•  Manual testing takes a lot of effort


•  Manual testing could miss “corner-cases”


•  Test cases difficult to maintain and reuse on multiple
   environments


•  Tests are technical, typically not domain oriented
   –  and thus difficult to understand for non-technical stakeholders



                                        ©	
  2011	
  Fraunhofer	
  USA,	
  Inc.	
  
                         	
  Center	
  for	
  Experimental	
  So>ware	
  Engineering	
  
                                                                                           2	
  
Model based testing (MBT)
•  Solution: Generate Test Cases using MBT!
   –  We incrementally model the behavior of the software to be tested
       •  Good and “Evil” usages
       •  Expected results are embedded in the model

   –  Based on the model, the test generator automatically generates test
      cases
   –  Any type of test cases can be generated
       •  Junit, Xunit, soapUI, Selenium, CuTest, etc.

•  Extra benefits
   –  We have a very visual representation of the system
   –  Test cases are domain oriented and easier to understand for non-
      technical stakeholders
   –  Documentation of behavior


                                             ©	
  2011	
  Fraunhofer	
  USA,	
  Inc.	
  
                              	
  Center	
  for	
  Experimental	
  So>ware	
  Engineering	
  
                                                                                                3	
  
Hello World to MBT




                   ©	
  2011	
  Fraunhofer	
  USA,	
  Inc.	
  
    	
  Center	
  for	
  Experimental	
  So>ware	
  Engineering	
  
                                                                      4	
  
Terminology
  Nodes of the model are called states

  Edges of the model are called transitions

  Each test case is a path from the start state to the exit state

  A random test is generated using a random walk from the start
   state to the exit state

  A test suite is a collection of test cases




                                        ©	
  2011	
  Fraunhofer	
  USA,	
  Inc.	
  
                         	
  Center	
  for	
  Experimental	
  So>ware	
  Engineering	
  
                                                                                           5	
  
Architecture of MBT
                  Model	
  
                                                                                         List	
  of	
  
                                                                                        abstract	
  
                                                                                        acRons	
  
              ITestMonkey	
  
                                                                                                          List	
  of	
  abstract	
  
                                                                                                             input	
  data	
  
                                                                                                              provider	
  
           TestMonkeyImpl	
                                        ITestDataProvider	
                        methods	
  


                Interface	
  
           System	
  Under	
  Test	
                               TestDataProviderImpl	
  



 Model	
  is	
  agnosRc	
  to	
  the	
  test	
  execuRon	
  technology	
  
 	
  ITestMonkey	
  interface	
  hides	
  the	
  test	
  execuRon	
  framework	
  
 TestMonkeyImpl	
  uses	
  interfaces	
  of	
  the	
  test	
  execuRon	
  framework	
  


                                                ©	
  2011	
  Fraunhofer	
  USA,	
  Inc.	
  
                                 	
  Center	
  for	
  Experimental	
  So>ware	
  Engineering	
  
                                                                                                                                 6	
  
Workflow




               ©	
  2011	
  Fraunhofer	
  USA,	
  Inc.	
  
	
  Center	
  for	
  Experimental	
  So>ware	
  Engineering	
  
                                                                  7	
  
Flight Software Under Test
•  Operating System Abstraction Layer (OSAL)
•  Isolates flight software from operating
   systems and hardware
•  Implementations for the real time systems
   RTEMS and VxWorks and posix compliant
   non-real time systems
•  Used for mission critical embedded systems
•  Provides support for file-system, tasks,
   queues, semaphores, interrupts, hardware
   abstraction, I/O ports and exception handling
                                 ©	
  2011	
  Fraunhofer	
  USA,	
  Inc.	
  
                  	
  Center	
  for	
  Experimental	
  So>ware	
  Engineering	
  
                                                                                    8	
  
NASA OSAL
•  Why is it important that OSAL be bug free?
  –  Flight software is mission critical and needs to
     be of very high quality
  –  OSAL is the foundation of the core Flight
     Executive (cFE)
  –  OSAL is used in many NASA missions, e.g. the
     Lunar Renaissance Orbit
  –  If OSAL has issues, it might result in
     catastrophic failure


                                 ©	
  2011	
  Fraunhofer	
  USA,	
  Inc.	
  
                  	
  Center	
  for	
  Experimental	
  So>ware	
  Engineering	
  
                                                                                    9	
  
NASA OSAL – Architecture
Flight	
  So>ware	
  




                                       ©	
  2011	
  Fraunhofer	
  USA,	
  Inc.	
  
                        	
  Center	
  for	
  Experimental	
  So>ware	
  Engineering	
  
                                                                                          10	
  
Applying MBT on OSAL
•  Model captures OSAL’s expected behavior


•  Test monkey has abstract instructions e.g.
   “CreateFileValid”, “CreateFileInvalid”


•  We created and used a dynamic data provider
  •  Generates file and folder names
  •  Generates content for files

                               ©	
  2011	
  Fraunhofer	
  USA,	
  Inc.	
  
                	
  Center	
  for	
  Experimental	
  So>ware	
  Engineering	
  
                                                                                  11	
  
Applying MBT on OSAL ...
•  OSAL‘s file system API‘s were modeled


•  Several test cases in C were automatically
   generated
  •  We used the open source CuTest test execution
     framework




                              ©	
  2011	
  Fraunhofer	
  USA,	
  Inc.	
  
               	
  Center	
  for	
  Experimental	
  So>ware	
  Engineering	
  
                                                                                 12	
  
Example of a OSAL model




                      ©	
  2011	
  Fraunhofer	
  USA,	
  Inc.	
  
       	
  Center	
  for	
  Experimental	
  So>ware	
  Engineering	
  
                                                                         13	
  
API spec of make directory
/*-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐	
  
	
  	
  	
  	
  Name:	
  OS_mkdir	
  
	
  
	
  	
  	
  	
  Purpose:	
  makes	
  a	
  directory	
  specified	
  by	
  path.	
  
	
  
	
  	
  	
  	
  Returns:	
  OS_FS_ERR_INVALID_POINTER	
  if	
  path	
  is	
  NULL	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  OS_FS_ERR_PATH_TOO_LONG	
  if	
  the	
  path	
  is	
  too	
  long	
  to	
  be	
  stored	
  locally	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  OS_FS_ERR_PATH_INVALID	
  if	
  path	
  cannot	
  be	
  parsed	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  OS_FS_ERROR	
  if	
  the	
  OS	
  call	
  fails	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  OS_FS_SUCCESS	
  if	
  success	
  
	
  
	
  	
  	
  	
  Note:	
  The	
  access	
  parameter	
  is	
  currently	
  unused.	
  
-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐*/	
  
	
  
int32	
  OS_mkdir	
  (const	
  char	
  *path,	
  uint32	
  access);	
  
	
  



                                                                                                                          ©	
  2011	
  Fraunhofer	
  USA,	
  Inc.	
  
                                                                                                           	
  Center	
  for	
  Experimental	
  So>ware	
  Engineering	
  
                                                                                                                                                                                                                                                                              14	
  
Sub-model of make directory

 pointer	
  =	
  openDirectoryValid();	
  
CuAssertTrue(tc,pointer	
  !=	
  NULL);	
  




                                                    ©	
  2011	
  Fraunhofer	
  USA,	
  Inc.	
  
                                     	
  Center	
  for	
  Experimental	
  So>ware	
  Engineering	
  
                                                                                                       15	
  
Sample generated Test in CuTest
void	
  Testosal_Filesystem_min_2(CuTest*	
  tc)	
  
	
  {	
  	
  
	
  	
  	
  	
  	
  status	
  =	
  makeFilesystemValid();	
  
	
  	
  	
  	
  	
  CuAssertIntEquals_Msg(tc,"Filesystem	
  could	
  not	
  be	
  created",	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  OS_FS_SUCCESS,	
  status);	
  
	
  
	
  	
  	
  	
  	
  status	
  =	
  mountFilesystemValid();	
  
	
  	
  	
  	
  	
  CuAssertIntEquals_Msg(tc,"Filesystem	
  could	
  not	
  be	
  mounted",	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  OS_FS_SUCCESS,	
  status);	
  	
  
	
  	
  	
  	
  	
  
	
  	
  	
  	
  pointer	
  =	
  openDirectoryValid();	
  
	
  	
  	
  	
  CuAssertTrue(tc,	
  pointer	
  !=	
  NULL);	
  
	
  	
  	
  	
  …	
  
	
  	
  	
  	
  status	
  =	
  removeFilesystemValid();	
  
	
  	
  	
  	
  CuAssertIntEquals_Msg(tc,"Filesystem	
  could	
  not	
  be	
  removed”,	
  status);	
  
}	
  


                                                                                                    ©	
  2011	
  Fraunhofer	
  USA,	
  Inc.	
  
                                                                                     	
  Center	
  for	
  Experimental	
  So>ware	
  Engineering	
  
                                                                                                                                                                                                                     16	
  
Issues found using MBT
•  OSAL	
  is	
  a	
  high-­‐quality	
  product	
  (only	
  a	
  few	
  issues	
  detected!)	
  
•  Issues	
  found	
  when	
  running	
  model	
  based	
  tests	
  on	
  the	
  Posix	
  implementaRon	
  
   of	
  OSAL:	
  
•  File-­‐descriptors	
  a>er	
  removing	
  file-­‐system:	
  
     •  A>er	
  somewhat	
  long	
  tests	
  we	
  would	
  run	
  out	
  of	
  file-­‐descriptors	
  
     •  This	
  would	
  even	
  happen	
  with	
  a	
  newly	
  created	
  file-­‐system	
  
     •  Cause:	
  OSAL	
  does	
  not	
  remove	
  file-­‐descriptors	
  when	
  the	
  file-­‐system	
  is	
  removed	
  
•  Wrong	
  error	
  codes	
  returned	
  and	
  unimplemented	
  features:	
  
               Test	
  scenario	
               Error	
  message	
                                     Expected	
             Actual	
  
                                         	
  Expected	
  'invalid	
  
  checkFileSystemNullName()	
            pointer'	
  error	
                    OS_FS_ERR_INVALID_POINTER	
   OS_FS_UNIMPLEMENTED	
  
                                         	
  Expected	
  
  checkFileSystemOsCallFails()	
         'filesystem'	
  error	
                 OS_FS_ERROR	
                         OS_FS_UNIMPLEMENTED	
  
                                         	
  Filesystem	
  Not	
  
  checkFilesystemValid()	
               Checked	
                              OS_FS_SUCCESS	
                       OS_FS_UNIMPLEMENTED	
  
                                         	
  Filesystem	
  error	
                                                    OS_FS_ERR_NAME_TOO_
  copyFileLongSourceFilename()	
         code	
  expected	
                     OS_FS_ERROR	
                         LONG	
  
                                         	
  Filesystem	
  error	
  
  copyFileNonExisRngSourceFile()	
   code	
  expected	
                         OS_FS_ERROR	
                         OS_FS_SUCCESS	
  
                                         	
  Filesystem	
  error	
                                                    OS_FS_ERR_NAME_TOO_
  renameFileLongSourceFilename()	
  	
   code	
  expected	
                     OS_FS_ERROR	
                         LONG	
  

                                                                   ©	
  2011	
  Fraunhofer	
  USA,	
  Inc.	
  
                                                    	
  Center	
  for	
  Experimental	
  So>ware	
  Engineering	
  
                                                                                                                                           17	
  
MBT – some limitations
•  Modeling requires specification of SUT
•  Developers are typically not used to
   modeling
•  Difficult to document individual test cases
  –  Note: Models summarize all test cases
  –  Some customers require document of each
     test case



                                ©	
  2011	
  Fraunhofer	
  USA,	
  Inc.	
  
                 	
  Center	
  for	
  Experimental	
  So>ware	
  Engineering	
  
                                                                                   18	
  
Summary and Future Work
•  MBT works for API-based testing!
•  Some detected issues are serious (e.g., running out of
   file descriptors)
•  MBT requires manual work for
   –  constructing models
   –  monkey and data provider implementations
   –  maintenance of above artifacts
•  However, test cases are automatically generated
•  Future:
   –  Evaluating it on requirements of cFE/CFS
   –  ROI estimation


                                     ©	
  2011	
  Fraunhofer	
  USA,	
  Inc.	
  
                      	
  Center	
  for	
  Experimental	
  So>ware	
  Engineering	
  
                                                                                        19	
  
Acknowledgement
•  Lisa Montgomery - NASA SARP for
   supporting our applied research
•  Sally Godfrey – NASA GSFC


•  Thank you!




                               ©	
  2011	
  Fraunhofer	
  USA,	
  Inc.	
  
                	
  Center	
  for	
  Experimental	
  So>ware	
  Engineering	
  
                                                                                  20	
  
Acronyms
•  API: Application Program Interface
•  cFE: Core Flight Executive
•  CFR: Code of Federal Regulations
•  CFS: Core Flight Software
•  FSW: Flight Software
•  MBT: Model-based Testing
•  OSAL: Operating System Abstraction Layer
•  ROI: Return on Investment
•  SUT: System Under Test


                                    ©	
  2011	
  Fraunhofer	
  USA,	
  Inc.	
  
                     	
  Center	
  for	
  Experimental	
  So>ware	
  Engineering	
  
                                                                                       21	
  

Mais conteúdo relacionado

Destaque

Model-based Testing using Microsoft’s Spec Explorer Tool: A Case Study
Model-based Testing using Microsoft’s Spec Explorer Tool: A Case StudyModel-based Testing using Microsoft’s Spec Explorer Tool: A Case Study
Model-based Testing using Microsoft’s Spec Explorer Tool: A Case StudyDharmalingam Ganesan
 
Linux binary analysis and exploitation
Linux binary analysis and exploitationLinux binary analysis and exploitation
Linux binary analysis and exploitationDharmalingam Ganesan
 
Ivv workshop model-based-testing-of-nasa-systems
Ivv workshop model-based-testing-of-nasa-systemsIvv workshop model-based-testing-of-nasa-systems
Ivv workshop model-based-testing-of-nasa-systemsDharmalingam Ganesan
 
Reverse Architecting of a Medical Device Software
Reverse Architecting of a Medical Device SoftwareReverse Architecting of a Medical Device Software
Reverse Architecting of a Medical Device SoftwareDharmalingam Ganesan
 
Assessing Model-Based Testing: An Empirical Study Conducted in Industry
Assessing Model-Based Testing: An Empirical Study Conducted in IndustryAssessing Model-Based Testing: An Empirical Study Conducted in Industry
Assessing Model-Based Testing: An Empirical Study Conducted in IndustryDharmalingam Ganesan
 
Secure application programming in the presence of side channel attacks
Secure application programming in the presence of side channel attacksSecure application programming in the presence of side channel attacks
Secure application programming in the presence of side channel attacksDharmalingam Ganesan
 
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 SystemsDharmalingam Ganesan
 
Explaining my Phd Thesis to layman
Explaining my Phd Thesis to laymanExplaining my Phd Thesis to layman
Explaining my Phd Thesis to laymanDharmalingam Ganesan
 
Automated testing of NASA Software - part 2
Automated testing of NASA Software - part 2Automated testing of NASA Software - part 2
Automated testing of NASA Software - part 2Dharmalingam Ganesan
 
Automated Testing of NASA Software
Automated Testing of NASA SoftwareAutomated Testing of NASA Software
Automated Testing of NASA SoftwareDharmalingam Ganesan
 
Reverse Engineering of Software Architecture
Reverse Engineering of Software ArchitectureReverse Engineering of Software Architecture
Reverse Engineering of Software ArchitectureDharmalingam Ganesan
 
Automated Test Case Generation and Execution from Models
Automated Test Case Generation and Execution from ModelsAutomated Test Case Generation and Execution from Models
Automated Test Case Generation and Execution from ModelsDharmalingam Ganesan
 

Destaque (12)

Model-based Testing using Microsoft’s Spec Explorer Tool: A Case Study
Model-based Testing using Microsoft’s Spec Explorer Tool: A Case StudyModel-based Testing using Microsoft’s Spec Explorer Tool: A Case Study
Model-based Testing using Microsoft’s Spec Explorer Tool: A Case Study
 
Linux binary analysis and exploitation
Linux binary analysis and exploitationLinux binary analysis and exploitation
Linux binary analysis and exploitation
 
Ivv workshop model-based-testing-of-nasa-systems
Ivv workshop model-based-testing-of-nasa-systemsIvv workshop model-based-testing-of-nasa-systems
Ivv workshop model-based-testing-of-nasa-systems
 
Reverse Architecting of a Medical Device Software
Reverse Architecting of a Medical Device SoftwareReverse Architecting of a Medical Device Software
Reverse Architecting of a Medical Device Software
 
Assessing Model-Based Testing: An Empirical Study Conducted in Industry
Assessing Model-Based Testing: An Empirical Study Conducted in IndustryAssessing Model-Based Testing: An Empirical Study Conducted in Industry
Assessing Model-Based Testing: An Empirical Study Conducted in Industry
 
Secure application programming in the presence of side channel attacks
Secure application programming in the presence of side channel attacksSecure application programming in the presence of side channel attacks
Secure application programming in the presence of side channel attacks
 
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
 
Explaining my Phd Thesis to layman
Explaining my Phd Thesis to laymanExplaining my Phd Thesis to layman
Explaining my Phd Thesis to layman
 
Automated testing of NASA Software - part 2
Automated testing of NASA Software - part 2Automated testing of NASA Software - part 2
Automated testing of NASA Software - part 2
 
Automated Testing of NASA Software
Automated Testing of NASA SoftwareAutomated Testing of NASA Software
Automated Testing of NASA Software
 
Reverse Engineering of Software Architecture
Reverse Engineering of Software ArchitectureReverse Engineering of Software Architecture
Reverse Engineering of Software Architecture
 
Automated Test Case Generation and Execution from Models
Automated Test Case Generation and Execution from ModelsAutomated Test Case Generation and Execution from Models
Automated Test Case Generation and Execution from Models
 

Semelhante a Testing of C software components using Models

Analysis of Testability of a Flight Software Product Line
Analysis of Testability of a Flight Software Product LineAnalysis of Testability of a Flight Software Product Line
Analysis of Testability of a Flight Software Product LineDharmalingam Ganesan
 
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 seleniumanandseelan
 
Testing artifacts test cases
Testing artifacts   test casesTesting artifacts   test cases
Testing artifacts test casesPetro Chernii
 
MingLiuResume2016
MingLiuResume2016MingLiuResume2016
MingLiuResume2016Ming Liu
 
Roots of scrum 2011_Jeff Sutherland氏
Roots of scrum 2011_Jeff Sutherland氏Roots of scrum 2011_Jeff Sutherland氏
Roots of scrum 2011_Jeff Sutherland氏InnovationSprint2011
 
Cansec West 2009
Cansec West 2009Cansec West 2009
Cansec West 2009abhicc285
 
Model-based Testing Principles
Model-based Testing PrinciplesModel-based Testing Principles
Model-based Testing PrinciplesHenry Muccini
 
Introduction to Software Testing
Introduction to Software TestingIntroduction to Software Testing
Introduction to Software TestingHenry Muccini
 
AF3 Interner Tag Offene Tueren
AF3 Interner Tag Offene TuerenAF3 Interner Tag Offene Tueren
AF3 Interner Tag Offene Tuerenaf_devel
 
Adam shiwa summerschool 2012
Adam shiwa summerschool 2012Adam shiwa summerschool 2012
Adam shiwa summerschool 2012aszbel
 
DSL, Gfast and Wireless Test Software: Test Sentinel
DSL, Gfast and Wireless Test Software: Test SentinelDSL, Gfast and Wireless Test Software: Test Sentinel
DSL, Gfast and Wireless Test Software: Test SentinelUNH InterOperability Lab
 
FMEA: The Good, The Bad, and The Ugly
FMEA: The Good, The Bad, and The UglyFMEA: The Good, The Bad, and The Ugly
FMEA: The Good, The Bad, and The UglyCheryl Tulkoff
 
Tccc10 tooling testingci-vs2010teamcity
Tccc10 tooling testingci-vs2010teamcityTccc10 tooling testingci-vs2010teamcity
Tccc10 tooling testingci-vs2010teamcityBaskin Tapkan
 
TAROT2013 Testing School - Gilles Perrouin presentation
TAROT2013 Testing School -  Gilles Perrouin presentationTAROT2013 Testing School -  Gilles Perrouin presentation
TAROT2013 Testing School - Gilles Perrouin presentationHenry Muccini
 
EMF-IncQuery presentation at TOOLS 2012
EMF-IncQuery presentation at TOOLS 2012EMF-IncQuery presentation at TOOLS 2012
EMF-IncQuery presentation at TOOLS 2012Istvan Rath
 
EclipseCon Eu 2015 - Breathe life into your Designer!
EclipseCon Eu 2015 - Breathe life into your Designer!EclipseCon Eu 2015 - Breathe life into your Designer!
EclipseCon Eu 2015 - Breathe life into your Designer!melbats
 
dlux splunk>live! 2012 Beginners Session
dlux splunk>live! 2012 Beginners Sessiondlux splunk>live! 2012 Beginners Session
dlux splunk>live! 2012 Beginners SessionDavid Lutz
 
Semantic (Social) Sensor Networks
Semantic (Social) Sensor NetworksSemantic (Social) Sensor Networks
Semantic (Social) Sensor NetworksOscar Corcho
 

Semelhante a Testing of C software components using Models (20)

Analysis of Testability of a Flight Software Product Line
Analysis of Testability of a Flight Software Product LineAnalysis of Testability of a Flight Software Product Line
Analysis of Testability of a Flight Software Product Line
 
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
 
Testing artifacts test cases
Testing artifacts   test casesTesting artifacts   test cases
Testing artifacts test cases
 
Dtrace Overview
Dtrace OverviewDtrace Overview
Dtrace Overview
 
MingLiuResume2016
MingLiuResume2016MingLiuResume2016
MingLiuResume2016
 
Roots of scrum 2011_Jeff Sutherland氏
Roots of scrum 2011_Jeff Sutherland氏Roots of scrum 2011_Jeff Sutherland氏
Roots of scrum 2011_Jeff Sutherland氏
 
Cansec West 2009
Cansec West 2009Cansec West 2009
Cansec West 2009
 
Model-based Testing Principles
Model-based Testing PrinciplesModel-based Testing Principles
Model-based Testing Principles
 
Introduction to Software Testing
Introduction to Software TestingIntroduction to Software Testing
Introduction to Software Testing
 
AF3 Interner Tag Offene Tueren
AF3 Interner Tag Offene TuerenAF3 Interner Tag Offene Tueren
AF3 Interner Tag Offene Tueren
 
Sylvain Bellemare Resume
Sylvain Bellemare ResumeSylvain Bellemare Resume
Sylvain Bellemare Resume
 
Adam shiwa summerschool 2012
Adam shiwa summerschool 2012Adam shiwa summerschool 2012
Adam shiwa summerschool 2012
 
DSL, Gfast and Wireless Test Software: Test Sentinel
DSL, Gfast and Wireless Test Software: Test SentinelDSL, Gfast and Wireless Test Software: Test Sentinel
DSL, Gfast and Wireless Test Software: Test Sentinel
 
FMEA: The Good, The Bad, and The Ugly
FMEA: The Good, The Bad, and The UglyFMEA: The Good, The Bad, and The Ugly
FMEA: The Good, The Bad, and The Ugly
 
Tccc10 tooling testingci-vs2010teamcity
Tccc10 tooling testingci-vs2010teamcityTccc10 tooling testingci-vs2010teamcity
Tccc10 tooling testingci-vs2010teamcity
 
TAROT2013 Testing School - Gilles Perrouin presentation
TAROT2013 Testing School -  Gilles Perrouin presentationTAROT2013 Testing School -  Gilles Perrouin presentation
TAROT2013 Testing School - Gilles Perrouin presentation
 
EMF-IncQuery presentation at TOOLS 2012
EMF-IncQuery presentation at TOOLS 2012EMF-IncQuery presentation at TOOLS 2012
EMF-IncQuery presentation at TOOLS 2012
 
EclipseCon Eu 2015 - Breathe life into your Designer!
EclipseCon Eu 2015 - Breathe life into your Designer!EclipseCon Eu 2015 - Breathe life into your Designer!
EclipseCon Eu 2015 - Breathe life into your Designer!
 
dlux splunk>live! 2012 Beginners Session
dlux splunk>live! 2012 Beginners Sessiondlux splunk>live! 2012 Beginners Session
dlux splunk>live! 2012 Beginners Session
 
Semantic (Social) Sensor Networks
Semantic (Social) Sensor NetworksSemantic (Social) Sensor Networks
Semantic (Social) Sensor Networks
 

Mais de Dharmalingam Ganesan

Reverse Architecting using Relation Algebra.pdf
Reverse Architecting using Relation Algebra.pdfReverse Architecting using Relation Algebra.pdf
Reverse Architecting using Relation Algebra.pdfDharmalingam 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 FunctionDharmalingam 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 eDharmalingam 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
 
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 KeysDharmalingam 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 AlgorithmsDharmalingam 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 dDharmalingam Ganesan
 
Dependency Analysis of RSA Private Variables
Dependency Analysis of RSA Private VariablesDependency Analysis of RSA Private Variables
Dependency Analysis of RSA Private VariablesDharmalingam Ganesan
 
Solutions to online rsa factoring challenges
Solutions to online rsa factoring challengesSolutions to online rsa factoring challenges
Solutions to online rsa factoring challengesDharmalingam Ganesan
 

Mais de 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
 

Último

WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 

Último (20)

WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 

Testing of C software components using Models

  • 1. Automated Test Generation for Flight Software (FSW) Dharmalingam Ganesan David McComas Mikael Lindvall Nicholas Yanchik Christoph Schulze Alan Cudmore Gunnar Cortes Steve Slegel Goddard  Space  Flight  Center   Code  582,  Flight  So>ware     Fraunhofer  Center  Maryland   Systems    Branch   ©  2011  Fraunhofer  USA,  Inc.    Center  for  Experimental  So>ware  Engineering  
  • 2. Problems with Current Testing •  Manual testing takes a lot of effort •  Manual testing could miss “corner-cases” •  Test cases difficult to maintain and reuse on multiple environments •  Tests are technical, typically not domain oriented –  and thus difficult to understand for non-technical stakeholders ©  2011  Fraunhofer  USA,  Inc.    Center  for  Experimental  So>ware  Engineering   2  
  • 3. Model based testing (MBT) •  Solution: Generate Test Cases using MBT! –  We incrementally model the behavior of the software to be tested •  Good and “Evil” usages •  Expected results are embedded in the model –  Based on the model, the test generator automatically generates test cases –  Any type of test cases can be generated •  Junit, Xunit, soapUI, Selenium, CuTest, etc. •  Extra benefits –  We have a very visual representation of the system –  Test cases are domain oriented and easier to understand for non- technical stakeholders –  Documentation of behavior ©  2011  Fraunhofer  USA,  Inc.    Center  for  Experimental  So>ware  Engineering   3  
  • 4. Hello World to MBT ©  2011  Fraunhofer  USA,  Inc.    Center  for  Experimental  So>ware  Engineering   4  
  • 5. Terminology   Nodes of the model are called states   Edges of the model are called transitions   Each test case is a path from the start state to the exit state   A random test is generated using a random walk from the start state to the exit state   A test suite is a collection of test cases ©  2011  Fraunhofer  USA,  Inc.    Center  for  Experimental  So>ware  Engineering   5  
  • 6. Architecture of MBT Model   List  of   abstract   acRons   ITestMonkey   List  of  abstract   input  data   provider   TestMonkeyImpl   ITestDataProvider   methods   Interface   System  Under  Test   TestDataProviderImpl    Model  is  agnosRc  to  the  test  execuRon  technology      ITestMonkey  interface  hides  the  test  execuRon  framework    TestMonkeyImpl  uses  interfaces  of  the  test  execuRon  framework   ©  2011  Fraunhofer  USA,  Inc.    Center  for  Experimental  So>ware  Engineering   6  
  • 7. Workflow ©  2011  Fraunhofer  USA,  Inc.    Center  for  Experimental  So>ware  Engineering   7  
  • 8. Flight Software Under Test •  Operating System Abstraction Layer (OSAL) •  Isolates flight software from operating systems and hardware •  Implementations for the real time systems RTEMS and VxWorks and posix compliant non-real time systems •  Used for mission critical embedded systems •  Provides support for file-system, tasks, queues, semaphores, interrupts, hardware abstraction, I/O ports and exception handling ©  2011  Fraunhofer  USA,  Inc.    Center  for  Experimental  So>ware  Engineering   8  
  • 9. NASA OSAL •  Why is it important that OSAL be bug free? –  Flight software is mission critical and needs to be of very high quality –  OSAL is the foundation of the core Flight Executive (cFE) –  OSAL is used in many NASA missions, e.g. the Lunar Renaissance Orbit –  If OSAL has issues, it might result in catastrophic failure ©  2011  Fraunhofer  USA,  Inc.    Center  for  Experimental  So>ware  Engineering   9  
  • 10. NASA OSAL – Architecture Flight  So>ware   ©  2011  Fraunhofer  USA,  Inc.    Center  for  Experimental  So>ware  Engineering   10  
  • 11. Applying MBT on OSAL •  Model captures OSAL’s expected behavior •  Test monkey has abstract instructions e.g. “CreateFileValid”, “CreateFileInvalid” •  We created and used a dynamic data provider •  Generates file and folder names •  Generates content for files ©  2011  Fraunhofer  USA,  Inc.    Center  for  Experimental  So>ware  Engineering   11  
  • 12. Applying MBT on OSAL ... •  OSAL‘s file system API‘s were modeled •  Several test cases in C were automatically generated •  We used the open source CuTest test execution framework ©  2011  Fraunhofer  USA,  Inc.    Center  for  Experimental  So>ware  Engineering   12  
  • 13. Example of a OSAL model ©  2011  Fraunhofer  USA,  Inc.    Center  for  Experimental  So>ware  Engineering   13  
  • 14. API spec of make directory /*-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐          Name:  OS_mkdir            Purpose:  makes  a  directory  specified  by  path.            Returns:  OS_FS_ERR_INVALID_POINTER  if  path  is  NULL                            OS_FS_ERR_PATH_TOO_LONG  if  the  path  is  too  long  to  be  stored  locally                            OS_FS_ERR_PATH_INVALID  if  path  cannot  be  parsed                            OS_FS_ERROR  if  the  OS  call  fails                            OS_FS_SUCCESS  if  success            Note:  The  access  parameter  is  currently  unused.   -­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐*/     int32  OS_mkdir  (const  char  *path,  uint32  access);     ©  2011  Fraunhofer  USA,  Inc.    Center  for  Experimental  So>ware  Engineering   14  
  • 15. Sub-model of make directory pointer  =  openDirectoryValid();   CuAssertTrue(tc,pointer  !=  NULL);   ©  2011  Fraunhofer  USA,  Inc.    Center  for  Experimental  So>ware  Engineering   15  
  • 16. Sample generated Test in CuTest void  Testosal_Filesystem_min_2(CuTest*  tc)    {              status  =  makeFilesystemValid();            CuAssertIntEquals_Msg(tc,"Filesystem  could  not  be  created",                                                                                              OS_FS_SUCCESS,  status);              status  =  mountFilesystemValid();            CuAssertIntEquals_Msg(tc,"Filesystem  could  not  be  mounted",                                                                                            OS_FS_SUCCESS,  status);                      pointer  =  openDirectoryValid();          CuAssertTrue(tc,  pointer  !=  NULL);          …          status  =  removeFilesystemValid();          CuAssertIntEquals_Msg(tc,"Filesystem  could  not  be  removed”,  status);   }   ©  2011  Fraunhofer  USA,  Inc.    Center  for  Experimental  So>ware  Engineering   16  
  • 17. Issues found using MBT •  OSAL  is  a  high-­‐quality  product  (only  a  few  issues  detected!)   •  Issues  found  when  running  model  based  tests  on  the  Posix  implementaRon   of  OSAL:   •  File-­‐descriptors  a>er  removing  file-­‐system:   •  A>er  somewhat  long  tests  we  would  run  out  of  file-­‐descriptors   •  This  would  even  happen  with  a  newly  created  file-­‐system   •  Cause:  OSAL  does  not  remove  file-­‐descriptors  when  the  file-­‐system  is  removed   •  Wrong  error  codes  returned  and  unimplemented  features:   Test  scenario   Error  message   Expected   Actual    Expected  'invalid   checkFileSystemNullName()   pointer'  error   OS_FS_ERR_INVALID_POINTER   OS_FS_UNIMPLEMENTED    Expected   checkFileSystemOsCallFails()   'filesystem'  error   OS_FS_ERROR   OS_FS_UNIMPLEMENTED    Filesystem  Not   checkFilesystemValid()   Checked   OS_FS_SUCCESS   OS_FS_UNIMPLEMENTED    Filesystem  error   OS_FS_ERR_NAME_TOO_ copyFileLongSourceFilename()   code  expected   OS_FS_ERROR   LONG    Filesystem  error   copyFileNonExisRngSourceFile()   code  expected   OS_FS_ERROR   OS_FS_SUCCESS    Filesystem  error   OS_FS_ERR_NAME_TOO_ renameFileLongSourceFilename()     code  expected   OS_FS_ERROR   LONG   ©  2011  Fraunhofer  USA,  Inc.    Center  for  Experimental  So>ware  Engineering   17  
  • 18. MBT – some limitations •  Modeling requires specification of SUT •  Developers are typically not used to modeling •  Difficult to document individual test cases –  Note: Models summarize all test cases –  Some customers require document of each test case ©  2011  Fraunhofer  USA,  Inc.    Center  for  Experimental  So>ware  Engineering   18  
  • 19. Summary and Future Work •  MBT works for API-based testing! •  Some detected issues are serious (e.g., running out of file descriptors) •  MBT requires manual work for –  constructing models –  monkey and data provider implementations –  maintenance of above artifacts •  However, test cases are automatically generated •  Future: –  Evaluating it on requirements of cFE/CFS –  ROI estimation ©  2011  Fraunhofer  USA,  Inc.    Center  for  Experimental  So>ware  Engineering   19  
  • 20. Acknowledgement •  Lisa Montgomery - NASA SARP for supporting our applied research •  Sally Godfrey – NASA GSFC •  Thank you! ©  2011  Fraunhofer  USA,  Inc.    Center  for  Experimental  So>ware  Engineering   20  
  • 21. Acronyms •  API: Application Program Interface •  cFE: Core Flight Executive •  CFR: Code of Federal Regulations •  CFS: Core Flight Software •  FSW: Flight Software •  MBT: Model-based Testing •  OSAL: Operating System Abstraction Layer •  ROI: Return on Investment •  SUT: System Under Test ©  2011  Fraunhofer  USA,  Inc.    Center  for  Experimental  So>ware  Engineering   21