DejaGnu
   HOME

TheInfoList



OR:

DejaGnu is a
software framework In computer programming, a software framework is an abstraction in which software, providing generic functionality, can be selectively changed by additional user-written code, thus providing application-specific software. It provides a standard ...
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 Directory may refer to: * Directory (computing), or folder, a file system structure in which to store computer files * Directory (OpenVMS command) * Directory service, a software application for organizing information about a computer network's u ...
looking at
configuration file In computing, configuration files (commonly known simply as config files) are computer file, files used to configure the Parameter (computer programming), parameters and Initialization (programming), initial settings for some computer programs. T ...
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 computing devices by collaborati ...
and is licensed under the
GPL The GNU General Public License (GNU GPL or simply GPL) is a series of widely used free software licenses that guarantee end users the four freedoms to run, study, share, and modify the software. The license was the first copyleft for general u ...
. 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 Rob Savoye is the primary developer of Gnash. He is a developer for the GNU Project, having worked on Debian, Red Hat and dozens of other free/open source software projects. He was among the first employees of Cygnus Support, which was sold to Re ...
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 agency considered to provide wise and insightful counsel or prophetic predictions, most notably including precognition of the future, inspired by deities. As such, it is a form of divination. Description The word '' ...
and
Sybase Sybase, Inc. was an enterprise software and services company. The company produced software to manage and analyze information in relational databases, with facilities located in California and Massachusetts. Sybase was acquired by SAP in 2010; ...
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, software resources, and provides common services for computer programs. Time-sharing operating systems schedule tasks for efficient use of the system and may also in ...
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 software, released under the terms of Apache License 2.0. Apache is developed and maintained by an open community of developers under the auspices of the Apache S ...
. *** 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 file system directory on a multi-user operating system containing files for a given user of the system. The specifics of the home directory (such as its name and location) are defined by the operating system involved; for ...
() * 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 dynamic-named value that can affect the way running processes will behave on a computer. They are part of the environment in which a process runs. For example, a running process can query the value of the TEMP env ...
(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