KDb/Tests

From KDE Community Wiki
< KDb
Revision as of 14:59, 27 June 2012 by Jstaniek (talk | contribs) (Created page with "==Unit tests== Predicate has complex functionality and should be covered by unit tests. The current test coverage is poor. ===Running unit tests=== $ cd {BUILDDIR}/Predicate/te...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Unit tests

Predicate has complex functionality and should be covered by unit tests. The current test coverage is poor.

Running unit tests

$ cd {BUILDDIR}/Predicate/tests
$ ctest --verbose

HOWTOs

Functional tests

$ cd {BUILDDIR}/tests/features
$ less README # read README file

1. Full test for database, tables and data creation for SQLite:

$ ./predicatefeaturestest -t tables sqlite sqlitetest

On success, sqlitetest file will be created and the test says:

main: "tables" test: PASSED

2. Full test for database, tables and data creation for MySQL server:

$ ./predicatefeaturestest -p {mysql_password} -u {mysql_user} -t tables mysql mysqltest

On success, mysqltest server database will be created and the test says:

main: "tables" test: PASSED