4.0+55
Generic classes

QF-Test abstract recorded class from the framework specific classes in order to get classes of common use. Those classes are called generic classes. This concept provides a better readability and clearer understanding of components. Furthermore already created tests can be re-used once the target technology is switched or if you want to maintain tests in various technologies in parallel.

Beside those generic classes QF-Test records generic types as well. Those types give a more detailed specification of the target component. A typical use-case are password fields. Those fields have the generic class TextField, but they have that specific characteristic to enter passwords, so they get an additional generic type TextField:PasswordField. Using those types makes the recognition of generic classes for certain categories stricter and more appropriate.

A great advantage of these generic classes, especially when testing web applications is that a user can freely assign these generic classes to components. Later on these mappings may get reduced onto other generic classes. An example how this can be done may be found in the manual chapter Mapping of Tables and TreeTables.

Using generic classes has the following advantages:

  • It is possible to record additional component recognition features, depending on the generic class. Often, depending on the generic class, it makes sense to change the recorded 'Feature' and/or the recorded 'Extra features', e.g. the qfs:label.
  • Depending on the generic class, class specific checks may be provided, e.g. the check to check a complete table row if the generic class equals Table.
  • The indexing of sub-elements during recording, this means that e.g. during click recording on a table cell only a 'Component' for the table gets recorded, while the exact cell is referenced via indices.
  • The recording of the generic type, as far as reasonable.
  • With generic classes it becomes decidable whether the exact position or the most suitable position should get record for mouse clicks.
  • Simply by assigning a recorded component to a generic class, component recognition gets sharpened compared to non-specific HTML classes.

Properties of generic classes is listing which information is saved in particular.

55.1
Overview generic classes
55.2
Properties of generic classes