Opened 16 years ago
Closed 8 years ago
#8170 closed enhancement (wontfix)
Improved functional test infrastructure
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | |
Component: | general | Version: | none |
Severity: | normal | Keywords: | testing |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Trac has a nice functional test infrastructure. However from a plugin writer's point of view it leaves some things to be desired.
For our plugin Agilo for Scrum we wanted to have functional tests as well so we started adapting trac's existing code. The base design is still very similar to trac's current functional test infrastructure.
Goals / what we implemented:
- Use functional tests with different databases (basic implementation, (1))
- Provide a functional infrastructure which can be used by plugins (e.g. enable/disable components by default)
- Lift the limitation of a single environment (without changing the old behavior)
- Design clean up - the test suite should not know anything about the environment
- Even more design clean up - Test suite should not set attributes in test cases (run functional tests with nosetests)
What needs to be fixed before new functional tests can be included in trac:
- Skip functional tests if some libraries (like twill/svn/subprocess) are missing
- Adapt documentation
Due to the stuff left to do, the attached patch will need some rework. However I hope to get some feedback - if there is a chance that our changes will be included, we can do some more polishing.
(1) Support for MySQL+PostgreSQL is currenlty quite limited because you need to clear the database before starting the test manually.
Attachments (2)
Change History (12)
by , 16 years ago
Attachment: | new_functional_infrastructure_v1.patch added |
---|
comment:1 by , 16 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
Hi Felix,
Your patch has an issue on line 230, we can't apply it with patch 2.5.8, 2.5.9. Could you please check and reupload?
We're trying to reconcile three sets of patches that all seem to solve the same problem during the pycon sprints, so we'll get this resolved soon.
by , 16 years ago
Attachment: | new_functional_infrastructure_v1.patch.fixed added |
---|
Fixed version of previous patch
comment:2 by , 16 years ago
Spent a little time on it and managed to locate the patch error.
-
(a) new_functional_infrastructure_v1.patch vs. (b) new_diff.diff
a b 2 2 =================================================================== 3 3 --- trac/tests/functional/api.py (Revision 0) 4 4 +++ trac/tests/functional/api.py (Revision 0) 5 @@ -0,0 +1,22 6@@5 @@ -0,0 +1,224 @@ 6 6 +# -*- coding: utf-8 -*- 7 7 +# Copyright 2009 Agile42 GmbH, Berlin (Germany) 8 8 +"""
comment:3 by , 16 years ago
The first evolution of the source:sandbox/rework-testing branch has been merged in trunk in r8131, with 0.11-stable following.
comment:4 by , 15 years ago
Since the rework-testing branch has completed a cycle of activity and that new related changes have been done directly on the main branches (e.g. r8416), further developments of the testing infrastructure should be rebased on a more recent version of trunk. So I've deleted the branch for now (r8476).
Feel free to recreate the branch whenever you have some new material.
comment:5 by , 15 years ago
Keywords: | testing added |
---|
comment:6 by , 15 years ago
Tim, do you intend to integrate this before 0.12? If not, please move to either next-minor-0.12.x or next-major-0.1X. Thanks.
comment:7 by , 15 years ago
Milestone: | 0.12 → next-major-0.1X |
---|
comment:8 by , 10 years ago
Owner: | removed |
---|---|
Status: | assigned → new |
comment:10 by , 8 years ago
Milestone: | next-major-releases |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
If someone wants to create a new patch against the current trunk we could accept some more of these changes to the functional test suite. Otherwise, I don't see a reason to keep the ticket open any longer.
For now I only converted trac.tests.functional.testcases