Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Trac
Trac
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Issue Boards

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • Legacy
  • TracTrac
  • Issues
  • #9865

Closed (moved)
Open
Opened Oct 01, 2013 by Isis Lovecruft@isis

Create a test harness for BridgeDB

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

To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: legacy/trac#9865