We are missing a capable test framework that is part of our main source tree.
This means that building-in testing when working on FreeBSD's base system requires extra steps, and so is harder than should be.
We currently keep our unit tests and regression test cases under /usr/src/tools/regression/.
These tests use ad-hoc ways to build and execute their test cases. Test case reporting is also
not standardized (though some tests use the Perl 'Test Anything Protocol', see below).
Running these tests in an automated way (a test 'tinderbox') is not always possible.
At this point of time we do not archive test logs. Even if we did so, analysis of historical test data would be tedious due to the ad-hoc nature of the test reports.
C-based test writing API that is easy to learn.<bsd.*.mk>.TET is a test execution framework from the Open Group. Its features include:
C, C++, Java, Perl, Python and Shell (KSH) APIs for writing test cases.C APIs are easy to use.<bsd.test.mk>.TET makes a set of assumptions about its execution environment that make integrating it in a BSD-compatible way into the base system complex.
/usr/src/contrib/, as hier(7) dictates./usr/src/test/, in a manner similar to the way other contributed software is built in FreeBSD, see src.conf(5), and build(7). Regular TET assumes that tcc (the test case controller) would control builds./usr/src/./usr/obj/${ARCH}/.tcm.o, libapi.a, etc.) would need to be installed under some standard location (say, ${DESTDIR}/usr/test/tet3/?).${DESTDIR}/usr/test/. This installation process should be controllable by the knobs in src.conf(5).${DESTDIR}/usr/test/ would need to be configured to only run tests from this location (like a binary test suite)./etc/services, a startup script for daemons in /etc/rc.d/ etc.)./var/ by default (say /var/tet/journals/?). This would allow the /usr/test/ hierarchy to be read-only and sharable across multiple systems.tcc -c (clean) is tricky. For test suites under ${DESTDIR}/usr/test/ we only want temporary files to be removed.
Stock TET assumes that the directory named by environment variable ${TET_ROOT} contains all the control files needed for a TET run. Test suites are assumed be located under ${TET_ROOT}, and tcc, (the test case controller program) takes charge of all steps of test building, execution and cleaning. Some, but not all, of these assumptions are configurable using the command-line and
configuration files.
We'll need FreeBSD-specific documentation to cover the places where we diverge from TET's documented defaults.
STAF/STAX:
STAF (Software Testing Automation Framework) IBM is a test automation framework built over XML, Python(Jython) and other technologies. STAF/STAX offer a way to distribute tests (to multiple machines) and to collect and present the results.
STAF/STAX require a large number of dependencies. TET is much smaller, and yet, appears to offer equivalent functionality.
TAP: TAP is a text based protocol for reporting test results. Originally developed by the Perl community, there are now language bindings from many languages, including C, Python, PHP and Javascript. TAP is not a full-fledged test framework.