Aerospace Testing InternationalAerospace Testing International
  • News
    • A-E
      • Acoustic & Vibration
      • Avionics
      • Data Acquisition
      • Defense
      • Drones & Air Taxis
      • Electric & Hybrid
      • EMC
      • Engine Testing
      • Environmental Testing
    • F-L
      • Fatigue Testing
      • Flight Testing
      • Helicopters & Rotorcraft
      • High Speed Imaging
      • Industry News
    • M-S
      • Materials Testing
      • NDT
      • Simulation & Training
      • Software
      • Space
      • Structural Testing
      • Supplier News
    • T-Z
      • Technology
      • Telemetry & Communications
      • Weapons Testing
      • Wind Tunnels
  • Features
  • Magazines
    • March 2025
    • Dec 2024/Jan 2025
    • Showcase 2025
    • September 2024
    • June 2024
    • Archive Issues
    • Subscribe Free!
  • Opinion
  • Webinars
  • Events
    • All Events
    • Aerospace Test & Development Show
  • Podcasts
  • Videos
  • Suppliers
    • Supplier Spotlights
    • Press Releases
    • Technical Papers
  • Jobs
    • Browse Jobs
    • Post a Job – It’s FREE!
    • Manage Jobs (Employers)
LinkedIn YouTube X (Twitter)
LinkedIn YouTube X (Twitter)
Subscribe to magazine Subscribe to email newsletter Media Pack
Aerospace Testing InternationalAerospace Testing International
  • News
      • Acoustic & Vibration
      • Avionics
      • Data Acquisition
      • Defense
      • Drones & Air Taxis
      • Electric & Hybrid
      • EMC
      • Engine Testing
      • Environmental Testing
      • Fatigue Testing
      • Flight Testing
      • Helicopters & Rotorcraft
      • High Speed Imaging
      • Industry News
      • Materials Testing
      • NDT
      • Simulation & Training
      • Software
      • Space
      • Structural Testing
      • Supplier News
      • Technology
      • Telemetry & Communications
      • Weapons Testing
      • Wind Tunnels
  • Features
  • Magazines
    1. March 2025
    2. Dec 2024/Jan 2025
    3. Showcase 2025
    4. September 2024
    5. June 2024
    6. March 2024
    7. Archive Issues
    8. Subscribe Free!
    Featured
    19th March 2025

    In this issue: March 2025

    Online Magazines By Ben Sampson
    Recent

    In this issue: March 2025

    19th March 2025
    contents and front cover of magazine

    In this issue: December / January 2025

    19th December 2024
    Showcase 2025

    In this issue – Showcase 2025

    6th November 2024
  • Opinion
  • Webinars
  • Events
    • All Events
    • Aerospace Test & Development Show
  • Podcasts
  • Videos
  • Suppliers
    • Supplier Spotlights
    • Press Releases
    • Technical Papers
  • Jobs
    • Browse Jobs
    • Post a Job – It’s FREE!
    • Manage Jobs (Employers)
LinkedIn YouTube X (Twitter)
Aerospace Testing InternationalAerospace Testing International
Opinion

How to automate software fault injection testing, without changing source code

Ben SampsonBy Ben Sampson21st August 20184 Mins Read
Share LinkedIn Twitter Facebook Email
Jasmine Williams

Jasmine Williams, QA Systems, technical content specialist

The use of fault injection as a robustness testing technique is mandated for safety critical avionics software by the DO 178B/C safety standard ‘Software Considerations in Airborne Systems & Equipment Certification’. The technique is already used manually in airborne systems, including those such as nose wheel steering, FADEC, surface controls, radar, navigation, communications, power control, landing gear, hydraulics, FBW controls and life support systems.

Fault injection is a powerful technique for robustness testing fault handling mechanisms. It is often used to achieve 100% structural coverage, because lines of code can be dynamically tested that would not otherwise be accessible without breaking connected hardware or exhaustive black-box testing.

 

Custom code injection

The 8.0 release of QA System’s Cantata test tool provides Custom Code Injection to automate this technique and to ensure that deactivated code is not accidentally enabled in production.

Custom Code Injection automates fault injection by allowing user code to be inserted at any point in the source code without the need to modify the deliverable application. This makes it easy to test conditions such as interrupt handlers and breaking out of infinite loops.

Cantata function call control methods such as stubbing or wrapping can be used to set or change parameters, variables, or even registers, at call boundaries. This can force code down hard to reach paths for testing functionality such as error handling. Custom Code Injection takes this one step further by allowing these to be set at any point in the source code during execution of a test

Automating fault injection avoids problems often encountered when manually modifying code for testing. Traditionally, faults are injected using conditional compilation to add code that is only compiled during testing. Unfortunately, manually adding code in this way introduces the risk that mistakes are made, or that abnormal system conditions can cause unintended execution of the code. These types of error can result in potentially catastrophic behavior in the final code.

 

Avoid deactivated code

DO-178B/C classifies this conditionally compiled code added as ‘deactivated code’ because it is present in the source code but is not intended to be executed in the final product. The standard specifies that a combination of analysis and testing should ensure that deactivated code is not inadvertently executed.

DO-178B/C also requires these processes to be documented. Automating code injection avoids the need to use and justify deactivated code for fault injection entirely. Where deactivated test code is left in the production code, this increases code complexity making it harder to verify the design and ensure safety objectives are achieved. As code complexity increases, maintenance and requirements traceability also become more complex, adding time and cost as the project progresses.

A practical example of automating error injection in avionics is testing a nose wheel steering control system. A fault is injected using custom code injection to simulate the failure of one of the control lines between the nose wheel control unit and the landing gear components. This should cause the system to inform the pilot of the failure and produce an ACARS alert.

Where the control line failure condition affects a read of data within a function, rather than at a function call boundary, this data would have to be set by manually modifying the function to inject the control line failure.

However, using a controlled process of code instrumentation during testing, data can be modified, or interrupts fired before or after any statement within a function. Custom code snippets for injection in specific tests are stored in a file separate to both the code under test, and the test driver script. This eliminates the risks inherent in test code being accidentally or deliberately left in the final version. It also means that the same code can be reused to inject faults for multiple tests at the click of a button.

 

Share. Twitter LinkedIn Facebook Email
Previous ArticleBrazilian cargo drone achieves testing milestone
Next Article Gulfstream G600 begins FAA certification field performance testing
Ben Sampson

Ben has worked as a journalist and editor, covering technology, engineering and industry for the last 20 years. Initially writing about subjects from nuclear submarines to autonomous cars to future design and manufacturing technologies, he was editor of a leading UK-based engineering magazine before becoming editor of Aerospace Testing in 2017.

Related Posts

Materials Testing

Giving green thrusters a boost

15th April 20256 Mins Read
Gerard Van Es, Principal Advisor of Flight Safety and Operations at NLR
Opinion

Academic Insight: Testing to help stop runway overruns

1st April 20254 Mins Read
NDT

Q&A: Daniel Richard, Solutions Development Expert, Eddyfi Technologies

3rd March 202514 Mins Read
Latest Posts

AIR cargo eVTOL completes night flight testing

22nd May 2025

Astrolight raises €2.8m to build optical space communications network

22nd May 2025

Industry Adoption of 3D Optical Surface Gauges

21st May 2025
Supplier Spotlights
Our Social Channels
  • Twitter
  • YouTube
  • LinkedIn
Getting in Touch
  • Subscribe To Magazine
  • Contact Us
  • Meet the Team
  • Media Pack
Related Topics
  • Aircraft Interiors
  • Business Jet Interiors
FREE WEEKLY NEWS EMAIL!

Get the 'best of the week' from this website direct to your inbox every Wednesday

© 2023 Mark Allen Group Ltd | All Rights Reserved
  • Cookie Policy
  • Privacy Policy
  • Terms & Conditions

Type above and press Enter to search. Press Esc to cancel.