Foreword . . . xi
Preface . . . xiii
Acknowledgments . . . xix
About the Authors . . . xxi
Chapter 1 Overview of Rational Functional Tester . . . 1
Architecture of Rational Functional Tester . . . 1
Installation and Licensing . . . 4
Enabling the Environment for Testing . . . 8
Configuring Applications for Testing . . . 11
Configuring Object Recognition Properties . . . 12
Recording a First Script . . . 12
Playing Back a Script and Viewing Results . . . 20
Script Editing and Augmentation . . . 22
ScriptAssure . . . 37
Playback Settings . . . 49
Chapter 2 Storyboard Testing . . . 54
Overview of Storyboard Testing . . . 54
Similarities and Differences to Chapter 1 . . . 55
Enabling Storyboard Testing . . . 56
Recording a First Script . . . 57
Playing Back a Script and Viewing Results . . . 72
Script Editing and Augmentation . . . 77
Setting Preferences for Storyboard Testing . . . 83
Chapter 3 General Script Enhancements . . . 85
Test Script Synchronization . . . 85
Placing a Generic Delay in Your Script . . . 86
Waiting for Test Objects to Come into Existence . . . 88
Timing How Long Something Takes to Execute in a Script . . . 93
Working with Test Objects . . . 98
Working with the Clipboard Object . . . 98
Viewing an Object's Properties . . . 105
Retrieving All Properties of a Test Object . . . 110
Retrieving the Value of a Single Property . . . 112
Programmatically Retrieving Data from an Object in My Application . . . 113
Determining a Test Object's Valid Test Data Type Arguments to getTestData(). . . 116
Using getTestData to Extract Data from a Text Field . . . 117
Using getTestData to Extract Data from a List . . . 118
Using getTestData() to Read Data in a Table . . . 121
Using getTestData() to Extract Data from a Tree . . . 126
Obtaining Data from a Test Object That the Rational Functional Tester Verification Point Wizard Does Not Capture . . . 130
Creating a Custom Verification Point . . . 131
Changing the Value of a Test Object's Property . . . 135
Evolving Custom Scripting into Reusable Methods . . . 136
Chapter 4 XML and Rational Functional Tester . . . 144
Handling XML in Rational Functional Tester . . . 144
Using the XML DOM with Rational Functional Tester . . . 146
Processing XML with SAX in Rational Functional Tester . . . 167
Chapter 5 Managing Script Data . . . 176
Accessing Rational Functional Tester Datapools . . . 176
Database Access from Java and .NET . . . 184
Handling User-Specific Runtime Variables . . . 197
Chapter 6 Debugging Scripts . . . 207
Common Debugging Concepts . . . 207
Debugging in Eclipse . . . 210
Debugging in Visual Studio . . . 216
Chapter 7 Managing Script Execution . . . 221
Setting Execution Options Within Your Scripts . . . 221
Manipulating Playback Options Within Scripts . . . 222
Flow Control . . . 224
Returning Values from My Scripts . . . 263
Developing Regression Scripts . . . 267
Executing a Functional Tester Script from the Command Line . . . 281
Scheduling Script Execution . . . 288
Executing a Functional Tester Script from a Plain Java Class . . . 288
Chapter 8 Handling Unsupported Domain Objects . . . 290
Rational Functional Tester and Unsupported Objects . . . 290
Using Rational Functional Tester with Unsupported Objects . . . 291
Unsupported Objects on Windows and Linux . . . 300
Chapter 9 Advanced Rational Functional Tester Object Map Topics . . . 301
Rational Functional Tester Object Map . . . 301
Rational Functional Tester Object Recognition Framework . . . 307
Customizing Recognition Properties and Weights . . . 318
Renaming Test Objects (ScriptHelper Methods) . . . 320
Searching the Object Map . . . 322
Sharing Test Objects Between Multiple Scripts . . . 326
Chapter 10 Advanced Scripting with Rational Functional Tester TestObjects . . . 330
Mapped TestObjects and Unmapped TestObjects . . . 331
Unregistering TestObjects . . . 331
Finding Objects Dynamically . . . 332
Handling Third-Party Controls . . . 342
How Many Different Ways Are There to Capture Data from a Control in Rational Functional Tester? . . . 359
Chapter 11 Testing Specialized Applications . . . 362
Why Rational Functional Tester Won't Test Every Application . . . 362
Extension for Terminal-Based Applications . . . 363
Recording the Test Script . . . 365
SAP . . . 368
Siebel . . . 379
Recording the Test Script (Siebel) . . . 382
Adobe Flex . . . 384
Recording the Test Script (Flex) . . . 391
Chapter 12 Extending Rational Functional Tester with External Libraries . . . 396
Testing PDF Files . . . 396
Writing to a Custom Log File with Log4j and Log4net . . . 419
Interfacing with COM Scriptable Components . . . 449
Chapter 13 Building Support for New Objects with the Proxy SDK . . . 477
Figuring Out Which Proxy to Extend . . . 478
Creating a Proxy Project . . . 483
Adding Object Recognition . . . 490
Verifying Object Properties . . . 497
Verifying Object Data . . . 505
Executing a Click Using Object Information . . . 514
Building the Proxy . . . 523
Mapping the Proxy . . . 528
Taking an Easier Path . . . 533
Debugging a Proxy . . . 539
Chapter 14 Developing Scripts in the VB.NET Environment . . . 543
Installing Rational Functional Tester into Visual Studio .NET . . . 543
Locating Projects on Network Shares . . . 543
Reusing Code . . . 545
Chapter 15 Using Rational Functional Tester in a Linux Environment . . . 548
Installation . . . 548
Using Rational Functional Tester . . . 553
Chapter 16 Internationalized Testing with Rational Functional Tester . . . 569
Unicode and Rational Functional Tester . . . 569
Handling Internationalized Data in Rational Functional Tester . . . 572
Setting Up an Internationalized Test in Rational Functional Tester . . . 574
Modifying a Language-Specific Object Map . . . 592
Modifying Language-Specific Verification Points . . . 596
Modifying Language-Specific Datapools . . . 598
A Fully Internationalized Driver Script . . . 600
A Target Script for the Internationalized Driver Script . . . 602
The Real World . . . 604
Appendix A Advanced Logging Techniques . . . 606
Sending Test Results Via Email . . . 606
Transforming the XML Log by Using XSL . . . 612
Creating Your Own RSS Log Type . . . 622
Appendix B Regular Expressions in Rational Functional Tester . . . 632
Using Regular Expressions in Rational Functional Tester Scripts . . . 633
Writing Regular Expressions . . . 634
Index . . . 650