VNC Plugin Reference/en: Unterschied zwischen den Versionen

Aus expecco Wiki (Version 2.x)
Zur Navigation springen Zur Suche springen
Zeile 25: Zeile 25:
= Philosophy =
= Philosophy =
To allow for a maximum of flexibility, the VNC plugin uses description objects, which describe where and how to find UI elements. These descriptions are called "''Screenplays''" and are typically stored in attachments inside the test suite.
To allow for a maximum of flexibility, the VNC plugin uses description objects, which describe where and how to find UI elements. These descriptions are called "''Screenplays''" and are typically stored in attachments inside the test suite.
Each screenplay describes the ui elements of an application. It is structured into multiple "''Scenes''", which correspond to pages/tabs or states of the application. Whenever the application changes its widget layout (i.e. changes to another UI-hierarch or UI-layout), a new stage-description is activated.
Each screenplay describes the ui elements of an application. It is structured into multiple "''Scenes''", which correspond to pages/tabs or states of the application. Whenever the application changes its widget layout (i.e. changes to another UI-hierarchy or layout), a new stage-description is activated.
Finally, each stage contains "''Players''" (UI-elements), and descriptions on how to find them.
Finally, each stage contains "''Players''" (UI-elements), and descriptions on how to find them.



Version vom 24. Januar 2017, 21:03 Uhr

Introduction[Bearbeiten]

The VNC plugin interfaces to local or remote applications via the RFB protocol, which enables interaction with a remote screen on any other machine in the network.

Using VNC has one big advantage, and a number of disadvantages:

  • [+] it allows interaction with and the testing of almost any application, and no instrumentation or recompilation of the tested application is needed, given that a VNC-server is running and reachable on the target system. VNC servers are available or already installed on almost any operating system or device, even for mobile devices, embedded control systems, head units in cars, etc.
  • [-] whilst all other UI testing plugins interact with the tested application directly, via a protocol which enables expecco to reflect (query) on internals of the app, the VNC interface can only show the screen, and can only send events based on screen coordinates. No information about the widget element hierarchy or internal attribute can be interchanged via VNC.

Thus, with VNC, expecco cannot ask the application about the position of GUI elements and cannot ask for any internal attribute values.

  • [-] the VNC plugin cannot provide the values of internal attributes of widget elements (text, labels, enable state etc.)
  • [-] VNC is very sensible to changes in the layout and look of the application.
  • [-] the geometry information (i.e. the location of widget elements) is kept inside expecco, and cannot be queried from the application.

In view of those limitations, you should use the VNC plugin, if no other plugin is usable with the application. i.e. if one of the following applies:

  • it is written in C/C++ and cannot be instrumented or recompiled
  • it is written in Java and the JVM cannot be started with additional jars being loaded or the JVM provides no debugging interface (i.e. embedded Java)
  • it runs under Windows and does not support the Accessability API
  • it is an old style (hand-written) X-windows application (Xt or non-widget library)

Philosophy[Bearbeiten]

To allow for a maximum of flexibility, the VNC plugin uses description objects, which describe where and how to find UI elements. These descriptions are called "Screenplays" and are typically stored in attachments inside the test suite. Each screenplay describes the ui elements of an application. It is structured into multiple "Scenes", which correspond to pages/tabs or states of the application. Whenever the application changes its widget layout (i.e. changes to another UI-hierarchy or layout), a new stage-description is activated. Finally, each stage contains "Players" (UI-elements), and descriptions on how to find them.

The testsuite refers to UI-elements by scene- and elemnt identifiers, and the current active scene provides the information of where and how to find them on the screen.

Screenplays, Scenes and Players are described in a human-readable, textual format in attachments. The GuiBrowser can read, modify and write such attachments. They can also be imported/exported in some standard (XML) format. Import is especially useful, if app-developers can provide this information from their IDE/Window builder files.

Preparation of the System Under Test[Bearbeiten]

You need a VNCserver to be installed an running on the target system. Any freely available or commercial VNC/RFB server should work out of the box.

Locators[Bearbeiten]

Inside the suite, elements are referred to by their elementID inside the current scene. For example, a "Button-Press" action takes the elementID (a string), the button number and the position relative to the wiegdet's origin as argument. expecco will then find the element's geometry info in the scene, translate the coordinates to screen coordinates, and send a VNC button-press to the screen.

Currently, two kinds of locators are supported: - bounds - bitmap

Bounds Locator[Bearbeiten]

With bounds, the origin+corner (i.e. the rectangular bounds) of the element are stored in the scene, and this is used to locate the element - independent of what is actually shown on the screen. This kind of locator is especially useful, if you can get the geometry information from the widget developers, or when the position of the elements remains constant, but the look is changing often.

Bitmap Locator[Bearbeiten]

Here, a "prototype bitmap" is kept in the scene information, and the bitmap is "searched" on the screen. This makes the test less affected by changes in the exact position of the element, but more affected by changes in the look (i.e. changed icons or changed labels).



Copyright © 2014-2024 eXept Software AG