Opened 13 years ago

Closed 13 years ago

Last modified 11 years ago

#9194 closed task (fixed)

Add unittest and functional test infrastructure

Reported by: Steffen Hoffmann Owned by: osimons
Priority: normal Component: TagsPlugin
Severity: normal Keywords: doctest unittest functional testing QA
Cc: Ryan J Ollos Trac Release: 0.11


Securing the code against regressions by changes done in ongoing development requires checks for existing functionality and user-webUI-interaction.

Automated testing is best practice for programming QA because it yields high, permanent effect for any effort put into it.

Attachments (0)

Change History (6)

comment:1 Changed 13 years ago by Steffen Hoffmann

Keywords: doctest functional testing QA added

Odd, you may take this ticket over as you see need to express your commitment to the task.

And I've seen you reopening #3983. I understand the value of these tests and will try to follow. Isn't it possible to execute these doctests too along with the unittests? At least I think that I've seen doctests and infrastructure for them in Trac core as well...

comment:2 Changed 13 years ago by Ryan J Ollos

Cc: Ryan J Ollos added; anonymous removed

comment:3 Changed 13 years ago by osimons

Owner: changed from Steffen Hoffmann to osimons

Yup, pretty much got it ready. Hang on...

comment:4 Changed 13 years ago by osimons

Resolution: fixed
Status: newclosed

(In [10670]) TagsPlugin: Wired up unittest infrastructure for all modules, including the existing doctests part of query module.

16 tests, ~half are dummy tests to verify test infrastructure, and 1 doctest is failing due to #3983 (already reopened).

Tests can be run either as the full suite:

$> PYTHONPATH=. python test

or, by just running a single test module:

$> PYTHONPATH=. python -m tractags.tests.query

Closes #9194 - now go write some more tests... :-)

comment:5 Changed 13 years ago by osimons

(In [10671]) TagsPlugin: Adding some slightly more elaborate web_ui test cases to ensure that basic request handling and permissions work.

References #9194.

comment:6 Changed 11 years ago by Steffen Hoffmann

(In [13165]) TagsPlugin: Mirror ticket tags into normalized tags db table, refs #4503, #9194 and #11096.

Parsing ticket fields per request has been a known performance hog, that's why using the tags db table for regular access yields a considerable speed-up.

As a side-effect 'ticket' is the pilot for fixing a recently announced issue with get_tagged_resources in the default tag provider implementation. Nicely polished by stretching unit test coverage to this part of the code.

ToDo: DefaultTagProvider must be fixed as well, and other tag providers should be reviewed too as a precaution.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain osimons.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.