The slite Reference Manual

Table of Contents

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

The slite Reference Manual

This is the slite Reference Manual, version 0.0.1, generated automatically by Declt version 3.0 "Montgomery Scott" on Wed Oct 13 12:33:28 2021 GMT+0.


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

1 Introduction

tdrhq

SLITE

Screenshot of Slite in Action

Slite stands for SLIme TEst runner. Slite interactively runs your Common Lisp tests (currently only FiveAM and Parachute are supported). It allows you to see the summary of test failures, jump to test definitions, rerun tests with debugger all from inside Emacs.

We support both SLIME and SLY.

Slite allows for fast Test Driven Development with CL.

At the moment, treat this software as Alpha quality. Things will break, APIs will change, but your feedback will be very valuable.

Installation

I'll expand on this later. Basically you need to (asdf:load-system :slite), and also need to load slite.el into emacs. That should be all you need to do.

Run all you FiveAM tests

This is the function you'll call most often. In a Common Lisp buffer, press C-c v or M-x slite-run. You can then provide the expression as (slite:run-all-fiveam-tests). You could run a specific test suite with (fiveam:run test-suite-name).

You'll get a table of all the tests and their results. The failed tests will be on the top.

Press RET on a test to see details about the failure. On the table, or in the details buffer, press r to re-run the test with debugger (i.e. when the test fails the debugger will open up). Delete a test with M-x slite-delete-test.

Press M-. on the test name in the details view to jump to the test. (This only works on Lispworks, and only if you use a patched version of FiveAM)

Honestly, that's about all you need to know. Although, there's one more neat little feature:

Running shell commands when tests pass

When I do TDD, I usually run my tests and immediately if the test passes I run git commit -a -m .... So my Emacs compile command might look like make tests && git commit ... .

There are two ways to do this with slite: you could do this as part of the lisp expression that you pass to slite-run, or you could use the slite-success-shell-hook from the Emacs side. The latter option will work even when you're using a remote slime session.

For example, (setq slite-success-shell-hook "cd ~/code && git commit -a -m ...") will do essentially what I was suggesting earlier. This API is a little awkward, so we might change this in the future

Run Parachute tests

Ensure you (asdf:load-system :slite/parachute). At this point, you use M-x slite-run to run tests like (parachute:test 'foo-bar). All the same functionality such as debugging, deleting should work. Jumping to test is currently not surpported.

Authors

Built by Arnold Noronha arnold@tdrhq.com


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 slite

Author

Arnold Noronha <arnold@jipr.io>

License

Apache License, Version 2.0

Description

SLIME based Test-runner for FiveAM tests (and possibly others in the future)

Version

0.0.1

Dependencies
Source

slite.asd (file)

Components

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 slite.asd

Location

slite.asd

Systems

slite (system)


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

3.1.2 slite/api.lisp

Parent

slite (system)

Location

api.lisp

Packages

slite/api

Exported Definitions

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

3.1.3 slite/slite.lisp

Dependency

api.lisp (file)

Parent

slite (system)

Location

slite.lisp

Packages

slite

Exported Definitions
Internal Definitions

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

3.1.4 slite/fiveam.lisp

Dependency

slite.lisp (file)

Parent

slite (system)

Location

fiveam.lisp

Packages

slite/fiveam

Exported Definitions
Internal Definitions

guess-fiveam (function)


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

4 Packages

Packages are listed by definition order.


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

4.1 slite/api

Source

api.lisp (file)

Use List

common-lisp

Exported Definitions

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

4.2 slite

Source

slite.lisp (file)

Use List
Exported Definitions
Internal Definitions

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

4.3 slite/fiveam

Source

fiveam.lisp (file)

Use List
Internal Definitions

guess-fiveam (function)


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 Special variables

Special Variable: *engine*
Package

slite

Source

slite.lisp (file)

Special Variable: *framework-guessors*
Package

slite/api

Source

api.lisp (file)


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

5.1.2 Functions

Function: guess-framework RESULT
Package

slite/api

Source

api.lisp (file)

Function: on-pass RESULTS &key SHELL
Package

slite

Source

slite.lisp (file)


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

5.1.3 Generic functions

Generic Function: rem-test FRAMEWORK NAME PACKAGE
Package

slite/api

Source

api.lisp (file)

Methods
Method: rem-test (FRAMWORK (eql fiveam)) NAME PACKAGE
Source

fiveam.lisp (file)

Method: rem-test FRAMEWORK NAME PACKAGE around
Source

slite.lisp (file)

Generic Function: remove-test ENGINE NAME PACKAGE
Package

slite

Source

slite.lisp (file)

Generic Function: rerun-in-debugger FRAMEWORK NAME PACKAGE
Package

slite/api

Source

api.lisp (file)

Methods
Method: rerun-in-debugger (FRAMEWORK (eql fiveam)) NAME PACKAGE
Source

fiveam.lisp (file)

Method: rerun-in-debugger FRAMEWORK NAME PACKAGE around
Source

slite.lisp (file)

Generic Function: rerun-in-debugger-impl ENGINE NAME PACKAGE
Package

slite

Source

slite.lisp (file)

Generic Function: run-all-fiveam-tests ()
Package

slite

Methods
Method: run-all-fiveam-tests ()
Source

fiveam.lisp (file)

Generic Function: test-case TEST-RESULT
Package

slite

Source

slite.lisp (file)

Methods
Method: test-case (RESULT test-result)
Source

fiveam.lisp (file)

Generic Function: test-case-package RESULT
Package

slite

Source

slite.lisp (file)

Methods
Method: test-case-package (TEST-CASE test-case)
Source

fiveam.lisp (file)

Generic Function: test-expression RESULT
Package

slite

Source

slite.lisp (file)

Methods
Method: test-expression (RESULT test-result)
Source

fiveam.lisp (file)

Generic Function: test-message RESULT
Package

slite

Source

slite.lisp (file)

Methods
Method: test-message (RESULT test-result)
Source

fiveam.lisp (file)

Generic Function: test-name TEST-CASE
Package

slite

Source

slite.lisp (file)

Methods
Method: test-name (TEST-CASE test-case)
Source

fiveam.lisp (file)

Generic Function: test-result-list RESPONSE
Package

slite

Source

slite.lisp (file)

Methods
Method: test-result-list (RESPONSE list)
Generic Function: test-result-success-p RESULT
Package

slite

Source

slite.lisp (file)

Methods
Method: test-result-success-p (RESULT test-result)
Source

fiveam.lisp (file)

Method: test-result-success-p (RESULT test-passed)
Source

fiveam.lisp (file)


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

5.1.4 Classes

Class: engine ()

An abstraction over the test framework to integrate with slite

Package

slite

Source

slite.lisp (file)

Direct superclasses

standard-object (class)


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

5.2 Internal definitions


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

5.2.1 Special variables

Special Variable: *last-results*

Stores the last test result. We’ll always store this just before rendering so that we can run actions on this, and the test results aren’t garbage collected in the meantime

Package

slite

Source

slite.lisp (file)


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

5.2.2 Functions

Function: ensure-safe-for-sl* X

If we send a bad object over the wire, SLY/SLIME can go into a bad state, so let’s get rid of it early

Package

slite

Source

slite.lisp (file)

Function: guess-fiveam RESULT
Package

slite/fiveam

Source

fiveam.lisp (file)

Function: serialize-result RESULT
Package

slite

Source

slite.lisp (file)


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

5.2.3 Generic functions

Generic Function: get-test-case-details TEST-CASE
Package

slite

Methods
Method: get-test-case-details TEST-CASE
Source

slite.lisp (file)

Generic Function: process-results RESULTS
Package

slite

Methods
Method: process-results RESULTS
Source

slite.lisp (file)


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   F   L   S  
Index Entry  Section

F
File, Lisp, slite.asd: The slite․asd file
File, Lisp, slite/api.lisp: The slite/api․lisp file
File, Lisp, slite/fiveam.lisp: The slite/fiveam․lisp file
File, Lisp, slite/slite.lisp: The slite/slite․lisp file

L
Lisp File, slite.asd: The slite․asd file
Lisp File, slite/api.lisp: The slite/api․lisp file
Lisp File, slite/fiveam.lisp: The slite/fiveam․lisp file
Lisp File, slite/slite.lisp: The slite/slite․lisp file

S
slite.asd: The slite․asd file
slite/api.lisp: The slite/api․lisp file
slite/fiveam.lisp: The slite/fiveam․lisp file
slite/slite.lisp: The slite/slite․lisp file

Jump to:   F   L   S  

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

A.2 Functions

Jump to:   E   F   G   M   O   P   R   S   T  
Index Entry  Section

E
ensure-safe-for-sl*: Internal functions

F
Function, ensure-safe-for-sl*: Internal functions
Function, guess-fiveam: Internal functions
Function, guess-framework: Exported functions
Function, on-pass: Exported functions
Function, serialize-result: Internal functions

G
Generic Function, get-test-case-details: Internal generic functions
Generic Function, process-results: Internal generic functions
Generic Function, rem-test: Exported generic functions
Generic Function, remove-test: Exported generic functions
Generic Function, rerun-in-debugger: Exported generic functions
Generic Function, rerun-in-debugger-impl: Exported generic functions
Generic Function, run-all-fiveam-tests: Exported generic functions
Generic Function, test-case: Exported generic functions
Generic Function, test-case-package: Exported generic functions
Generic Function, test-expression: Exported generic functions
Generic Function, test-message: Exported generic functions
Generic Function, test-name: Exported generic functions
Generic Function, test-result-list: Exported generic functions
Generic Function, test-result-success-p: Exported generic functions
get-test-case-details: Internal generic functions
get-test-case-details: Internal generic functions
guess-fiveam: Internal functions
guess-framework: Exported functions

M
Method, get-test-case-details: Internal generic functions
Method, process-results: Internal generic functions
Method, rem-test: Exported generic functions
Method, rem-test: Exported generic functions
Method, rerun-in-debugger: Exported generic functions
Method, rerun-in-debugger: Exported generic functions
Method, run-all-fiveam-tests: Exported generic functions
Method, test-case: Exported generic functions
Method, test-case-package: Exported generic functions
Method, test-expression: Exported generic functions
Method, test-message: Exported generic functions
Method, test-name: Exported generic functions
Method, test-result-list: Exported generic functions
Method, test-result-success-p: Exported generic functions
Method, test-result-success-p: Exported generic functions

O
on-pass: Exported functions

P
process-results: Internal generic functions
process-results: Internal generic functions

R
rem-test: Exported generic functions
rem-test: Exported generic functions
rem-test: Exported generic functions
remove-test: Exported generic functions
rerun-in-debugger: Exported generic functions
rerun-in-debugger: Exported generic functions
rerun-in-debugger: Exported generic functions
rerun-in-debugger-impl: Exported generic functions
run-all-fiveam-tests: Exported generic functions
run-all-fiveam-tests: Exported generic functions

S
serialize-result: Internal functions

T
test-case: Exported generic functions
test-case: Exported generic functions
test-case-package: Exported generic functions
test-case-package: Exported generic functions
test-expression: Exported generic functions
test-expression: Exported generic functions
test-message: Exported generic functions
test-message: Exported generic functions
test-name: Exported generic functions
test-name: Exported generic functions
test-result-list: Exported generic functions
test-result-list: Exported generic functions
test-result-success-p: Exported generic functions
test-result-success-p: Exported generic functions
test-result-success-p: Exported generic functions

Jump to:   E   F   G   M   O   P   R   S   T  

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

A.3 Variables

Jump to:   *  
S  
Index Entry  Section

*
*engine*: Exported special variables
*framework-guessors*: Exported special variables
*last-results*: Internal special variables

S
Special Variable, *engine*: Exported special variables
Special Variable, *framework-guessors*: Exported special variables
Special Variable, *last-results*: Internal special variables

Jump to:   *  
S  

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

A.4 Data types

Jump to:   C   E   P   S  
Index Entry  Section

C
Class, engine: Exported classes

E
engine: Exported classes

P
Package, slite: The slite package
Package, slite/api: The slite/api package
Package, slite/fiveam: The slite/fiveam package

S
slite: The slite system
slite: The slite package
slite/api: The slite/api package
slite/fiveam: The slite/fiveam package
System, slite: The slite system

Jump to:   C   E   P   S