Opened 7 years ago

Closed 7 years ago

#7223 closed enhancement (fixed)

Streamline the creation of test specifications

Reported by: hellais Owned by: hellais
Priority: Medium Milestone:
Component: Archived/Ooni Version:
Severity: Keywords: ooni_tests, ooni_documentation
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Currently we write test specifications here: https://trac.torproject.org/projects/tor/wiki/doc/OONI/Tests, but we also include the details of a test inside of the code.

To avoid having to manually keep in sync the test specification on the wiki and the one inside of the code it would be ideal if we had a way to automatically generate from the code the test specification.

We should take the data from the docstrings of the test specification and create markup to go on either the trac wiki page or on the OONI docs stored on https://ooni.readthedocs.org/

I see to possible routes for doing this:

1) we do something custom that runs on every file the methods that we use in runner.py do detect if a class if of the right class and then using something similar to this: https://github.com/globaleaks/GLBackend/blob/master/docs/generate_spec.py we generate the test specification

2) Use the autodoc feature of sphinx: http://sphinx.pocoo.org/ext/autodoc.html#module-sphinx.ext.autodoc.

I believe the second option is optimal.

Child Tickets

TicketTypeStatusOwnerSummary
#7224taskclosedhellaisDocument HTTP Host Test

Change History (3)

comment:1 Changed 7 years ago by hellais

Keywords: ooni_tests ooni_documentation added; specification removed

comment:2 Changed 7 years ago by hellais

The test specification should look like this: https://ooni.readthedocs.org/en/latest/tests/template.html

comment:3 Changed 7 years ago by hellais

Resolution: fixed
Status: newclosed

We ended up creating an ad-hoc repository for test specifications. They can all now be found here: https://github.com/TheTorProject/ooni-spec.

Note: See TracTickets for help on using tickets.