Stubs are not automatically generated
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
-
C++test can auto generate complete stubs for functions where it can determine the return type• 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.
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
0