TestingFramework

From Gnash Project Wiki

Jump to: navigation, search

Gnash testing framework is composed by a mix of self-contained testcases and arbitrary SWFs run by a special testing player (MovieTester). In addition to these SWF-related testing Gnash also has a few (to be grown) set of unit tests.

All tests are found under the testsuite/ directory.

(TODO: organize the following list)

  • MovieTester - a class used to automate runs of arbitrary movies (the special testing player)
  • ActionScriptAll - a set of include files and Makefile rules to easy development of Ming's makeswf based ActionScript self-contained testcases
  • MiscMingAll - a small library of utilities to easy production of libming-based testcases, both self-contained or not
  • MiscMtascAll - a set of Makefile rules to easy addition of MTASC-based self-contained testcases
  • MiscHaxeAll - haXe-based framework for testing SWF9 (ABC blocks)
  • MiscSwfcAll - a set of Makefile rules to easy addition of SWFC-based self-contained testcases
  • GenericTestRunnerGenerator - a shell script for running self-contained testcases
  • DejagnuSWF - a loadable SWF module to help producing self-contained testcases

See also http://www.gnu.org/software/gnash/manual/gnashref.html#testing

Notes from strk

(TODO: fix presentation!)

  • we don't have support for good test *runners* for mtasc framework actually
    • the only AS implementation of the "Dejagnu" service we have is in mtasc framework
  • the "Dejagnu" services we typically have in our frameworks provide:
    • a TextField messages end up to
    • a note() function that writes to the TextField *and* traces
    • a set of checking functions: check_equals, check, xcheck_equals, xcheck that evaluate the arg (for equality of true value) and print a PASSED/FAILED/XPASSED/XFAILED message containing info about the expression being evaluated, the expected result in the _equals case, the filename and line number
    • consistency checking (a check_totals,xcheck_totals function that verifies all the tests meant to be run were actually run)
  • the one in misc-ming.all is in C and that's mostly because it creates the TextField using a static character rather then using createTextField
    • that was to support SWF5 in actionscript.all (which loads the service as an external movie: Dejagnu.swf)