Skip to content
Snippets Groups Projects
Closed (moved) Create a test harness for BridgeDB
  • View options
  • Create a test harness for BridgeDB

  • View options
  • Closed (moved) Issue created by Isis Lovecruft

    BridgeDB's tests are currently stored in lib/BridgeDB/Tests.py and use the standard library's unittest module. Normally, Twisted code is tested with twisted.trial, for the reason that if something returns a twisted.internet.defer.Deferred the stdlib unittest module doesn't know to wait for the result (nor does it understand how to clear the reactor).

    Some things which should be done:

    • We need a test runner which can pass on commands (i.e. doing "python setup.py test" would actually run "trial coverage [args] [tests/test directory]" and pass the arguments and test cases to coverage if need be. See tahoe-lafs's code for an example) and environment variables (i.e. PYTHONPATH).
    • twisted.trial has a conversion utility class for translating test results from stdlib unittest into something which trial's reporter can use. I've never used it, but either some sort of conversion should be done of the old tests, or they should be rewritten.
    • Find a way to write integration tests for the web interface.Windmill (more docs) and twill look promising. Windmill probably wouldn't run very nicely on a headless server, however, as it drives a browser.
    • Find a way to write tests for the email responder.

    If we get all this running, we can setup Travis-CI and get automated continuous integration, which should help prevent bugs like #9626 (moved) and #9156 (moved).

    Useful Resources: http://pycheesecake.org/wiki/PythonTestingToolsTaxonomy

    Linked items ... 0

  • Activity

    • All activity
    • Comments only
    • History only
    • Newest first
    • Oldest first
    Loading Loading Loading Loading Loading Loading Loading Loading Loading Loading