NOTE This page is obsolete; please see TestSuite for the current FreeBSD project test effort.

http://assets.diylol.com/hfs/f11/794/0f6/resized/all-the-things-meme-generator-find-all-the-bugs-dda484.jpg

Introduction

This wiki page will (or link to sections that) describe the following items:

Then the wiki page will proceed to note:

The wiki page will finally provide some examples on how to use ATF and how to invoke the new test hooks when testing FreeBSD.

Goals of Testing and Test Infrastructure Comparison

More information about this effort can be found here.

Status of Work

More information about the effort of porting testcases over to ATF, integrating testcases into the build and install, etc can be found here.

Examples

More details on how to write example testcases can be found here.

Layout

The layout of test code within the tree was agreed to be as follows:

Hard requirements:

  1. All test directories must contain a Makefile which .includes the appropriate *.test.mk (atf.test.mk, prove.test.mk, etc) make snippet.

Locale:

  1. Ideally, tests should be localized next to features as much as possible, e.g. $SRCTOP/lib/libc/tests should be where the testcases for libc should live.
  2. Testcases for third-party components like atf should exist under tests/ e.g. $SRCTOP/tests/contrib/atf/ .
  3. Testcases for kernel components should go under a logical directory/functional group, e.g. pjdfstest should go under $SRCTOP/tests/sys/pjdfstest/ .

Known Issues

ATF

In part, because of how ATF is designed and the Kyua project has evolved, it's not the end-all-be-all tool for executing testcases when compared with several other options; it is however an evolving infrastructure that combined with Kyua will serve to become a solid basis for testing on FreeBSD (and hopefully in related projects).

Some known caveats with ATF are as follows:

General infrastructure

More Info

The freebsd-testing mailing list is where interested parties can get in touch to obtain more information about testing on FreeBSD, including topics like testing with ATF, using the test infrastructure in FreeBSD, collaborating with other developers in order to get test code committed to FreeBSD, some basic testing best practices, other test-related topics, etc.

Credit

Corporate Sponsorship

Individual Contributions

TestingFreeBSD (last edited 2014-03-06 00:48:33 by GarrettCooper)