Getting Started Writing Plug-Ins with TestComplete 4
One of TestCompletes benefits is its open COM-based architecture, which lies behind its entire functionality. In fact, everything that is visible in TestComplete (panels, program objects, etc.) is implemented as plug-ins. For instance, support for script debugging is implemented in several dynamic link libraries that are located in TestComplete's subfolders. TestComplete loads these DLLs when starting, so debugging looks like a built-in feature. Some of TestComplete's functionalities, for instance, Manual Testing, Unit Testing or TestComplete 3 Compatibility are implemented as plug-ins that can be activated or deactivated and can be chosen to be installed when installing the product and deactivated using the Extensions dialog. All of these plug-ins are located in the ...TestCompleteBin Extensions folder.
You can create plug-ins and inlcude them in TestComplete. Usually, this introduces new functionality in one or several objects and exposes these objects for use in scripts, in the same way the Manual Testing and Unit Testing plug-ins expose the
UnitTesting objects for scripting.
What Can I Accomplish By Creating My Own Plug-Ins?
Really, the question should be what do I want to accomplish, because you could practically accomplish anything. As stated above, usually this is done to create new functionality for scripting. You can also create your own visual panels, toolbars and commands, not to mention your own Test Type. Since TestComplete is an open COM-based architecture the limits are up to you.
Do You Have Libraries and Files Needed for Creating Custom Plug-Ins?
AutomatedQA provides a TestComplete 4 Software Development Kit (SDK) which includes a number of samples that demonstrate how to create custom panels, program objects and project items as well as documentation, libraries and files that aid in the creation of plug-ins. TestComplete 4 SDK is free and can be downloaded from:
How Do I Use The SDK Samples and What Samples Are Provided?
TestComplete SDK includes files, which you can use to create your own TestComplete plug-ins, and sample projects that demonstrate how you can use these files to create plug-ins. The files and samples are located in the ...TestComplete 4SDK folder. All of these files are organized into two subfolders named Delphi and MSVC. These subfolders are similar to each other and have the following subfolders: Common - Contain files needed to create plug-ins in your development tool (Visual C++ or Delphi). Samples - Contain source code of sample plug-ins.
To compile the examples and use the SDK files, you either need Borland Delphi 7, or Microsoft Visual C++ 2003. You can also use other versions of these compilers, but you may need to modify the samples source code.
The following samples are provided in TestComplete's SDK: GIFExtender - Source files that demonstrate how to implement support for custom image formats that can be used in TestComplete. Project item - Source files that demonstrate the creation of a custom project item (including the project item editor and program object). SimplePanel - Source files that demonstrate the creation of a custom panel. SimplyPlugIn - Source files that demonstrate the creation of a simple plug-in (this plug-in does not provide any functionality, it can only be installed to and uninstalled from TestComplete).