Improved functional test infrastructure
|Reported by:||Owned by:|
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.