Available in the usual place: http://pypi.python.org/pypi/nose2/0.2
Documentation and development on github:
http://nose-devs.github.com/nose2/ and
https://github.com/nose-devs/nose2.
Come take a look, and help determine what will go into 0.3.
Multiprocessing? Non-testcase test classes? load_tests protocol?
Support for giant robot cranes? More spinal tap jokes? Fewer spinal
tap jokes?
JP
Speaking about a giant robot crane. I wonder how others use nose and
unittest for hardware testing/measurements.
Most use cases I encountered is for python code validation.
I do also use unittest in hardware projects, this is how:
- test are subclasses of unittest.TestCase
- MyTestSuite subclasses unittest.TestSuite, it holds among other a test
environment (a context if you like).
- MyTestSuite has a setup and teardown (unlike in unittest) to prepare the
environment/context
- unittest test discovery is used to collect tests. If needed tests can be
excluded. Nose attributes would make my code easier.
- Create MyTestSuites for different environment/context parameters and stuff
with the discovered tests. Some tests can be excluded based on
environment/context parameters. This means that one single test can be run
multiple times, but not necessarily all discovered tests run for all context
parameters.
- tests interact with the environment/context mainly for measurement
instrument control. Tests cannot set or get environment/context parameters
- run with TextTestRunner, logs are shown on screen
- tests never fail since no asserts are used.
- All collected data and python logs are stored in a database while tests
are running. Reports (rst, pdf, html) are generated on request. Either while
tests are running, or after all tests have completed.
Back to nose2, some bold ideas ...
- handle test contexts: select a context and select for which context
parameters to run
- Out of the box there seems no way to discover tests and conditionally run
them multiple times for different context parameters, or even different
contexts.
- Anyone ever used robotframework
(http://code.google.com/p/robotframework/)? One very interesting concept it
has are keywords. Every test exist of a sequence of keywords, which can be
hierarchical. A keyword is simply a python callable object. If a keyword
raises an exception it fails and all following keywords of the test also
fails (this is configurable). Html report generator is included and uses
this keyword concept. I like these html reports, here is an example:
http://robotframework.googlecode.com/hg/doc/userguide/src/ExecutingTestCases
/log_passed.html#s1-s2-t1, another one here:
http://robotframework.googlecode.com/hg/doc/userguide/src/ExecutingTestCases
/log_failed.html#s1-s2-t1
- jokes ... bring them on
Thanks for your time,
Wouter