NetBSD-5.0.2/dist/atf/doc/atf.7.in

.\"
.\" Automated Testing Framework (atf)
.\"
.\" 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.
.\"
.Dd January 25, 2008
.Dt ATF 7
.Os
.Sh NAME
.Nm ATF
.Nd introduction to the Automated Testing Framework
.Sh DESCRIPTION
The Automated Testing Framework
.Pf ( Nm )
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.
.Pp
As regards developers,
.Nm
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.
.Pp
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.
.Pp
.Ss License
.Nm
is distributed under the terms of the TNF License, a 4-clause BSD license.
For more details please see:
.Bd -literal -offset indent
.Pa __DOCDIR__/COPYING
.Ed
.Ss Components
.Nm
is a highly modular piece of software.
It provides a couple of libraries to ease the implementation of test
programs: one for the C and C++ languages and another one for shell
scripts.
It also includes multiple small utilities that follow the principle of
doing a single thing but doing it right.
This section outlines which these components are.
.Pp
Public utilities:
.Bl -tag -width atfXtestXprogramXXXXX
.It Xr atf-compile 1
Generates an executable test program based on the description of test
cases written in shell scripting.
.It Xr atf-config 1
Queries static configuration information.
.It Xr atf-report 1
Converts the output of
.Nm atf-run
to user-friendly and/or machine-parseable reports.
.It Xr atf-run 1
Automates the execution of a series of test programs and collects their
results in a unified report.
.El
.Pp
Internal utilities:
.Bl -tag -width atfXtestXprogramXXXXX
.It Xr atf-cleanup 1
Safely cleans up a work directory after a test case terminates.
.It Xr atf-exec 1
Executes a command after modifying its containing process.
.It Xr atf-format 1
Reformats a text string to not overflow terminal boundaries.
.It Xr atf-killpg 1
Sends a signal to a process group.
.El
.Pp
Programming interfaces:
.Bl -tag -width atfXtestXprogramXXXXX
.It Xr atf-c++-api 3
C/C++ programming interface for test programs.
.It Xr atf-sh-api 3
POSIX shell programming interface for test programs.
.El
.Pp
Other:
.Bl -tag -width atfXtestXprogramXXXXX
.It Xr atf-formats 5
Description of the machine-parseable data formats used by the tools.
.It Xr atf-test-case 4
Generic description of test cases, independent of the language they are
implemented in.
.It Xr atf-test-program 1
Common interface provided by the test programs written using the
.Nm
libraries.
.El
.Ss Recommended reading order
For end users wishing to run tests:
.Bl -enum -compact
.It
.Xr atf-test-program 1
.It
.Xr atf-run 1
.It
.Xr atf-report 1
.It
.Xr atf-config 1
.El
.Pp
For developers wanting to write their own tests:
.Bl -enum -compact
.It
Everything recommended to users.
.It
.Xr atf-test-case 4
.It
.Xr atf-c++-api 3
.It
.Xr atf-sh-api 3
.It
.Xr atf-compile 1
.El
.Pp
For those interested in
.Nm
internals:
.Bl -enum -compact
.It
Everything recommended to users.
.It
Everything recommended to developers.
.It
.Xr atf-formats 5
.It
.Xr atf-cleanup 1
.It
.Xr atf-format 1
.It
.Xr atf-exec 1
.It
.Xr atf-killpg 1
.El
.Sh HISTORY
.Nm
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.
.Pp
For more details on this subject, please see:
.Bd -literal -offset indent
.Pa __DOCDIR__/NEWS
.Pa __DOCDIR__/ROADMAP
.Ed
.Sh AUTHORS
For more details on the people that made
.Nm
possible, please see:
.Bd -literal -offset indent
.Pa __DOCDIR__/AUTHORS
.Ed