Featured Webinar: AI-Enhanced API Testing: A No-Code Approach to Testing | Watch Now

ISO 26262 Software Compliance in the Automotive Industry

Regression Testing

As part of most C and C++ software development processes, regression testing is done after changes are made to the software. These tests determine if the new changes impact the existing operation of the software.

Regression tests are necessary, but they only indicate that recent code changes have not caused tests to fail. There’s no assurance that these changes will work. In addition, the nature of the changes that motivate the need to do regression testing can go beyond the current application and include changes in hardware, operating system, and operating environment.

Regression Testing in Safety Critical Software

In safety-critical C and C++ software development, validation is critical in proving correct functionality, safety, and security. Tests are needed to confirm any changes to the application to ensure functionality and to verify there are no unforeseen impacts on the rest of the system.

If a test case that previously passed now fails, a potential regression has been identified. New functionality could be the cause of the failure. If so, the test case may need to be updated with consideration to those changes in input and output values.

Regression testing of embedded systems also includes the execution of:

  • Integration test cases
  • System test cases
  • Performance test cases
  • Stress test cases and more

All previously created test cases may need to be executed to ensure that no regressions exist and that a new dependable software version release is constructed. This is critical because each new software system or subsystem release is built or developed upon. If you do not have a solid foundation the whole thing can collapse.

Parasoft DTP supports the creation of regression testing baselines as an organized collection of tests and will automatically verify all outcomes. These tests run automatically regularly to verify whether code modifications change or break the functionality captured in the regression tests.

If any changes are introduced, these test cases will fail to alert the team to the problem. During subsequent tests, DTP will report tasks if it detects changes to the behavior captured in the initial test.

How to Decide What to Regression Test?

The key challenge with regression testing is determining what parts of an application to test. It is common to default to executing all regression tests when there’s doubt on what impacts recent code changes have had—the all-or-nothing approach.

For large C and C++ software projects, this becomes a huge undertaking and drags down the productivity of the team. This inability to focus testing hinders much of the benefits of iterative and continuous processes, potentially exacerbated in embedded software where test targets are a limited resource.

A couple of tasks are required here.

  • Identify which tests need to be re-executed.
  • Focus the testing efforts (unit testing, automated functional testing, and manual testing) on validating the features and related code that are impacted by the most recent changes.

Understand the Impact of Code Changes on Testing With Test Impact Analysis

Developers and testers can get a clear understanding of the changes in the codebase between builds using the Process Intelligence Engine (PIE) within Parasoft DTP combined with our proprietary coverage analysis engines:

For Java

Parasoft Jtest icon

Jtest

For C# and VB.NET

Parasoft dotTEST icon

dotTEST

With these combinations, teams can improve efficiency and achieve the promise of Agile.

This form of smart test execution is called test impact analysis. It’s sometimes referred to as change-based testing.

Test impact analysis uses data collected during test runs and changes in code between builds to determine which files have changed and which specific tests touched those files. Parasoft’s analysis engine can analyze the delta between two builds and identify the subset of regression tests that need to be executed. It also understands the dependencies on the modified units to determine the ripple effect the changes have on other units.

Parasoft’s Jtest for Java testing and dotTEST for C# and VB.NET software testing solutions provide insight into the impact of software changes. Each solution recommends where to add tests and where further regression testing is needed. See the example change based testing report below.

A screenshot show a change based testing report from Parasoft DTP showing tested and not tested areas of the code.
An example Change Based Testing report from Parasoft DTP shows tested and not tested areas of the code.
Dark blue banner with image of man talking to woman holding a tablet in hand in a server room.
Image of man and woman with tablet in hand having a discussion in a server room.

Elevate your software testing with Parasoft solutions.