<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <HTML ><HEAD ><TITLE >Overview</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.64 "><LINK REL="HOME" TITLE="DejaGnu" HREF="book1.html"><LINK REL="PREVIOUS" TITLE="Abstract" HREF="preface.html"><LINK REL="NEXT" TITLE="What's New In This Release" HREF="new.html"></HEAD ><BODY CLASS="CHAPTER" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >DejaGnu: The GNU Testing Framework</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="preface.html" ><<< Previous</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="new.html" >Next >>></A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="CHAPTER" ><H1 ><A NAME="OVERVIEW" >Overview</A ></H1 ><DIV CLASS="SECT1" ><H1 CLASS="SECT1" ><A NAME="WHATIS" >What is DejaGnu ?</A ></H1 ><P ><SPAN CLASS="PRODUCTNAME" >DejaGnu</SPAN > is a framework for testing other programs. Its purpose is to provide a single front end for all tests. Think of it as a custom library of Tcl procedures crafted to support writing a test harness. A <I CLASS="EMPHASIS" >Test Harness</I > is the testing infrastructure that is created to support a specific program or tool. Each program can have multiple test suites, all supported by a single test harness. DejaGnu is written in <SPAN CLASS="PRODUCTNAME" >Expect</SPAN >, which in turn uses <SPAN CLASS="PRODUCTNAME" >Tcl</SPAN > -- Tool command language. There is more information on Tcl at the <A HREF="http://www.scriptics.com" TARGET="_top" >Scriptics</A > web site, and the Expect web site is at <A HREF="http://expect.nist.gov" TARGET="_top" >NIST</A >.</P ><P >DejaGnu offers several advantages for testing:</P ><P ></P ><UL COMPACT="COMPACT" ><LI STYLE="list-style-type: disc" ><P >The flexibility and consistency of the DejaGnu framework make it easy to write tests for any program, with either batch oriented, or interactive programs.</P ></LI ><LI STYLE="list-style-type: disc" ><P >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 <B CLASS="COMMAND" >GDB</B > can run (from any Unix based host) on any target architecture that DejaGnu supports. Currently DejaGnu runs tests on many single board computers, whose operating software ranges from just a boot monitor to a full-fledged, Unix-like realtime OS.</P ></LI ><LI STYLE="list-style-type: disc" ><P >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.</P ></LI ><LI STYLE="list-style-type: disc" ><P >Using Tcl and expect, it's easy to create wrappers for existing test suites. By incorporating existing tests under DejaGnu, it's easier to have a single set of report analyse programs..</P ></LI ></UL ><P >Running tests requires two things: the testing framework, and the test suites themselves. Tests are usually written in <SPAN CLASS="PRODUCTNAME" >Expect</SPAN > using Tcl, but you can also use a Tcl script to run a test suite that is not based on <SPAN CLASS="PRODUCTNAME" >Expect</SPAN >. (<SPAN CLASS="PRODUCTNAME" >expect</SPAN > script filenames conventionally use <I CLASS="EMPHASIS" >.exp</I > as a suffix; for example, the main implementation of the DejaGnu test driver is in the file <SPAN CLASS="PRODUCTNAME" >runtest.exp</SPAN >.)</P ><P >Julia Menapace first coined the term ``Deja Gnu'' to describe an earlier testing framework at Cygnus Support she had written for <B CLASS="COMMAND" >GDB</B >. When we replaced it with the Expect-based framework, it was like DejaGnu all over again... But more importantly, it was also named after my daughter,<A HREF="mailto:deja@welcomehome.org" TARGET="_top" >Deja Snow Savoye</A > (now 9 years old in Dec of 1998), who was a toddler during DejaGnu's creation.</P ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="preface.html" ><<< Previous</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="book1.html" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="new.html" >Next >>></A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >Abstract</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" > </TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >What's New In This Release</TD ></TR ></TABLE ></DIV ></BODY ></HTML >