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 check the test name and fullname against comma-separated blacklist in EXCLUDE_MODULES variable and returns false if it is found there.

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

test_flags

Return a hash of flags that are either there or not

  without anything - rollback to 'lastgood' snapshot if failed
  'fatal' - whole test suite is in danger if this fails
  'milestone' - after this test succeeds, update 'lastgood'
  'important' - if this fails, set the overall state to 'fail'

default is obviously no flags, installation tests are 'fatal' by default

post_fail_hook

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

serialize a match result from needle::search

record_testresult

generic function that adds a test result to results and re-computes overall state

_result_add_screenshot

internal function to add a screenshot to an existing result structure

take_screenshot

add screenshot with 'unk' result

ocr_checklist

Optical Character Recognition matching.

Return a listref containing hashrefs like this:

  {
    screenshot=>2,              # nr of screenshot for the test to OCR
    x=>104, y=>201,             # position
    xs=>380, ys=>150,           # size
    pattern=>"H ?ello",         # regex to match the OCR result

    result=>"OK"                # or "fail"
  }