Unitary and non regression testing of Scilab - Scilab Wiki

Unitary and non regression testing of Scilab

before starting

Under Linux

If you receive the error Gtk-WARNING **: Locale not supported by C library. when you start scilab in a terminal. do (as root or via sudo) :

$ cd /usr/lib/locale
$ ln -s en_GB.utf8 en_GB

(Replace en_GB with your locale)

Testing the Scilab distribution

All tests

Launch Scilab and type :

test_run()

It will run all the tests and provide this kind of output :

   01/153 - [cacsd] arma..........................................passed
   02/153 - [cacsd] odedi.........................................passed
   03/153 - [cacsd] slicot........................................passed
   04/153 - [completion] completion...............................passed
   05/153 - [core] auto...........................................failed  : dia and ref are not equal
[...]

At the end of all the testing, it will display the results.

Test only one module

test_run('time')

Test only one function

test_run('time','datenum')

Testing the source version of Scilab

Linux/Unix

To launch all the tests, in the root directory of the source tree, type :

cd $SCI
make check

To launch the test of one module, go in the root directory of the module and type :

make check

For example, the following commands will run all the tests for the core module.

cd $SCI
cd modules/core/
make check

Creating new test files (draft)

Very incomplete guide to create new tests. Compare these indications with existing tests.

Unitary and non regression testing of Scilab (last edited 2010-06-09 15:01:24 by Sylvestre Ledru)