Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Stubs are not automatically generated

Options
LegacyForum
LegacyForum Posts: 1,664 ✭✭
• Our default testing approach is to stub everything; we will only use implemented functions for white box testing
for a few utility functions.
• Our program has over 2000 functions that must be stubbed.
• Creating a stub is a straightforward, albeit tedious, activity and should not be done manually.
• The "stub generator" that is included with C++ test does not add any value (i.e., only produces a commented file).
• The return value from stubs are important "preconditions" that should be visible in the test case code.
• This is very important for our program because accessor functions are for all references to class member
variables.
• The Paraosft C++stub generator should allow us to register the stub and the return value in the test case
preconditions section.
• Parasoft C++ Test should include this type of stub generator as part of their tools.

Comments

  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Options

    • Our default testing approach is to stub everything; we will only use implemented functions for white box testing
    for a few utility functions.
    • Our program has over 2000 functions that must be stubbed.
    • Creating a stub is a straightforward, albeit tedious, activity and should not be done manually.
    • The "stub generator" that is included with C++ test does not add any value (i.e., only produces a commented file).
    • The return value from stubs are important "preconditions" that should be visible in the test case code.
    • This is very important for our program because accessor functions are for all references to class member
    variables.
    • The Paraosft C++stub generator should allow us to register the stub and the return value in the test case
    preconditions section.
    • Parasoft C++ Test should include this type of stub generator as part of their tools.

    C++test can auto generate complete stubs for functions where it can determine the return type
    If C++test can not determine the return type, it will create a template for the stub and the user is required to provide the body and return for the stub
    Improvements have been made recently on the auto generation of complete stubs
    In the next few days, I will be generating a QuickStart that explains the stubbing process in detail
    This may address the request to register the stub return from the calling unit test
    Will attach to this thread when available