Test Execution Monitor Window/en: Unterschied zwischen den Versionen

Aus expecco Wiki (Version 2.x)
Zur Navigation springen Zur Suche springen
Zeile 36: Zeile 36:


<span id="Note1"><sup>1)</sup> why is it disabled by default?</span>
<span id="Note1"><sup>1)</sup> why is it disabled by default?</span>
<br>We assume that the test suite will be running automated once you finished developing it. And then, you will probably not want any popup windows to appear, which need user interaction (think of an automatic run overnight).
<br>We assume that the test suite will be executed automated once you finished developing it. And then, you will probably not want any popup windows to appear, which need user interaction (think of an automatic run overnight).
<br>Instead of waiting for a never happening user input and thus blocking the machine for other scheduled automatic tests, the will instead report an error then ("User Interface Disabled") so that either the next test case will be executed, or the testplan be finished (and other automated tests can be executed afterwards).
<br>Instead of waiting for a never happening user input and thus blocking the machine for other scheduled automatic tests, the will instead report an error then ("User Interface Disabled") so that either the next test case will be executed, or the testplan be finished (and other automated tests can be executed afterwards).

Version vom 24. März 2022, 16:02 Uhr

Introduction[Bearbeiten]

Expecco can be configured to present a custom dynamic GUI (graphical user interface) while executing. This user interface is defined and controlled by the action being executed, and can vary (i.e. changed) dynamically. Useful scenarios for this are test stands, where you want to hide the internals of the execution from the test operator, or to present additional data (monitoring) or to ask interactively for parameters or other input values.

Of course, the simple dialog requests can also be used for parameter questions, but a custom UI can both provide a better look and allow for more complex user interaction to be defined.

The general mechanism is based on attaching a user interface to individual (compound) actions. This UI is then shown whenever the action is active.

Getting Started[Bearbeiten]

  • First, create a new compound action, and go to its schema tab.
  • at the bottom, find the button named "GUI"and click on it. A UI-editor will open, showing 3 views:
    • the main view, containing the widget hierarchy and attributes,
    • a drawing canvas, which shows how the UI will look
    • and a widget gallery, from which UI elements can be dragged into the widget hierarchy to into the drawing canvas.
  • now - for a simple example, drag a simple "OK" button (found in the "Buttons"section) and a ListView (in the "Lists"section) from the gallery into the canvas. Don't care for layout details now - we'll fix this later.
  • press "Save"and close the editor.
  • the UI will later be shown during the action's execution; therefore, we make sure that it will run for some time. Place a simple "Delay for a few seconds" action into the action's activity diagram, so the UI will not be closed immediately.
  • press "Run"

You will now probably get an error outcome, stating the the UI was disabled in the project 1). This is the default, and you should enable this first in the project's "Execution" tab: select "Window" in the combo list of the "User Interface" section near the bottom).

Run it again.

Your UI should now show up, while the compound action is active, and disappear later. Of course, we did not yet connect any data or callback actions with the UI's elements.

Connecting the Widgets with Data[Bearbeiten]

The widgets interact with the action via special environment variables. For example, the list-widget will present the list as held by a list variable and place the selection into another selection variable. These variables are to be defined in the action block's private environment, and should have the special initializer-type "GUIValue".

Let's do this in our concrete example:

  • reopen the UI-builder by selecting the schema tab and there clicking again on "GUI"
  • select the list widget - either in the widget tree or in the drawing canvas view
  • beside the widget tree, you'll find the selected widget's attributes, arranged in multiple tabs. Make sure the "Basics" tab is selected. There, enter the name of the variable which will hold the list, into the field named: 'List'.

 


1) why is it disabled by default?
We assume that the test suite will be executed automated once you finished developing it. And then, you will probably not want any popup windows to appear, which need user interaction (think of an automatic run overnight).
Instead of waiting for a never happening user input and thus blocking the machine for other scheduled automatic tests, the will instead report an error then ("User Interface Disabled") so that either the next test case will be executed, or the testplan be finished (and other automated tests can be executed afterwards).



Copyright © 2014-2024 eXept Software AG