xreq - generate tests from specification




XReq takes as input feature files describing specifications and generate tests for these features in languages such as Ada, C, C++.

Specifications are described in a formalized natural language (see cucumber documentation) and the sentences are translated in code using using steps. These steps define a relation between the regular expression matching the sentance and a function to perform what the sentance describes.


    The .feature file containing cucumber-like specification. It is
    possible to specify multiple features on the command-line all of
    them will be processed.

-h, -help, --help
    Help message

-s, --step STEPDIR
    Specify a step directory.  By default, the step/ directory relative
    to each feature file specified is searched.

-k, --keep-going
    Keep going if there are errors for a feature and compile the next

    Replace @todo tags with a function skeleton that implement the
    step.  With this switch, you can omit the features files but you
    have to specify a step definition directory using --step.

--fill-steps-in PACKAGE
    Same as --fill-steps except that steps that were not found in the
    feature files will be inserted in the step package PACKAGE and
    filled in with a procedure skeleton.

-x, --executable TEST_NAME
    Create a test program called TEST_NAME that will be able to run all
    the specified features.  If not present, only test packages are
    created.  The TEST_NAME is relative to the output directory
    specified with the -o (--output-dir) option.
    ATTENTION: For the Ada language, this option will remove every
                other .adb and .ads file in the output directory. This
                is necessary for the GPR project file to work.

-o, --output DIR
    Choose in which directory the files will be generated. The test
    packages have the same name as the features.  By default the output
    directory is the tests/ directory relative to the feature file.

-l, --lang LANG
    Choose wich language to generate.
    Available languages: Ada

-m, --make
    Build generated files (using gnatmake for Ada language).
    Require option -x, --executable.

-q, --quiet
    Display minimum output only.

    Specify an additional configuration option NAME with the value
    VALUE. See below for the documentation of those options. If the
    same option is specified twice, the first value is discarded.

    Show progress.

    Don't generate anything.

    Show matches with step definitions


These configurations options are specified on the command line using the scitch -c with an argument of the form NAME=VALUE. If an option is not recognized, it is silently ignored. Possible options are:

    These option specify an additional library to include in the GPR
    project file. Separate the libraries by commas ','.

    These option specify an additional source path in the GPR project.
    Separate the directories by commas ','.


    Additional flags to pass to gnatmake