DejaGnu

The GNU Testing Framework

Rob Savoye

Free Software Foundation
New release

Table of Contents
Abstract
Overview
What is DejaGnu ?
What's New In This Release
NT Support
Design Goals
A POSIX conforming test framework
Getting DejaGnu up and running
Test your installation
Windows
Getting the source code for the calc example
Create a minimal project, e.g. calc
A simple project without the GNU autotools
Using autoconf/autoheader/automake
Our first automated tests
Running the test for the calc example
The various config files or how to avoid warnings
When trouble strikes
Testing “Hello world” locally
A first remote test
Setup telnet to your own host
A test case for login via telnet
Remote testing “Hello world”
Transferring files from/to the target
Preparing for crosscompilation
Remote testing of calc
Using WindowsNT as host and vxWorks as target
Running Tests
Make check
Runtest
Output States
Invoking Runtest
Common Options
The files DejaGnu produces.
Summary File
Log File
Debug Log File
Customizing DejaGnu
Local Config File
Global Config File
Board Config File
Remote Host Testing
Config File Values
Command Line Option Variables
Personal Config File
Extending DejaGnu
Adding A New Test Suite
Adding A New Tool
Adding A New Target
Adding A New Board
Board Config File Values
Writing A Test Case
Debugging A Test Case
Adding A Test Case To A Test Suite.
Hints On Writing A Test Case
Special variables used by test cases.
Unit Testing
What Is Unit Testing ?
The dejagnu.h Header File
Reference
Obtaining DejaGnu
Installation
Configuring DejaGnu
Installing DejaGnu
Builtin Procedures
Core Internal Procedures
Procedures For Remote Communication
Procedures For Using Utilities to Connect
Procedures For Target Boards
Target Database Procedures
Platform Dependant Procedures
Utility Procedures
Libgloss, A Free BSP
Procedures for debugging your Tcl code.
File Map
Unit Testing API
C Unit Testing API
Pass Function
Fail Function
Untested Function
Unresolved Function
Totals Function
C++ Unit Testing API
Pass Method
Fail Method
Untested Method
Unresolved Method
Totals Method