DejaGnu
   HOME

TheInfoList



OR:

DejaGnu is a
software framework In computer programming, a software framework is a software abstraction that provides generic functionality which developers can extend with custom code to create applications. It establishes a standard foundation for building and deploying soft ...
for testing other programs. It has a main
script Script may refer to: Writing systems * Script, a distinctive writing system, based on a repertoire of specific elements or symbols, or that repertoire * Script (styles of handwriting) ** Script typeface, a typeface with characteristics of handw ...
called ''runtest'' that goes through a directory looking at
configuration file A configuration file, a.k.a. config file, is a computer file, file that stores computer data, data used to configure a software system such as an application software, application, a server (computing), server or an operating system. Some applic ...
s and then runs some tests with given criteria. The purpose of the DejaGnu package is to provide a single front end for all tests. It is a part of the
GNU Project The GNU Project ( ) is a free software, mass collaboration project announced by Richard Stallman on September 27, 1983. Its goal is to give computer users freedom and control in their use of their computers and Computer hardware, computing dev ...
and is licensed under the
GPL The GNU General Public Licenses (GNU GPL or simply GPL) are a series of widely used free software licenses, or ''copyleft'' licenses, that guarantee end users the freedom to run, study, share, or modify the software. The GPL was the first c ...
. It is based on
Expect Expect is an extension to the Tcl scripting language written by Don Libes. The program automates interactions with programs that expose a text terminal interface. Expect, originally written in 1990 for the Unix platform, has since become avail ...
, which is in turn based on
Tcl TCL or Tcl or TCLs may refer to: Business * TCL Technology, a Chinese consumer electronics and appliance company ** TCL Electronics, a subsidiary of TCL Technology * Texas Collegiate League, a collegiate baseball league * Trade Centre Limited ...
. The current maintainers are Rob Savoye and Ben Elliston.


Testing

DejaGnu has a very strong history in testing due to its
Tcl TCL or Tcl or TCLs may refer to: Business * TCL Technology, a Chinese consumer electronics and appliance company ** TCL Electronics, a subsidiary of TCL Technology * Texas Collegiate League, a collegiate baseball league * Trade Centre Limited ...
base. Tcl is used extensively by companies such as
Oracle An oracle is a person or thing considered to provide insight, wise counsel or prophetic predictions, most notably including precognition of the future, inspired by deities. If done through occultic means, it is a form of divination. Descript ...
and
Sybase Sybase, Inc. was an enterprise software and services company. The company produced software relating to relational databases, with facilities located in California and Massachusetts. Sybase was acquired by SAP in 2010; SAP ceased using the Syba ...
to test their products. DejaGnu allows this work to be much more structured. The tests can be grouped according to the ''tool'' they are testing. The test is run by merely calling in the root project directory. runtest --tool program_to_test This will look in the directory for any folders starting with and will run all .exp files in that folder.


Embedded design

One field for which DejaGnu is particularly well suited is that of embedded system design. It allows for testing to be done remotely on development boards; separate initialization files can be created for each
operating system An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ...
and board. This mainly focuses on embedded targets and remote hosts. DejaGnu is thus popular with many GNU projects, at universities, and for private companies.


Files

Essential Files * ** Each directory in testsuite should contain tests for a specific ''tool''. In this example, the tool being tested is the
Apache webserver The Apache HTTP Server ( ) is a free and open-source cross-platform web server, released under the terms of Apache License 2.0. It is developed and maintained by a community of developers under the auspices of the Apache Software Foundation. T ...
. *** This will be the file containing tests, which in this fictional case might change configuration options, and then connect to the network and check to make sure the changes have taken effect. ** *** ** *** This file will be run as a ''tool init'' file for the tool called ''toolname''. Other Files * This file is a directory specific configuration file for . Options can be placed in this file rather than retyped on each invocation; these options can include any variable passed as a command line argument. set tool Apache #run tests on Apache set srcdir ./testsuite #look here for test files set outdir ./logs #save the logs in a separate directory set all 1 #show results from all tests (rather than just ones with errors) * This is a personal configuration file, which should be located in the user's
home directory A home directory is a directory (file systems), file system directory on a multi-user operating system containing computer file, files for a given user (computing), user of the system. The specifics of the home directory (such as its name and loc ...
() * This is the first configuration file loaded. It can be named anything but must be pointed to by the $DEJAGNU
environment variable An environment variable is a user-definable value that can affect the way running processes will behave on a computer. Environment variables are part of the environment in which a process runs. For example, a running process can query the va ...
(set when your terminal loads).


References

{{reflist


External links


DejaGnu Homepage
(dead link : obsolete since https://www.gnu.org/software/dejagnu/manual/index.html exists ?)
DejaGnu Bug Archives
Software testing tools Scripting languages Free software programmed in Tcl GNU Project software