www.delorie.com/gnu/docs/dejagnu/dejagnu_1.html   search  
 
Buy GNU books!


DejaGnu Testing Framework

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1. What is DejaGnu?

DejaGnu is a framework for testing other programs. Its purpose is to provide a single front end for all tests. Beyond this, DejaGnu offers several advantages for testing:

  1. The flexibility and consistency of the DejaGnu framework make it easy to write tests for any program.

  2. DejaGnu provides a layer of abstraction which allows you to write tests that are portable to any host or target where a program must be tested. For instance, a test for GDB can run (from any Unix based host) on any target architecture that DejaGnu supports. Currently DejaGnu runs tests on several single board computers, whose operating software ranges from just a boot monitor to a full-fledged, Unix-like realtime OS.

  3. All tests have the same output format. This makes it easy to integrate testing into other software development processes. DejaGnu's output is designed to be parsed by other filtering script, and it is also human readable.

DejaGnu is written in expect, which in turn uses Tcl---Tool command language.

Running tests requires two things: the testing framework, and the test suites themselves. Tests are usually written in expect using Tcl, but you can also use a Tcl script to run a test suite that is not based on expect. (expect script filenames conventionally use `.exp' as a suffix; for example, the main implementation of the DejaGnu test driver is in the file `runtest.exp'.)

2.1 Running existing tests  A first look at running DejaGnu tests
2.2 What does a DejaGnu test look like?  What does a DejaGnu test case look like?
2.3 Design goals  Goals behind DejaGnu
2.4 A POSIX conforming test framework  DejaGnu conforms to POSIX 1003.3
2.5 Future directions  Where is DejaGnu going?
2.6 Tcl and Expect  Reading more about Tcl and Expect


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003