Chapter 3. Creating toolkit extensions for custom UI widgets

3.1. Requirements
3.2. ITE extension
3.2.1. Creating the toolkit plug-in
3.2.2. Deploying the toolkit plug-in
3.2.2.1. Create an update site for the toolkit feature
3.2.2.2. Install the toolkit feature from the update site
3.3. Remote control extension
3.3.1. Creating the fragment
3.3.1.1. Creating an adapter
3.3.1.2. Creating a Tester Class
3.3.1.3. Creating an container adapter
3.3.2. Deploying the fragment
3.4. Addressing custom controls via the client API
3.5. ITE, client API and remote control extension examples

When developing graphical applications, it is often necessary or convenient to alter or combine the functionality of existing toolkit components, or even to write entirely new ones, as the requirements or concept of the software may dictate. These new components generally cannot be tested "out of the box", as the behavior of custom components cannot be predicted, or they may deviate from established standards of "look and feel". In order to overcome this limitation, there is an extension API, which you can use to be able to test your custom components.

The following sections describe the steps involved in writing extensions.

AUTs are started, controlled and observed using its remote control component. In order for the AUT Agent to know how to control each element of a GUI, we have outfitted the AUT Agent with a pluggable interface for graphic components. An adapter factory containing one or more components must be implemented for and deployed with the AUT. On the client side, each GUI toolkit that the ITE supports is described in a toolkit plug-in.

We have opened up an interface to our users to allow flexible customizations. You can extend existing functionality, or provide support for in-house graphic components by implementing your own Tester Classes.

The following chapter describes the general steps to take for creating an ITE toolkit extension with custom defined components and actions. This chapter begins by listing the requirements followed by showing the necessary steps for creating an ITE and remote control extension. The ITE toolkit extension is described in Section 3.2, “ITE extension” and the implementation for the remote control extension in Section 3.3, “Remote control extension”. Additionally the Section 3.4, “Addressing custom controls via the client API” describes the usage of custom CAPs within the context of the client API.

Extension examples with source code can be found in the p2-repository "development/org.eclipse.jubla.repo.zip" of the installation.

In general you always have to extend two things:

In this chapter all used directory names are located in the installation directory as long as nothing else is specified.

Wizard for creating an extension

Making it simpler to create the plugins for the extension, you can also use the Extension Wizard we provide for eclipse. This wizard is leading you through the generation process for one component so you just have to implement the testing logic. To install the wizard use ""development/org.eclipse.jubula.extensions.wizard.repo.zip" as a software site and install the Jubula Extension Wizard. After you have installed the wizard you can just create a new Jubula extension project. Follow the instructions from the wizard and you will get the complete structure of the needed plugins,classes and component configuration.



Copyright BREDEX GmbH 2015. Made available under the Eclipse Public License v1.0.