avocado-framework/avocado — pull request #305 by ruda (2014-12-12 21:05:34+00:00)
Title: Test discovery and load (Phase I)

This phase tries to refactor the code to allows further enhancements and to allow the test loading being replaceable by plugins.
All the features of running tests are retained and the test execution and behavior (like the test results) should be the same as the previous test loader of Avocado.

We're using a few concepts here:
* test suite (adapted from Python's unittest module): a list of tests with params from a dictionary
* test factory: a pair (tuple) of test class and test parameters

Introduce avocado.loader module with two different tasks to perform: test discovery and test loading.

* The test discover find tests (by ad hoc criteria) and return a list of tests (test suite) to be loaded and then executed.
* The test loader takes a test factory and then load the test, creating a new test instance ready to be executed.