Expecco Reflection Library: Unterschied zwischen den Versionen

Aus expecco Wiki (Version 2.x)
Zur Navigation springen Zur Suche springen
Zeile 56: Zeile 56:
Assuming that the database contains a table named "TestSpecs", which relates tests with parameters and test steps.
Assuming that the database contains a table named "TestSpecs", which relates tests with parameters and test steps.
The following asks the operator for a test-name, queries the database and collects steps and parameters:
The following asks the operator for a test-name, queries the database and collects steps and parameters:

<<picture to be added>>
<<picture to be added>>

Then that information is passed to a test generator, which
Then that information is passed to a test generator, which
* creates a testplan,
* creates a testplan,
* enumerates the steps and adds test cases,
* enumerates the steps and adds test cases,
* enumerates the parameters and creates variables
* enumerates the parameters and creates variables

<<picture to be added>>
<<picture to be added>>

Finally,
Finally,
* the test is executed,
* the test is executed,
* a report generated,
* a report generated,
* and also written back to the database
* and also written back to the database

<<picture to be added>>
<<picture to be added>>

All this is wrapped up into one action, which is defined as "to be automatically executed ehen the suite is loaded":
All this is wrapped up into one action, which is defined as "to be automatically executed ehen the suite is loaded":

<<picture to be added>>
<<picture to be added>>



Version vom 14. September 2021, 10:19 Uhr

Introduction[Bearbeiten]

The Reflection Library contains building blocks to automate expecco itself and to construct test suits automatically. Its main use is to automatically generate test suites or libraries. For example, to import specifications in a textual format, a database or a QM-system and generate test skeletons or concrete action blocks and/or test suites.

For more information, please refer to the documentation and examples inside the library.

Typical Uses[Bearbeiten]

The reflection library can be used to:

  • automatically generate testsuites from textual descriptions
  • automatically generate datatypes (e.g. from textual descriptions)
  • merge, filter testsuites
  • bulk renaming, bulk annotating of elements in a number of suites
  • extraction of annotations from a number of suites
  • generation of custom documents from suites
  • conversion/migration of existing testcases

Functionality[Bearbeiten]

Browser Manipulation[Bearbeiten]

These include blocks to simulate various user actions, either towards the currently running expecco application, or to a secondary expecco window. For example, to open, close expecco windows, to switch to particular tabs, or to change the selection in the item tree.

Project Manipulation[Bearbeiten]

Includes blocks to create test suites, to manipulate environments (create/modify variables), and to load and save test suite files (".ets"-files). There are both blocks which operate on a browser window, and blocks which operate on a project object itself (i.e. without a need for a browser window).

Tree Manipulation[Bearbeiten]

Includes blocks to create actions, datatypes, attachments and folders in a project's item tree.

Diagram Editing[Bearbeiten]

Includes blocks to create activity diagrams, to add steps and to connect pins.

Text Editing[Bearbeiten]

These operate on the currently running expecco, and are mostly useful for code-generation utilities, which can be bound to user-defined menu items.

Execution[Bearbeiten]

This allows for a testplan to be executed automatically, under control of another activity.

Reporting[Bearbeiten]

Actions to generate test reports.

Examples[Bearbeiten]

The following gives a rough sketch on how to extract a test specification from a relational database. It is not as such directly executable, as it depends on the structure of the database and the layout of records.

Assuming that the database contains a table named "TestSpecs", which relates tests with parameters and test steps. The following asks the operator for a test-name, queries the database and collects steps and parameters:

<<picture to be added>>

Then that information is passed to a test generator, which

  • creates a testplan,
  • enumerates the steps and adds test cases,
  • enumerates the parameters and creates variables

<<picture to be added>>

Finally,

  • the test is executed,
  • a report generated,
  • and also written back to the database

<<picture to be added>>

All this is wrapped up into one action, which is defined as "to be automatically executed ehen the suite is loaded":

<<picture to be added>>

The tester then only needs to start expecco on that suite.



Copyright © 2014-2024 eXept Software AG