This topic lists typical issues you may experience when testing Visual C++ applications with TestComplete and possible solutions to these issues.
TestComplete cannot get access to the application’s internal members.
Reading an application’s debug information takes a lot of time.
A Visual C++ application compiled for earlier version of TestComplete works incorrectly.
TestComplete cannot get access to the application’s internal members.
If TestComplete cannot access the internals of the Visual C++ application under test, follow the steps below:
- Check whether Debug Info Agent™ is enabled.
TestComplete uses the Debug Info Agent™ technology to access the internals of Visual C++ applications. You can check whether Debug Info Agent™ is enabled on the Project Properties - Debug Agent Options or Default Project Properties - Debug Agent Options page.
- Check whether the tested application is compiled with debug information and whether generation of runtime type information (RTTI) is enabled.
In order to get access to your application’s internals, you should compile the application in a special way:
- In order to access public, protected and private properties and methods of your Visual C++ application from your tests, you must compile your application with debug information.
- In order to access public members of MFC classes, you must enable generation of runtime type information.
For a detailed description of how to configure your compiler, see the topics of the Preparing Visual C++ Applications for Testing section.
-
Check whether the "Read debug information for statically linked libraries" project option is enabled
Visual C++ applications can be compiled in two ways: MFC classes can be compiled into your application, or they may reside in separate DLLs which your application loads when starting (the latter approach is often referred to as “MFC in statically linked libraries”). If your application was compiled to use MFC in statically linked libraries, then, by default, Debug Info Agent™ does not read debug information for MFC classes. This happens because the Read debug information for statically linked libraries setting of your test project is disabled.
To solve the problem, enable the Read debug information for statically linked libraries setting on the Open Applications | Debug Agent page of the project properties. If this setting is enabled, Debug Info Agent™ reads debug information for third-party libraries loaded by the executable.
Note that Debug Info Agent™ does not read debug information from dynamically linked libraries.
Reading an application’s debug information takes a lot of time.
The delay occurs when Debug Info Agent™ is reading debug information for the first time. The amount of time taken by the Agent to read the debug information depends on the size of the debug information. Large applications have a lot of debug info, and reading it can significantly slow down the script execution. If you do not use protected and private methods and fields in your tests, in order to speed up the test execution, disable Debug Info Agent™ or compile your application without debug information.
A Visual C++ application compiled for earlier version of TestComplete works incorrectly.
Visual C++ applications that were compiled for earlier versions of TestComplete may function incorrectly in TestComplete 14. In earlier versions of TestComplete, to be able to get access to a Visual C++ application’s internals, you had to recompile the application with the helper TCClient.cpp file supplied with TestComplete. In TestComplete 14, this file is no longer used.
To resolve this issue, remove the TCClient.cpp file from your Visual C++ project and rebuild it. See also Migrating Projects Created in Earlier Versions to TestComplete 14.
See Also
Preparing Visual C++ Applications for Testing
Recording Tests
Recording Options Dialog
Recording Specifics