The xptest Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The xptest Reference Manual

This is the xptest Reference Manual, version 2003.4.21, generated automatically by Declt version 2.4 "Will Decker" on Wed Jun 20 12:46:48 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

xptest - An "Extreme Programming" test framework for Common Lisp
======================================================================

xptest is a framework for building test cases, managing test data, and
putting these together into test suites.  It provides a minimal level
of support for reports on test runs.  It's also a nice development
tool in that one can easily use it for organizing code fragments when
developing more complex features.


License (well, non-License)
======================================================================
xptest is in the public domain.  It's so simple that even a copyright
is just a pathetic clinging some romantic notion of the author.


Installation
======================================================================

This package uses ASDF to load its files.



Author
======================================================================

xptest is maintained by Craig Brozefsky .  Any bug
reports, comments, or patches can be sent to him.

Others who have contributed:
Lyn Headley 
Stig Erik Sandoe 
Kevin Rosenberg 


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 xptest

Maintainer

Kevin M. Rosenberg <kmr@debian.org>

Author

Craig Brozensky

License

Public domain

Description

Extreme Programming Testing Suite

Long Description

The XPTEST package is toolkit for building test suites, very much inspired by the test frameworks that the Extreme Programming crew made available for Smalltalk an other languages.

Version

2003.4.21

Source

xptest.asd (file)

Component

xptestsuite.lisp (file)


Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 xptest.asd

Location

xptest.asd

Systems

xptest (system)

Packages

xptest-system


Previous: , Up: Lisp files   [Contents][Index]

3.1.2 xptest/xptestsuite.lisp

Parent

xptest (system)

Location

xptestsuite.lisp

Packages

xp-test-framework

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

4.1 xptest-system

Source

xptest.asd

Use List

Previous: , Up: Packages   [Contents][Index]

4.2 xp-test-framework

This is the XP TestSuite Framework.

Source

xptestsuite.lisp (file)

Nicknames
Use List

common-lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Macros

Macro: def-test-fixture NAME SUPERS SLOTDEFS &rest CLASS-OPTIONS

Define a new test-fixture class. Works just like defclass, but ensure that test-fixture is a super.

Package

xp-test-framework

Source

xptestsuite.lisp (file)

Macro: make-test-case NAME FIXTURE &key TEST-THUNK TEST-SUITE DESCRIPTION

Create a test-case which is an instance of FIXTURE. TEST-THUNK is the method that will be invoked when perfoming this test, and can be a symbol or a lambda taking a single argument, the test-fixture instance. DESCRIPTION is obviously what it says it is.

Package

xp-test-framework

Source

xptestsuite.lisp (file)

Macro: make-test-suite NAME DESCRIPTION &rest TESTSPECS

Returns a new test-suite. TESTSPECS are just like lists of arguments to MAKE-TEST-CASE.

Package

xp-test-framework

Source

xptestsuite.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Functions

Function: failure FORMAT-STR &rest ARGS

Signal a test failure and exit the test.

Package

xp-test-framework

Source

xptestsuite.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.3 Generic functions

Generic Function: add-test TEST SUITE
Package

xp-test-framework

Methods
Method: add-test (TEST test-suite) (SUITE test-suite)
Source

xptestsuite.lisp (file)

Method: add-test (TEST test-fixture) (SUITE test-suite)
Source

xptestsuite.lisp (file)

Generic Function: perform-test TEST
Package

xp-test-framework

Methods
Method: perform-test (TEST test-fixture)

Default method for performing tests upon a test-fixture.

Source

xptestsuite.lisp (file)

Generic Function: remove-test TEST SUITE
Package

xp-test-framework

Methods
Method: remove-test (TEST test-suite) (SUITE test-suite)
Source

xptestsuite.lisp (file)

Method: remove-test (TEST test-fixture) (SUITE test-suite)
Source

xptestsuite.lisp (file)

Generic Function: report-result RESULT &key STREAM VERBOSE
Package

xp-test-framework

Methods
Method: report-result (RESULTS list) &key STREAM VERBOSE
Source

xptestsuite.lisp (file)

Method: report-result (RESULT test-result) &key STREAM VERBOSE

Print out a test-result object for a report to STREAM, default to standard-output. If VERBOSE is non-nil then will produce a lengthy and informative report, otherwise just prints wether the test passed or failed or errored out.

Source

xptestsuite.lisp (file)

Generic Function: run-test TEST &key HANDLE-ERRORS
Package

xp-test-framework

Methods
Method: run-test (SUITE test-suite) &key HANDLE-ERRORS
Source

xptestsuite.lisp (file)

Method: run-test (TEST test-fixture) &key HANDLE-ERRORS

Perform the test represented by the given test-case or test-suite. Returns one or more test-result objects, one for each test-case performed.

Source

xptestsuite.lisp (file)

Generic Function: setup TEST
Package

xp-test-framework

Methods
Method: setup (TEST test-fixture)

Method called before performing a test, should set up the environment the test-case needs to operate in.

Source

xptestsuite.lisp (file)

Generic Function: setup-testsuite-named NAME
Package

xp-test-framework

Methods
Method: setup-testsuite-named NAME
Source

xptestsuite.lisp (file)

Generic Function: teardown TEST
Package

xp-test-framework

Methods
Method: teardown (TEST test-fixture)

Method called after performing a test. Should reverse everything that the setup method did for this instance.

Source

xptestsuite.lisp (file)

Generic Function: teardown-testsuite-named NAME
Package

xp-test-framework

Methods
Method: teardown-testsuite-named NAME
Source

xptestsuite.lisp (file)

Generic Function: test-named NAME SUITE
Package

xp-test-framework

Methods
Method: test-named (NAME string) (SUITE test-suite)
Source

xptestsuite.lisp (file)

Generic Function: tests SUITE
Package

xp-test-framework

Methods
Method: tests (SUITE test-suite)
Source

xptestsuite.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.4 Conditions

Condition: test-failure ()

Base class for all test failures.

Package

xp-test-framework

Source

xptestsuite.lisp (file)

Direct superclasses

simple-condition (condition)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.5 Classes

Class: test-result ()

The result of applying a test

Package

xp-test-framework

Source

xptestsuite.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: start-time
Initargs

:start-time

Readers

start-time (generic function)

Slot: stop-time
Initargs

:stop-time

Readers

stop-time (generic function)

Slot: test
Initargs

:test

Readers

result-test (generic function)

Slot: failures
Initargs

:failures

Readers

test-failures (generic function)

Slot: errors
Initargs

:errors

Readers

test-errors (generic function)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Macros

Macro: handler-case-if TEST FORM &body CASES
Package

xp-test-framework

Source

xptestsuite.lisp (file)

Macro: test-assert TEST
Package

xp-test-framework

Source

xptestsuite.lisp (file)

Macro: unwind-protect-if TEST PROTECTED CLEANUP
Package

xp-test-framework

Source

xptestsuite.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Generic functions

Generic Function: description OBJECT
Package

xp-test-framework

Methods
Method: description (TEST-SUITE test-suite)

automatically generated reader method

Source

xptestsuite.lisp (file)

Method: description (TEST-FIXTURE test-fixture)

Short description of this test-case, uses in reports

Source

xptestsuite.lisp (file)

Generic Function: result-test OBJECT
Package

xp-test-framework

Methods
Method: result-test (TEST-RESULT test-result)

automatically generated reader method

Source

xptestsuite.lisp (file)

Generic Function: start-time OBJECT
Package

xp-test-framework

Methods
Method: start-time (TEST-RESULT test-result)

automatically generated reader method

Source

xptestsuite.lisp (file)

Generic Function: stop-time OBJECT
Package

xp-test-framework

Methods
Method: stop-time (TEST-RESULT test-result)

automatically generated reader method

Source

xptestsuite.lisp (file)

Generic Function: test-errors OBJECT
Package

xp-test-framework

Methods
Method: test-errors (TEST-RESULT test-result)

automatically generated reader method

Source

xptestsuite.lisp (file)

Generic Function: test-failures OBJECT
Package

xp-test-framework

Methods
Method: test-failures (TEST-RESULT test-result)

automatically generated reader method

Source

xptestsuite.lisp (file)

Generic Function: test-name OBJECT
Package

xp-test-framework

Methods
Method: test-name (TEST-FIXTURE test-fixture)

The name of this test-case, used in reports.

Source

xptestsuite.lisp (file)

Generic Function: test-suite-name OBJECT
Package

xp-test-framework

Methods
Method: test-suite-name (TEST-SUITE test-suite)

automatically generated reader method

Source

xptestsuite.lisp (file)

Generic Function: test-thunk OBJECT
Package

xp-test-framework

Methods
Method: test-thunk (TEST-FIXTURE test-fixture)

A thunk or symbol which will be applied to this instance, a test-case, to perform that test-case. Defaults to ’perform-test

Source

xptestsuite.lisp (file)

Generic Function: tests-hash OBJECT
Generic Function: (setf tests-hash) NEW-VALUE OBJECT
Package

xp-test-framework

Methods
Method: tests-hash (TEST-SUITE test-suite)

automatically generated reader method

Source

xptestsuite.lisp (file)

Method: (setf tests-hash) NEW-VALUE (TEST-SUITE test-suite)

automatically generated writer method

Source

xptestsuite.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.3 Classes

Class: test-fixture ()

Base class for test-fixtures. Test-cases are instances of test-fixtures.

Package

xp-test-framework

Source

xptestsuite.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: test-thunk

A thunk or symbol which will be applied to this instance, a test-case, to perform that test-case. Defaults to ’perform-test

Initargs

:test-thunk

Initform

(quote xp-test-framework:perform-test)

Readers

test-thunk (generic function)

Slot: test-name

The name of this test-case, used in reports.

Initargs

:test-name

Readers

test-name (generic function)

Slot: test-description

Short description of this test-case, uses in reports

Initargs

:description

Readers

description (generic function)

Class: test-suite ()
Package

xp-test-framework

Source

xptestsuite.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
Direct slots
Slot: name
Initargs

:name

Readers

test-suite-name (generic function)

Slot: tests
Initargs

:tests

Initform

(make-hash-table :test (quote equal))

Readers

tests-hash (generic function)

Writers

(setf tests-hash) (generic function)

Slot: description
Initargs

:description

Initform

"no description."

Readers

description (generic function)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L   X  
Index Entry  Section

F
File, Lisp, xptest.asd: The xptest<dot>asd file
File, Lisp, xptest/xptestsuite.lisp: The xptest/xptestsuite<dot>lisp file

L
Lisp File, xptest.asd: The xptest<dot>asd file
Lisp File, xptest/xptestsuite.lisp: The xptest/xptestsuite<dot>lisp file

X
xptest.asd: The xptest<dot>asd file
xptest/xptestsuite.lisp: The xptest/xptestsuite<dot>lisp file

Jump to:   F   L   X  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (  
A   D   F   G   H   M   P   R   S   T   U  
Index Entry  Section

(
(setf tests-hash): Internal generic functions
(setf tests-hash): Internal generic functions

A
add-test: Exported generic functions
add-test: Exported generic functions
add-test: Exported generic functions

D
def-test-fixture: Exported macros
description: Internal generic functions
description: Internal generic functions
description: Internal generic functions

F
failure: Exported functions
Function, failure: Exported functions

G
Generic Function, (setf tests-hash): Internal generic functions
Generic Function, add-test: Exported generic functions
Generic Function, description: Internal generic functions
Generic Function, perform-test: Exported generic functions
Generic Function, remove-test: Exported generic functions
Generic Function, report-result: Exported generic functions
Generic Function, result-test: Internal generic functions
Generic Function, run-test: Exported generic functions
Generic Function, setup: Exported generic functions
Generic Function, setup-testsuite-named: Exported generic functions
Generic Function, start-time: Internal generic functions
Generic Function, stop-time: Internal generic functions
Generic Function, teardown: Exported generic functions
Generic Function, teardown-testsuite-named: Exported generic functions
Generic Function, test-errors: Internal generic functions
Generic Function, test-failures: Internal generic functions
Generic Function, test-name: Internal generic functions
Generic Function, test-named: Exported generic functions
Generic Function, test-suite-name: Internal generic functions
Generic Function, test-thunk: Internal generic functions
Generic Function, tests: Exported generic functions
Generic Function, tests-hash: Internal generic functions

H
handler-case-if: Internal macros

M
Macro, def-test-fixture: Exported macros
Macro, handler-case-if: Internal macros
Macro, make-test-case: Exported macros
Macro, make-test-suite: Exported macros
Macro, test-assert: Internal macros
Macro, unwind-protect-if: Internal macros
make-test-case: Exported macros
make-test-suite: Exported macros
Method, (setf tests-hash): Internal generic functions
Method, add-test: Exported generic functions
Method, add-test: Exported generic functions
Method, description: Internal generic functions
Method, description: Internal generic functions
Method, perform-test: Exported generic functions
Method, remove-test: Exported generic functions
Method, remove-test: Exported generic functions
Method, report-result: Exported generic functions
Method, report-result: Exported generic functions
Method, result-test: Internal generic functions
Method, run-test: Exported generic functions
Method, run-test: Exported generic functions
Method, setup: Exported generic functions
Method, setup-testsuite-named: Exported generic functions
Method, start-time: Internal generic functions
Method, stop-time: Internal generic functions
Method, teardown: Exported generic functions
Method, teardown-testsuite-named: Exported generic functions
Method, test-errors: Internal generic functions
Method, test-failures: Internal generic functions
Method, test-name: Internal generic functions
Method, test-named: Exported generic functions
Method, test-suite-name: Internal generic functions
Method, test-thunk: Internal generic functions
Method, tests: Exported generic functions
Method, tests-hash: Internal generic functions

P
perform-test: Exported generic functions
perform-test: Exported generic functions

R
remove-test: Exported generic functions
remove-test: Exported generic functions
remove-test: Exported generic functions
report-result: Exported generic functions
report-result: Exported generic functions
report-result: Exported generic functions
result-test: Internal generic functions
result-test: Internal generic functions
run-test: Exported generic functions
run-test: Exported generic functions
run-test: Exported generic functions

S
setup: Exported generic functions
setup: Exported generic functions
setup-testsuite-named: Exported generic functions
setup-testsuite-named: Exported generic functions
start-time: Internal generic functions
start-time: Internal generic functions
stop-time: Internal generic functions
stop-time: Internal generic functions

T
teardown: Exported generic functions
teardown: Exported generic functions
teardown-testsuite-named: Exported generic functions
teardown-testsuite-named: Exported generic functions
test-assert: Internal macros
test-errors: Internal generic functions
test-errors: Internal generic functions
test-failures: Internal generic functions
test-failures: Internal generic functions
test-name: Internal generic functions
test-name: Internal generic functions
test-named: Exported generic functions
test-named: Exported generic functions
test-suite-name: Internal generic functions
test-suite-name: Internal generic functions
test-thunk: Internal generic functions
test-thunk: Internal generic functions
tests: Exported generic functions
tests: Exported generic functions
tests-hash: Internal generic functions
tests-hash: Internal generic functions

U
unwind-protect-if: Internal macros

Jump to:   (  
A   D   F   G   H   M   P   R   S   T   U  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   D   E   F   N   S   T  
Index Entry  Section

D
description: Internal classes

E
errors: Exported classes

F
failures: Exported classes

N
name: Internal classes

S
Slot, description: Internal classes
Slot, errors: Exported classes
Slot, failures: Exported classes
Slot, name: Internal classes
Slot, start-time: Exported classes
Slot, stop-time: Exported classes
Slot, test: Exported classes
Slot, test-description: Internal classes
Slot, test-name: Internal classes
Slot, test-thunk: Internal classes
Slot, tests: Internal classes
start-time: Exported classes
stop-time: Exported classes

T
test: Exported classes
test-description: Internal classes
test-name: Internal classes
test-thunk: Internal classes
tests: Internal classes

Jump to:   D   E   F   N   S   T  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   P   S   T   X  
Index Entry  Section

C
Class, test-fixture: Internal classes
Class, test-result: Exported classes
Class, test-suite: Internal classes
Condition, test-failure: Exported conditions

P
Package, xp-test-framework: The xp-test-framework package
Package, xptest-system: The xptest-system package

S
System, xptest: The xptest system

T
test-failure: Exported conditions
test-fixture: Internal classes
test-result: Exported classes
test-suite: Internal classes

X
xp-test-framework: The xp-test-framework package
xptest: The xptest system
xptest-system: The xptest-system package

Jump to:   C   P   S   T   X