- Methods
  - run
  - is_applicable
  - test_flags
  - total_result_count
  - post_fail_hook
  - _framenumber_to_timerange
  - record_resultfile
  - record_testresult
  - _result_add_screenshot
  - take_screenshot

# Methods

## run

Body of the test to be implemented by child classes. This code is run during test.

## is_applicable

Return false if the test should be skipped.

By default it checks the test name and fullname against a comma-separated blocklist in `EXCLUDE_MODULES` variable and returns false if it is found there.

If `INCLUDE_MODULES` is set it will only return true for modules matching the passlist specified in a comma-separated list in `EXCLUDE_MODULES` matching either test name or fullname.

`EXCLUDE_MODULES` has precedence over `INCLUDE_MODULES` and can be combined to blocklist test modules from the passlist specified in `INCLUDE_MODULES`.

Can eg. check vars{BIGTEST}, vars{LIVETEST}

## test_flags

Return a hash of flags that are either there or not

    'fatal'          - abort whole test suite if this fails (and set overall state 'failed')
    'ignore_failure' - if this module fails, it will not affect the overall result at all
    'milestone'      - after this test succeeds, update 'lastgood'
    'no_rollback'     - don't roll back to 'lastgood' snapshot if this fails
    'always_rollback' - roll back to 'lastgood' snapshot even if this does not fail

## total_result_count

Returns the total number of results created via the various record methods.

## post_fail_hook

Function is run after test has failed to e.g. recover log files

## _framenumber_to_timerange

Create a media fragment time from a given framenumber

##

serialize a match result from needle::search

## record_resultfile

    $self->record_resultfile($title, $output [, result => $result] [, resultname => $name]);

Record result file to be parsed when evaluating test results, for example within the openQA web interface.

## record_testresult

Makes a new test detail with the specified $result, adds it to the test details and returns it.

## _result_add_screenshot

internal function to add a screenshot to an existing result structure

## take_screenshot

add screenshot with 'unk' result if an image is available