Debugging the proxy code
Debugging the proxy code is an essential part of the proxy development process for problem determination. The proxy code containing the JAR file or .Net assembly file with the .dll extension is loaded into the application under test (AUT) process. To debug the proxy code, attach the respective debugger to the AUT process after the proxy binary files are loaded into the AUT.
- Implementing logs for proxy code debug
Functional Tester provides a log infrastructure that you can use while debugging the developed proxy code. The FTDebug class is available in both Java and .Net proxy development frameworks. You can instantiate an object of the FTDebug class for each proxy class and log any information, warning, or error message categorically.
Create a proxy class
Add more control properties
Add more data types for a control
Enhancing the recording behavior
Enhancing the recording behavior with SubItems
Extending data driving
Change the role of a control
Modifying the recognition properties and weight of a control
Change the mappability of a control
Mapping proxies to controls
Deploy a proxy
Prepare the debug environment
About this taskBefore you debug the proxy code, perform the following tasks:
- Save the debug version of the proxy binary files in the customization directory and restart Functional Tester.
- In case of Java, enable the JRE that the AUT uses with the Functional Tester enabler.
- In case of .Net, start the .Net AUT and record a click on any control using Functional Tester to enable it for testing.
The proxy assembly .dll file is loaded only when the first click is recorded on Windows and .Net applications. Windows and .Net applications are enabled dynamically for testing. In case of Java, the Application Configurator Tool enables the AUT.
Setting invocation timeout
Debugging proxies is time sensitive and the invocation times out after two minutes by default. To adjust timeout for debugging, add a DWORD value InvocationTimeout in milliseconds under HKEY_LOCAL_MACHINE\SOFTWARE\Rational Software\RationalTest\8\Options in the Windows registry. A timeout during debugging throws a SpyMemory MutexTimeout exception.
The getChildAtPoint() method is the entry point for proxy debugging for record. Any user action calls the processMouseEvent() method, even before AUT sees the event. Functional Tester processes the user actions, for example whether the action is a click or drag and accordingly the method specification and arguments are generated. For best results, use these methods to start inserting breakpoints.
The getMappableChildren() method is the entry point for proxy debugging for playback. During proxy development, most ObjectNotFound problems that occur result from a mismatch between the object hierarchy that the record produces and the hierarchy produced during playback. Make sure that the getMappableParent() and getMappableChildren() methods are symmetrical.