948 bytes added
, 10:52, 7 January 2014
Sugar toolkit now has support for Automated Activity Testing. This page lists the various aspects of Activity Testing.
The tests are supposed to be organized into the <tt>tests</tt> directory inside the bundle path. Inside this there are two subdirectories - <tt>integration</tt> and <tt>unit</tt> which contain UI and unit tests respectively. Both of them contain test files starting with <tt>test_</tt>. So the directory structure can be summarized as follows -
tests/
|-integration/
|test_operations.py
|-unit/
|test_functions.py
Only files beginning with test_ will be executed.
These tests can be executed using <code>./setup.py check</code>
setup.py also takes a optional argument of which set of tests to run -
./setup.py check integration
./setup.py check unit
See the example [https://git.sugarlabs.org/~svineet33/calculate/svineet33s-calculate/commit/8cdf4f6d556b58379081a1f339513e0636506e5e tests] inside Calculate.