You are looking at historical revision 9371 of this page. It may differ significantly from its current revision.
A test runner utility for use with TestBase tests.
The testbase driver runs TestBase test-files, with optional configuration. The test-results are stored in the testbase test results database. The test-files are stored in the testbase test files directory.
The testbase-driver command:
chicken-testbase-driver [options...] test-file
--indent=INTEGER Amount to indent messages [default: 0] --test-compile Run compiled test --compiler=PATHNAME Compiler command pathname --compiler-option=OPTION(S) Option(s) for the compiler --compiler-extend=FORM(S) Form(s) for compiler to load before compiling --test-interpret Run interpreted test --interpreter=PATHNAME Interpreter command pathname --interpreter-option=OPTION(S) Option(s) for the interpreter --test-ignore=TESTNAME Ignore the result(s) for the specified test --test-skip=TESTNAME Skip the specified test --test-directory=PATHNAME Directory in which to run the test --test-setup=FORM(S) Form(s) to pass on to the running test --test-reader-extension=ID(S) Module(s) for test results reader to load before reading --files-repository=PATHNAME Directory where test files are stored --results-repository=DIRECTORY Directory where test results are stored --results-expectation-specifics Enable inclusion of the actual values for expectation test results --results-mode=all|errors|none How are test results stored [default: errors] -q, --quiet Do not print messages -v, --verbose Print phase messages -n, --dry-run Just show commands to be executed, don't run them -V, --version Display version -h, --help Display this text
- Pathname of test file; missing directory and extension components default to "files-repository" and "scm".
- default (repository-path)/testbase/tests
- default (repository-path)/testbase/results
TestBase Test Results Database
Currently the testbase results database is a suite of files in the results-repository directory, . Each file is a collection of test results records, one per test-file.
An API, TestBase Results, is provided to manipulate test results. The programmer is strongly encouraged to use the provided API.
TestBase Test Configuration
A test-file may have one or more configuration sections. The sections are represented as a Scheme block comment.
The configuation section header must be on a single line. The trailer must be on a single line. The configuation section contents must follow Scheme read-syntax, and comments but not block-comments, are allowed.
Two execution models are recognized, compile and interpret.
#| TestBase ...ignored...
(command <pathname>) (option <atom> ...) (extend <form> ...) (directory <pathname>) (setup <form> ...) (startup <form> ...) (cleanup <form> ...) (ignore <test-identification> ...) (skip (<test-procedure-name> <test-identification> ...) ...) )
(command <pathname>) (option <atom> ...) (directory <pathname>) (setup <form> ...) (startup <form> ...) (cleanup <form> ...) (ignore <test-identification> ...) (skip (<test-procedure-name> <test-identification> ...) ...) )
(purpose <docu-object> ...) (feature <module-id> ...) (reader-extension <module-id> ...) (reader-setup <form> ...) (compile <flag>) (interpret <flag>) (directory <pathname>) (ignore <test-identification> ...) (skip (<test-procedure-name> <test-identification> ...) ...) (setup <form> ...) )
- absolute pathname
- string or syntax
- string or number or symbol
- test | suite | case | expect
- test-name or (<test-type> <test-name>)
- extension or library symbolic name
- Directory in which to run test
- Path to the command to execute
- Arguments for the command
- Forms to extend the execution environment of the command
- Forms to extend the execution environment of the test
- Extension module(s) for the test results reader execution environment
- Extension expression(s) for the test results reader execution environment
- Forms to perform before command
- Forms to perform after command
- Results are not saved
- Tests are not performed
- What the test is to achieve
- What the modules are tested
The elements of the 'test subsection are combined with the execution model subsections, compile and interpret. When an element is single-valued the subsection element takes precedence.
The command-line argument values are combined with the corresponding subsection elements. When an element is single-valued the command-line argument takes precedence.
TestBase Results API
Please refer to the testbase-results documentation.
TestBase Test API
Please refer to the TestBase Documentation.
Copyright (c) 2007, 2008 Kon Lovett. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED ASIS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- Initial release