cmd-test: Project Web Hosting - Open Source Software

cmd-test

Users

Download cmd-test files

Project detail and discuss

Get support

About SourceForge.net:

SourceForge.net is the world's largest provider of hosting for Open Source software development projects. SourceForge.net provides a variety of services to projects, including a download mirror network, collaborative development tools (like CVS and Subversion), and tools to support discussion and support. These services are provided to projects and their end-users free-of-charge.

Project Information

This is the cmd-test project ("cmdtest")

This project was registered on SourceForge.net on Jun 5, 2013.

This console application helps in testing other console applications by checking the output agains specific rules specified by the user as regular expressions.

The application expects as arguments one or more control files that consist of commands. Each line is interpreted and compared against a list of known commands. Comments must stay on their own line and should start with a # sign.

The documentation uses the term target to refer to a program that is being tested. To create a new target use the TARGET command. To change current target use the SWITCH command. Targets are discarded only at the end of the program. If you do not check explicitly for program exit using END TARGET or EXIT CODE, the program will check this itself at the end. Finding a target still running at this point is considered to be a failed test.

List of build-in commands:

INCLUDE file
includes another file; the file is interpreted before stepping to next line.
TARGET [path/]name [ARGS arguments]
starts a program identified by path and name and provides the arguments to it. Failing to find the program is considered an error.
SWITCH name
changes current target to the one identified by the name. This string must be the same one that was provided to TARGET command. If the name is not found is considered to be an error.
END TARGET [name]
chacks the target to see if it ended its execution. The target is either the current target (if no name was specified) or the one that is indicated by the name. If the target has ended this counts as a successful test, otherwise it counts as a failed test.
EXIT CODE code
EXIT CODE NOT code
checks if the current target ended its execution and with what code.
COMMAND cmd
sends the string (and an ending new line character) to the program.
EXPECT pattern
EXPECTE pattern
EXPECTO pattern
checks the output of the program against provided regular expression. EXPECT checks both standard output and standard error chanels, while EXPECTE and EXPECTO check only specific chanels. Note that the coresponding output buffer is cleared after these commands.

The commands are case-insensitive, but always presented as Uppercase in documentation.

To build and install the library follow the instructions in INSTALL file.

The project is distributed under the 3-clause license ("Revised BSD License", "New BSD License", or "Modified BSD License"). Read about it in the COPYING file.

Developers

Join this project:

To join this project, please contact the project administrator of this project, as shown on the project summary page.

Get the source code:

Source code for this project is available as downloads or through one of the SCM repositories used by the project, as accessible from the project develop page.

About Open Source:

Of benefit to users, Open Source software is licensed so you can download and use the software free-of-charge. The source code for this software is made available free-of-charge, you (or a programmer you hire) can make changes to this software to better meet your needs, and you can release your changed code back to the community passing the benefit on to other users.

Project Web Hosted by SourceForge.net

©Copyright 1999-2009 - Geeknet, Inc., All Rights Reserved

About - Legal - Help