Automated Testing Framework

About

The Automated Testing Framework (ATF) is a collection of libraries and utilities designed to ease unattended application testing in the hands of developers and end users of a specific piece of software.

As regards developers, ATF provides the necessary means to easily create test suites composed of multiple test programs, which in turn are a collection of test cases. It also attempts to simplify the debugging of problems when these test cases detect an error by providing as much information as possible about the failure.

As regards users, it simplifies the process of running the test suites and, in special, encourages end users to run them often: they do not need to have source trees around nor any other development tools installed to be able to certify that a given piece of software works on their machine as advertised.

Features

Overview

For maximum flexibility, ATF test suites are organized as a tree of tests. These are as follows:

The developer has to develop all the above blocks to implement his test suite, but the user does not have to deal with the concepts above too much. He simply uses the execution engine (the atf-run utility) to automatically execute test suites or test programs and then uses the reporting engine (the atf-report utility) to transform the results into a nicely-formatted report. This is depicted below:

License

ATF is distributed under the terms of the very permissive, open-source TNF license. Its text is reproduced below:

Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

History

ATF started as a Google Summer of Code 2007 project mentored by The NetBSD Foundation. Its original goal was to provide a testing framework for The NetBSD Operating System, but it grew as an independent project because the framework itself did not need to be tied to a specific operating system.

Alternatives

The following list describes alternative test frameworks and outlines how they differ from ATF. The basic descriptions of each tool is copied from the tool's site if available.

It is also worth to note that none of the frameworks shown above consider the tests as something that the end user should run periodically. The tests constructed by them are shipped as part of a source package and are only run after the program is built. The end user, who almost always uses binary packages, never gets to see these tests nor run them on his own machine (with its specific hardware, software and operating system combination). ATF, on the other hand, does, and this is probably the main difference between it and all other available frameworks.