--
MikealRogers - 05 Sep 2007
Setup
You need to install python 2.5, we have a pretty good tutorial on that here,
http://windmill.osafoundation.org/trac/wiki/BookChapter-1-Install#InstallingPython
You'll then need to install setuptools. Download
http://peak.telecommunity.com/dist/ez_setup.py and run it in python 2.5.
You'll then need to use easy_install (installed as part of setuptools) to install a few dependencies.
$ easy_install xmlobjects
$ easy_install functest
Running tests
Go in to the protocol test directory and envoke functest, this will run all the tests in the protocol test directory.
$ functest
If you want to only run one or two at a time just add the test file you wish to run as a command line argument.
$ functest test_cmp.py
If you want to run only one test method inside a test module you can use the filer option, this will skip any tests that don't contain the string.
$ functest test_cmp.py filter=test_create
When tests fail you'll see them in the output as
failed(test_method_name), at the end of the test run the traceback from the test will print. If you want to see the traceback or other print statements in the test to print as the tests run rather than at the end you can use the stdout option.
$ functest test_cmp.py stdout
Finally, if you want to debug a test in place when it fails you can use pdb. This will drop in you the python debugger where the test fails and you can look at all the objects in the local scope to see what has failed.
$ functest test_cmp.py pdb
Extras
If you would like to have colored tracebacks in the terminal then you should install pygments via easy_install.