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
    • June 2025
    • March 2025
    • Dec 2024/Jan 2025
    • Showcase 2025
    • September 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. June 2025
    2. March 2025
    3. Dec 2024/Jan 2025
    4. Showcase 2025
    5. September 2024
    6. June 2024
    7. Archive Issues
    8. Subscribe Free!
    Featured
    11th June 2025

    In this issue: June 2025

    Online Magazines By Ben Sampson
    Recent

    In this issue: June 2025

    11th June 2025

    In this issue: March 2025

    19th March 2025
    contents and front cover of magazine

    In this issue: December / January 2025

    19th December 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

Prof. Dr. Nicolas Noiray Associate Professor at the Department of Mechanical and Process Engineering Deputy head of Inst. Energy and Process Engineering
Engine Testing

Academic Insight: Fixing the thermoacoustic instabilities of hydrogen combustion

3rd June 20253 Mins Read
Opinion

Golden Dome: An explanation of the proposed US missile defense system

28th May 20257 Mins Read
Materials Testing

Giving green thrusters a boost

15th April 20256 Mins Read
Latest Posts

In this issue: June 2025

11th June 2025
Gray Saab Gripen E fighter aircraft in flight against cloudy sky background with visible afterburner

Saab achieves AI milestone with Gripen E fighter jet

11th June 2025
Large blue industrial testing frame with green monitoring display screens in aerospace structural testing laboratory

SwRI wins US$250m deal to sustain aging US military aircraft

10th June 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.