Tests

Restad project uses the Qt and CuteTest (https://bitbucket.org/mayastudios/cutetest/overview) for testing, you'll need to install both, and specify in test/test.pro the path for CuteTest includes and libraries.

CuteTest adds some features to QTest, especially grouping tests of different classes in one target and then allow to compile and run once ! You will need to compile with qmake -config debug for the test part. Sadly CuteTest seems to be abandoned and there are still some bugs around. You can not use QDebug anywhere in the code called for the test or CuteTest will crash or stay in an infinite Qt's event-loop. It is hard to test multithreading or database connection with CuteTest, that's why only a few classes are tested right now with those unit tests.

For unknown reason, the test_commands unit test is not working anymore, it leads CuteTest to stay in an infinite Qt's event-loop. Problem does not occur with the first commited source files...

To test Restad with a database, a Ruby script is doing the job (test/test_index.rb), it needs the pg gem and an empty database set up with Restad schema. Just pass a restad-config file as argument and run the script into the target directory (i.e. where the Restad bin files are). Tested with Ruby 1.9.

All Classes Functions Variables Typedefs Enumerations Enumerator