Abuild is integrated with the QTest test framework. The
QTest framework is a perl-based test framework intended to
support a design for testability testing
mentality. Abuild's own test suite is implemented using QTest.
When using either the make or the
Groovy backends, if a directory called
qtest
exists, then the
test and check targets will
invoke qtest-driver to run qtest-based test
suites. If a single file with the .testcov
extension exists in the build item directory, abuild will
invoke qtest-driver so that it can find the
test coverage file and activate test coverage support. Note that
abuild runs qtest-driver from the output
directory, so the coverage output files as well as
qtest.log
and
qtest-results.xml
will appear in that
directory. If you wish to have a qtest-based test suite be
runnable on multiple platforms simultaneously, it's best to avoid
creating temporary files in the qtest
directory. If you wish to use the abuild output directory for
your temporary files, you can retrieve the full path to this
directory by calling the get_start_dir
method of the qtest TestDriver
object.
In order to use test coverage, you must add source files to the
TC_SRCS
variable in your
Abuild.mk
or
Abuild.groovy
file. Abuild automatically
exports this into the environment. If you wish to specify a
specific set of tests to run using the TESTS
environment variable, you can pass it to abuild on the command
line as a variable definition (as in abuild check
TESTS=some-test), and abuild will automatically
export it to the environment for qtest.