mailRe: unit tests vs... the current test_suite


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by Gary S. Thompson on October 30, 2006 - 18:06:
Edward d'Auvergne wrote:

That's not a bad article. We really do need to add unit tests to
relax. The whole test suite needs to be overhauled. I have to say
that writing tests in the current framework sucks! The unit tests
would also be very useful when the proposed redesign
(https://mail.gna.org/public/relax-devel/2006-10/msg00053.html,
Message-id: <1160550133.9523.54.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>)
takes place - the changes will essentially be as close to extreme
programming as relax coding has gotten. The unit tests would then
allow quick refactorisation and debugging of the code.


One thing we could do is set up the test suite into the three-tiered
system - unit tests, functional or system tests, and regression tests
- that I discussed in the 3rd paragraph of


After though I think you need two levels functional tests and unit tests
(as I discuss elsewhere regression tests are just classes of fucntional
and uni tests)

https://mail.gna.org/public/relax-devel/2006-10/msg00076.html
(Message-id: <7f080ed10610120357x6257ec52of7844250f3bab680@xxxxxxxxxxxxxx>).
This could use the standard Python unittest module.


The other tests
could manually implement an analogous methodology to decrease the
amount of stuff printed out.  There's absolutely no point printing
stuff, apart from a summary, if the test passes.  This will probably
involve IO redirection (of stdout and stderr) to catch and store the
crap from each test.

I don't see why we an'c just use the same framework...


If the integration of unit tests are completed before the redesign,
one unit test could be added as each function is updated.

You may want o add some contratural unit tests for higher level functions as you redesigne it's lower level functions....

At the same
time, the docstrings could be updated and slightly modified into the
epytext format (http://epydoc.sourceforge.net/epytextintro.html and
http://epydoc.sourceforge.net/epytext.html) for the relax API
documentation (http://www.nmr-relax.com/api/) generated with epydoc
(http://epydoc.sourceforge.net/).

The other useful idea from that article is that he makes a distinction
between and error and failure!

Edward



On 10/30/06, Andrew Perry <ajperry@xxxxxxxxxxxxxx> wrote:

Hopefully not too off topic, but this little article really hammered home
how useful unit tests could be for relax.


 http://wwmm.ch.cam.ac.uk/blogs/murrayrust/?p=142

I noticed there has been a bit of discussion, but what is the current
state/plans for unit tests in relax ?

I think the standard python unittest framework would be a bit cleaner than
the style of the current test_suite ... but thats coming from someone who
hasn't attempted to write any tests under the existing relax test_suite yet.


Despite the initial work involved, a robust set of unittests would probably
prevent breakage in unexpected places in the future, and provide extra
confidence that the results calculated from relax are very reliable.


Andrew

_______________________________________________
relax (http://nmr-relax.com)

This is the relax-devel mailing list
relax-devel@xxxxxxx

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel




_______________________________________________ relax (http://nmr-relax.com)

This is the relax-devel mailing list
relax-devel@xxxxxxx

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel

.



--
-------------------------------------------------------------------
Dr Gary Thompson
Astbury Centre for Structural Molecular Biology,
University of Leeds, Astbury Building,
Leeds, LS2 9JT, West-Yorkshire, UK             Tel. +44-113-3433024
email: garyt@xxxxxxxxxxxxxxx                   Fax  +44-113-2331407
-------------------------------------------------------------------






Related Messages


Powered by MHonArc, Updated Mon Oct 30 18:21:34 2006