You are looking at historical revision 3830 of this page. It may differ significantly from its current revision.

Introduction

TestBase test results database access procedures.

Usage

(require-extension testbase-results)

Parameters

default-test-file-extension

[parameter] (default-test-file-extension [EXTENSION])

Get or set the test file source filename extension. EXTENSION is a string.

test-files-directory

[parameter] (test-files-directory [DIRECTORY])

Get or set the test file source repository directory. DIRECTORY is an absolute directory pathname string.

test-results-directory

[parameter] (test-results-directory [DIRECTORY])

Get or set the test file results repository directory. DIRECTORY is an absolute directory pathname string.

Reader Extensions

load-test-results-reader-extension

[procedure] (load-test-results-reader-extension EXTENSIONS)

run-test-results-reader-setup

[procedure] (run-test-results-reader-setup EXPRESSIONS)

Pathname Constructors

make-test-file-pathname

[procedure] (make-test-file-pathname FILENAME)

Returns an absolute pathname of a test file for FILENAME.

make-test-results-pathname

[procedure] (make-test-results-pathname FILENAME)

Returns an absolute pathname of a results file for FILENAME.

Test Results File Procedures

create-test-results-file

[procedure] (create-test-results-file FILENAME)

Creates a test results file FILENAME. If necessary an absolute pathname will be constructed using the current parameters.

delete-test-results-file

[procedure] (delete-test-results-file FILENAME)

Deletes the test results file FILENAME. If necessary an absolute pathname will be constructed using the current parameters.

read-test-results-file

[procedure] (read-test-results-file FILENAME)

Reads the contents of the test results file FILENAME and returns a list. If necessary an absolute pathname will be constructed using the current parameters.

read-test-results-rows

[procedure] (read-test-results-rows PORT)

Reads the contents of the test results file from the open input PORT and returns a list.

append-test-results-row

[procedure] (append-test-results-row FILENAME ROW [HEADER '()])

Write the test results file entry ROW to the test results file FILENAME, with the optional HEADER. If necessary an absolute pathname will be constructed using the current parameters.

The HEADER is a list of key+value pairs where the key is a symbol. The only recognized header entries are extension and setup.

fold-test-results-rows

[procedure] (fold-test-results-rows FOLD-PROCEDURE INITIAL-VALUE PORT)

Calls the FOLD-PROCEDURE for every test results file entry from the open input PORT, passing the current entry and the result of last call, or the INITIAL-VALUE when the first call.

Printing Procedures

[procedure] (print-test-result RESULT)

Print the test result RESULT to the current output port.

[procedure] (print-test-results RESULTS)

Print the test results list RESULTS to the current output port.

[procedure] (print-test-results-row ROW)

Print the test results file entry ROW to the current output port.

[procedure] (print-test-results-rows ROWS)

Print the test results file entry list ROWS to the current output port.

[procedure] (print-test-results-file FILENAME)

Print the test results file FILENAME to the current output port. If necessary an absolute pathname will be constructed using the current parameters.

Test Results File Entry Procedures

make-test-results-row

[procedure] (make-test-results-row knd RESULTS . FIELDS)

Returns a test results file entry for the test results RESULTS and the optional FIELDS.

test-results-row-field

[procedure] (test-results-row-field ROW KEY)

Returns the test results file entry ROW field of the given name KEY.

test-results-row-model

[procedure] (test-results-row-model ROW)

Returns the test results file entry ROW model field, a string.

test-results-row-when

[procedure] (test-results-row-when ROW)

Returns the test results file entry ROW when field, a vector.

test-results-row-results

[procedure] (test-results-row-results ROW)

Returns the test results file entry ROW results field, a list.

Test Results Procedures

test-results-failures

[procedure] (test-results-failures RESULTS [TYPE-LIST '(expectation error)])

Returns a list of the test failures in the RESULTS list for the given test types TYPE-LIST.

test-results-remove!

[procedure] (test-results-remove! RESULTS IDENTIFIER-LIST)

Returns the RESULTS list with all tests from the IDENTIFIER-LIST removed.

Test Result Procedures

make-test-abnormal-exit-result

[procedure] (make-test-abnormal-exit-result EXIT-CODE ERROR-STRING)

test-result-field

[procedure] (test-result-field RESULT KEY)

Returns the test result RESULT field of the given name KEY.

test-result-fields

[procedure] (test-result-fields RESULT [KEY ...])

Returns the test result RESULT fields of the given name KEY as a list.

test-result-finding

[procedure] (test-result-finding RESULT)

Returns the test result RESULT finding field, which could be any object but usually a boolean.

test-result-identifier

[procedure] (test-result-identifier RESULT)

Returns the test result RESULT name, message, or id field, which could be any object but usually a string or symbol. The id field is returned when the name is missing.

test-result-passed?

[procedure] (test-result-passed? RESULT)

Does the test result RESULT finding field indicate this test passed?

test-result-type

[procedure] (test-result-type RESULT)

Returns the test result RESULT type field, a symbol.

Requirements

numbers testbase

Authors

Kon Lovett

License

Copyright (c) 2007 Kon Lovett

Open Source

Bugs

Version History

1.0
Initial release