Hi all,

I have a list of goals and requirements for the fixing of bug 16105, which I recently filed to track the need to add some supporting infrastructure to slim_source for running unit tests. This doesn't need an in-depth review (I believe it's fairly well-defined what the needs are) but for those interested, the short document is attached. Feel free to ask questions or point out if something's missing.

To summarize it all in a sentence: "Make it easy to run any and all unit tests in our gate."

Thanks,
Keith
Goals and Requirements for Unit Testing infrastructure in slim_source

Goals:
1) Method for running all tests in gate, resulting in an XUnit report 
consumable by Hudson
2) Simple method for running all tests in gate, resulting in formatted output 
on the console, for developer use
3) Simple method for running all tests in a folder/module, resulting in console 
output
4) Simple method for running an individual test, resulting in console output
* Additionally, (1) should provide metrics on code coverage

Add'l goals:
5) Method for running an individual test, or all tests in a folder/module, 
dumping an XUnit report
6) Would be valuable if (2), (3) and (5) also provided code coverage metrics
7) Would be valuable if (1), (2), (3), and (5) also provided pylint scores
8) Provide additional tools for developers writing PyUnit tests (such as 
generic "Mock" objects)

Requirements:
* Developers must be able to add a test with minimal to no extra work beyond 
writing the test (e.g., putting the file in a test folder should be around all 
that's needed for the framework to pick up the test)
* Infrastructure must be laid out in a manner that keeps the gate "clean"
* As much as possible, limit the need to re-build the entire gate between test 
runs. For example, test execution being reliant on the usr/src directory 
instead of the proto directory for all Python files, if possible.
* The infrastructure cannot require anything more than the source code and 
additional packages (such as Nose, coverage.py). There should be no 
environmental dependencies, root privileges, nor requirements upon the gate 
other than what is required to build the gate.
* Include instructions or update README to provide information on the 
infrastructure to developers

Note: For this work, "Nose"[1] is the recommended PyUnit test runner

[1]http://somethingaboutorange.com/mrl/projects/nose/0.11.3/
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss

Reply via email to