[Sugar-devel] Unit integration testing - tools discussion

2010-08-11 Thread Tim McNamara
I would like to start a thread on unit  integration testing. I have two
main questions:

1) Where should tests be located
2) Which testing framework to use

Some options for 1:
 - every Sugar project decides for itself
 - root/tests in each project
 - a meta project that houses tests for several/all Sugar projects

Some options for 2:
 - unittest
 - nose
 - py.test

My preferences:
1: root/tests for each project
2: py.test - primarily because it supports distributed testing, that will
make support for alternate Python versions much easier (if we have test
sufficient coverage)

Regards,

Tim.
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Unit integration testing - tools discussion

2010-08-11 Thread Tim McNamara
On 12 August 2010 13:30, James Cameron qu...@laptop.org wrote:

  2) Which testing framework to use

 Whatever the test developer and activity developer can agree on.

 I don't know enough about the options to choose.

 (p.s. I'm aware of your work on Sugarbot.  While this is fantastic, I'm
 worried that a test that depends on Sugarbot might end up not being used
 because Sugarbot is unavailable on the platform, or a later version is
 needed.)


Oh, I was mainly talking about unit testing. Something like Sugarbot /
dogtail is more suited to larger-scale testing.

I see the choice here between derivatives of Kent Beck's SUnit and some of
the newer testing frameworks. In Python, this would be the unittest*
module. The other two options I listed were nose [1]  py.test[2] tests.
There are other possibilities, such as zope.testing.

In my opinion, nose  py.test make writing tests much simpler. I personally
prefer py.test because of some of its additional capabilities, such as being
able to send tests to other cores/machines via ssh with a command line
switch. I think nose has a greater popularity primarily because it has a
better website with friendlier documentation.

Tim

* From Py 2.7, that is depreciated in favour of unittest2.
[1] http://somethingaboutorange.com/mrl/projects/nose/0.11.2/
[2] http://codespeak.net/py/dist/test/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel