• Support
  • Contact
  • Blog
  • English
    • Français
    • Deutsch
    • Italiano
    • Português
    • Español
    • 简体中文
  • Tools
    • Static Analysis
      • QA-MISRA
        In-depth analysis for industrial scale C/C++ code
      • Cantata Test Architect
        Understand, define and control software architecture
      • Source Code Metrics
        Automated source code metrics for C/C++
      • Get a demo
    • Software Testing
      • Cantata
        Automated unit and integration testing for C/C++ code
      • Cantata Team Reporting
        Test status management dashboard add-on
      • AdaTEST 95
        Automated unit and integration testing for Ada code
      • Why Pay for Unit Test Tool?
  • Solutions
    • Sectors
      • Automotive
      • Energy
      • Medical Devices
      • Industrial Automation
      • Railways
      • Aerospace/Defence
      • Business Critical
      • E
      • E
      • Get a demo
    • Safety Standards
      • ISO 26262
      • IEC 60880
      • IEC 62304
      • IEC 61508
      • EN 50128 / 50657
      • DO-178C
      • MISRA
      • AUTOSAR
      • CERT
      • Why bother to unit test?
  • Academy
    • Seminars
    • Trainings
    • Webinars
    • Speakers
    • Program 2022
  • Company
    • About Us
    • Management Team
    • Partners
    • Newsletters & Press Releases
    • Events
    • Careers
    • Get a demo
  • Resources
  • Porsche
  • English
    • French
    • German
    • Italian
    • Portuguese (Portugal)
    • Spanish
    • Chinese (Simplified)
  • Tools
    • Static Analysis
      • QA-MISRA
      • Cantata Test Architect
      • Source Code Metrics
    • Software Testing
      • Cantata
      • Cantata Team Reporting
      • Adatest 95
  • Solutions
    • Sectors
      • Automotive
      • Energy
      • Medical Devices
      • Industrial Automation
      • Railways
      • Aerospace/Defence
      • Business Critical
    • Safety Standards
      • ISO 26262
      • IEC 60880
      • IEC 62304
      • IEC 61508
      • EN 50128/50657
      • DO 178
      • Automated Compliance with the MISRA guidelines for safety critical C/C++ code
      • Automated Compliance with the AUTOSAR guidelines for safety critical C/C++ code
      • Automated Compliance with the CERT C/C++ coding standards for safety critical C/C++ code
  • Academy
    • Seminars
    • Trainings
    • Webinars
    • Speakers
  • Company
    • About Us
    • Management Team
    • Partners
    • Newsletters & Press Releases
    • Events
    • Careers
  • Resources
  • Contact
  • Blog
UCC
UNIQUE CALL CONTROL

Automatically intercept or simulate function calls
for complete control

START TRIAL
UCC
UNIQUE CALL CONTROL

Automatically intercept or simulate function calls
for complete control

START TRIAL
QA Systems > Software testing tools for embedded software in C/C++ > Cantata > Unique Call Control

Testing what happens when function calls from the Software Under Test (SUT) are made, is integral to all levels of dynamic testing. Cantata call interface control automatically generates the necessary test framework for these interfaces, making it easy to:

  • Simulate the call interface between the SUT and called objects (whether included in the build or not)
  • Intercept the call interface between the SUT and called objects included in the build
  • Set and check data (accessible to the SUT) when function calls occur
  • Set and check return values back to the SUT or raise exceptions
  • Inject errors to the SUT
  • Check the order of calls made
  • Control each instance of a function call – so that different behaviour can be set/checked for each occurrence

Automatic Wrapping to intercept (not just simulate) calls is unique to Cantata, providing unparalleled call control for both unit isolation and integration testing.

What is Cantata Call Control?

Cantata call interface controls are automatically generated for all function calls made by the Software Under Test (SUT) e.g. to other functions in the same or other files, 3rd party object code, operating system / compiler library, or target firmware / hardware. Users have complete control over the appropriate style of Cantata call control to be generated for each call made from each function:

  • Stubs to simulate calls to objects not included in the build
  • Isolates to simulate specific calls to objects included in the build.
  • Wrappers to simulate or intercept specific calls to objects included in the build.
  • Dependency Resolver to automatically remove undefined link references

Each type of Cantata call control is written in C/C++ as appropriate, giving a test control point in the execution flow to set and check data available to the SUT (e.g. global data or hardware registers) and parameters/returns. As each control type can also have multiple instances, different behavior and call order can be set or verified each time a call is made in each test case scenario.

Isolation of C++ for testing from the remainder of the code base, can result in a lengthy daisy-chain effect of undefined references at link time when building test executables. Cantata Dependency Resolver determines the missing references and automatically adds the code required to resolve all the undefined references (methods or variables).

The various Cantata call controls give testers the flexibility to choose simulation or interception as needed to drive and verify the code.

What is Cantata Wrapping?

Wrapping is a unique automatic accessibility instrumentation that intercepts or simulates function calls. It goes far beyond traditional simulations (e.g. stubs, mocks, fakes etc), providing more flexibility for testing interfaces when objects are integrated together.

Automatically generated Wrappers intercept calls before the call (BEFORE Wrappers), after the call (AFTER Wrappers), or can replace the original call with a simulation (REPLACE Wrappers).

Where a Cantata test script is used, BEFORE, AFTER and REPLACE sections of the Wrapper are written to the test script. Wrapping can also be used outside a Cantata test script to provide call interface control with other test drivers.

“Very useful, especially for checking the messages sent from one process to another, and also for simulating responses from external processes to the process under test.”

Dave Parker, Software Engineer, Marconi Communications

“Without this [Cantata wrapping], difficult external conditions not directly influenced by our code, such as memory allocation errors, may have been difficult to simulate.”

Simon Prior, Primary Reactor Protection System project, OSyS.

“Very useful, especially for checking the messages sent from one process to another, and also for simulating responses from external processes to the process under test.”

Simon Prior, Primary Reactor Protection System project, OSyS.

What does Wrapping help me do?

INTERCEPT & SIMULATE CALLS AT UNIT TEST

Unit testing verifies one or more functions without the rest of the system. Traditional call controls (e.g. stubs, mocks, fakes dummies) only simulate called objects excluded from the compiled software unit under test.

Cantata Wrapping enables control over specific function calls both inside and outside that compilation boundary. Specific calls to functions can be controlled with:

  • Simulate Wrapper to replace the call
  • Intercept Wrapper to set / check the interface before and after the call

Each Wrapper also allows setting/checking of all accessible data when the calls are made.

Wrapping uniquely gives automated control inside the compilation boundary (e.g. functions calling other functions in the same file or class), and also greater tester choice in defining what is included in the unit testing boundary for isolation or cluster unit testing.

INTERCEPT & SIMULATE CALLS AT INTEGRATION & SYSTEM TEST

Integration & systems testing verifies the actual interaction between multiple units, so the more units are integrated, the less useful replacing those units with simulations becomes. Cantata Wrapping at integration & system testing retains all the benefits of Wrapping at unit testing, but it becomes even more useful to simulate or intercept specific calls when testing the actual interactions.

Cantata Wrapping interceptions are available for any C/C++ function call made from anywhere within the software under test to:

  • Other software components in the build
  • External software (including 3rd party or object code)
  • Operating system or standard library functions
  • Firmware or hardware

Cantata Wrapping interceptions allow the tester to check actual interface behavior, rather than use test scenarios based on assumptions in a simulation. Interception of calls provides unparalleled capability inject errors and verify actual behavior of actual interactions (e.g. failures with operating systems, 3rd party code, firmware and hardware) which are otherwise impossible or too expensive to test.

How does Wrapping work?

Cantata Wrapping uses accessibility instrumentation (via the GUI or CLI) on a copy of the source code to intercept function calls from the Software Under Test (SUT).

Anything called by a C/C++ function call can be Wrapped (e.g. another function, a 3rd party object, a database etc). A Wrapper has an identical function prototype to the called object being replaced, but testability instrumentation allows the called object to be included in the test build without causing linker errors.

The BEFORE, REPLACE and AFTER Wrapper sections insert programmable additional C/C++ functions, which then call: another Wrapper section, the called object or pass back to the SUT. Each Wrapper section contains Cantata directives to record call order, modify or check parameters / exceptions and all data accessible to the SUT or called object, and returns.

EDITING CANTATA CONTROLLED CALLS

Cantata automatically generates each Wrapper (containing BEFORE, AFTER and REPLACE sections) into the test script with a default BEFORE-AFTER pairing instance. This means that called objects can be Wrapped without forcing the tester to specify the return value.

Additional Wrapper instances (in either Before-After or Before-Replace pairings) may be added to check all parameter values passed to and from the called object. When additional instances are added, Cantata automatically offers checks of actual against expected values for all the parameters passed over the interface.

A function call to an object, can have all calls Wrapped or just selected calling functions.

Wrappers are implemented as C/C++ into a Cantata test script, and can be edited in the Cantata GUI, or directly using any C/C++ editor.

CONTROLLING CALLS IN TEST CASES

Cantata call interface controls can use multiple instances stubs, Wrappers or isolates to provide different behaviors on different occasions the call is made. These controlled calls and instances are used in a Cantata test script to set the expected order of calls and controlled behavior for each test case.

Expected Call Sequences are very flexible (linear, fixed size loops, parallel etc.), and can be set for specific orders or any time matches for each controlled call. The order of expected calls in each test case can be edited in the Cantata GUI (test script manager) or directly in any C/C++ editor.

More information about Wrapping

For further information about Wrapping please see our Wrapping feature brief:

Wrapping – Cantata Feature Brief

START TRIAL
GET A DEMO
BACK TO CANTATA

QA Systems GmbH
Roggenstrasse 11
71334 Waiblingen | Germany

© 2022 QA SYSTEMS GMBH

The product names Cantata and QA-MISRA are registered trademarks of QA Systems GmbH.

“MISRA” and “MISRA C” are registered trademarks owned by MISRA Consortium Limited.
QA-MISRA is an independent tool of QA Systems and is not associated with the MISRA Consortium Limited.

Phone: +49 (0)711 138183 -0
Fax: +49 (0)711 138183 -10
E-Mail: [email protected]

  • Imprint
  • Privacy Policy
  • Contact
  • Resources

Newsletter

Get the latest technology news updates, product releases plus tips and tricks:

subscribe to newsletter
  • Follow
  • Follow

Newsletter

Get the latest technology news updates, product releases plus tips and tricks:

subscribe to newsletter
  • Follow
  • Follow

Phone: +49 (0)711 138183 -0
Fax: +49 (0)711 138183 -10
[email protected]

  • Imprint
  • Privacy Policy
  • Contact
  • Resources

QA Systems GmbH
Roggenstrasse 11
71334 Waiblingen Stuttgart | Germany

© 2021 QA SYSTEMS GMBH

Start
Trial
×

Login

Forgot your password?

Or

 

Create an Account

Sign up for access to premium content
Register for full access to our extensive resources library.
  • This field is for validation purposes and should be left unchanged.

×

Unique Call Control

Academy Registration Form

  • Contact details attendee

  • QA Systems arranges a block booking of rooms for seminar participants at the respective hotels, usually with special rates. The participants are responsible for their own reservation, payment, etc. If you wish to receive the hotel information, please tick:
  • This field is for validation purposes and should be left unchanged.

This site uses cookies to help improve your experience

Please follow this link to find out more about cookies.
Accept
Change Settings
Cookie Box Settings
Cookie Box Settings

Privacy settings

Decide which cookies you want to allow. You can change these settings at any time. However, this can result in some functions no longer being available. For information on deleting the cookies, please consult your browser’s help function. Learn more about the cookies we use.

With the slider, you can enable or disable different types of cookies:

  • Block all
  • Essential
  • Functionality
  • Analytics
  • Advertising

This website will:

  • Essential: Remember your cookie permission setting
  • Essential: Allow session cookies
  • Essential: Gather information you input into a contact forms, newsletter and other forms across all pages
  • Essential: Keep track of what you input in a shopping cart
  • Essential: Authenticate that you are logged into your user account
  • Essential: Remember language version you selected

This website won't:

  • Remember your login details
  • Functionality: Remember social media settings
  • Functionality: Remember selected region and country
  • Analytics: Keep track of your visited pages and interaction taken
  • Analytics: Keep track about your location and region based on your IP number
  • Analytics: Keep track of the time spent on each page
  • Analytics: Increase the data quality of the statistics functions
  • Advertising: Tailor information and advertising to your interests based on e.g. the content you have visited before. (Currently we do not use targeting or targeting cookies.
  • Advertising: Gather personally identifiable information such as name and location

This website will:

  • Essential: Remember your cookie permission setting
  • Essential: Allow session cookies
  • Essential: Gather information you input into a contact forms, newsletter and other forms across all pages
  • Essential: Keep track of what you input in a shopping cart
  • Essential: Authenticate that you are logged into your user account
  • Essential: Remember language version you selected
  • Functionality: Remember social media settings
  • Functionality: Remember selected region and country

This website won't:

  • Remember your login details
  • Analytics: Keep track of your visited pages and interaction taken
  • Analytics: Keep track about your location and region based on your IP number
  • Analytics: Keep track of the time spent on each page
  • Analytics: Increase the data quality of the statistics functions
  • Advertising: Tailor information and advertising to your interests based on e.g. the content you have visited before. (Currently we do not use targeting or targeting cookies.
  • Advertising: Gather personally identifiable information such as name and location

This website will:

  • Essential: Remember your cookie permission setting
  • Essential: Allow session cookies
  • Essential: Gather information you input into a contact forms, newsletter and other forms across all pages
  • Essential: Keep track of what you input in a shopping cart
  • Essential: Authenticate that you are logged into your user account
  • Essential: Remember language version you selected
  • Functionality: Remember social media settingsl Functionality: Remember selected region and country
  • Analytics: Keep track of your visited pages and interaction taken
  • Analytics: Keep track about your location and region based on your IP number
  • Analytics: Keep track of the time spent on each page
  • Analytics: Increase the data quality of the statistics functions

This website won't:

  • Remember your login details
  • Advertising: Use information for tailored advertising with third parties
  • Advertising: Allow you to connect to social sites
  • Advertising: Identify device you are using
  • Advertising: Gather personally identifiable information such as name and location

This website will:

  • Essential: Remember your cookie permission setting
  • Essential: Allow session cookies
  • Essential: Gather information you input into a contact forms, newsletter and other forms across all pages
  • Essential: Keep track of what you input in a shopping cart
  • Essential: Authenticate that you are logged into your user account
  • Essential: Remember language version you selected
  • Functionality: Remember social media settingsl Functionality: Remember selected region and country
  • Analytics: Keep track of your visited pages and interaction taken
  • Analytics: Keep track about your location and region based on your IP number
  • Analytics: Keep track of the time spent on each page
  • Analytics: Increase the data quality of the statistics functions
  • Advertising: Use information for tailored advertising with third parties
  • Advertising: Allow you to connect to social sitesl Advertising: Identify device you are using
  • Advertising: Gather personally identifiable information such as name and location

This website won't:

  • Remember your login details
Save & Close