NAME

veda-test-package - Run the test suite of a package

SYNOPSIS

veda test-package [--verbose level] [--quiet] [--report-format text|xml] [--report-filename file] [pkg-name...]

DESCRIPTION

Runs the test suite of one or more packages (given by pkg-name...) in a fresh interpreter.

If no pkg-name is given, and the current directory contains a valid package, run its tests.

Please cf. PACKAGE FORMAT in veda help new-package for a discussion of SKILL/SKILL++ packages.

OPTIONS

--verbose level

Specify how chatty the run should be, on an integer scale of 0-9. Zero is quiet, 1 means a single note is printed per package, and 5 (the default) lists each test as it is executed.

--quiet

Same as --verbose 0.

--report-format text|xml

Specify the output format. With text (the default), simple human-readable text is written on standard output. With xml, an XML file is generated which matches the JUnit schema, compatible with the JUnit Ant task and Jenkins CI.

Note: use --report-filename to control the output filename.

--report-filename file

Write XML report output to file, which defaults to ./result.xml.

EXAMPLES

Basic package creation, using new-package:

$ veda new-package rocket --prefix AcmeRocket --language scheme
    Create rocket
    Create rocket/rocket.ils
    Create rocket/rocket-test.ils

Running the tests, which results in an (expected) failure:

$ cd rocket/
rocket$ veda test-package rocket
    Testing rocket
=== RUN Test_AcmeRocketHelloReturnValue
--- FAIL: Test_AcmeRocketHelloReturnValue
    Single word: Got t instead of expected 42.
      Args: ("You")

The package name can be omitted when running from a valid package's directory, in which case the package itself is tested:

rocket$ veda test-package
    Testing rocket

XML reports validate against JUnit.xsd:

rocket$ veda test-package rocket --report-format xml --report-filename ./rocket-results.xml
rocket$ xmllint --noout --schema JUnit.xsd rocket-results.xml
rocket-results.xml validates

BUGS

  1. --report-filename only works when --report-format is xml, text output always goes to standard output. Similarly, there is no way to produce XML output on standard output.

  2. Output produced by the tests (on poport) is not redirected as it ought to be.

SEE ALSO

Crosstwine Veda on the Web