The slite Reference Manual

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 4.0 beta 2 "William Riker" on Thu Sep 15 06:10:35 2022 GMT+0.

Table of Contents


1 Introduction

SLITE

tdrhq

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


2 Systems

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


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

2.1 slite

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

Author

Arnold Noronha <arnold@jipr.io>

License

Apache License, Version 2.0

Version

0.0.1

Dependencies
  • str (system).
  • fiveam (system).
Source

slite.asd.

Child Components

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   [Contents][Index]

3.1.1 slite/slite.asd

Source

slite.asd.

Parent Component

slite (system).

ASDF Systems

slite.


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

3.1.2 slite/api.lisp

Source

slite.asd.

Parent Component

slite (system).

Packages

slite/api.

Public Interface

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

3.1.3 slite/slite.lisp

Dependency

api.lisp (file).

Source

slite.asd.

Parent Component

slite (system).

Packages

slite.

Public Interface
Internals

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

3.1.4 slite/fiveam.lisp

Dependency

slite.lisp (file).

Source

slite.asd.

Parent Component

slite (system).

Packages

slite/fiveam.

Public Interface
Internals

guess-fiveam (function).


4 Packages

Packages are listed by definition order.


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

4.1 slite/api

Source

api.lisp.

Use List

common-lisp.

Public Interface

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

4.2 slite/fiveam

Source

fiveam.lisp.

Use List
  • alexandria.
  • common-lisp.
Internals

guess-fiveam (function).


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

4.3 slite

Source

slite.lisp.

Use List
  • alexandria.
  • common-lisp.
Public Interface
Internals

5 Definitions

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


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

5.1 Public Interface


5.1.1 Special variables

Special Variable: *engine*
Package

slite.

Source

slite.lisp.

Special Variable: *framework-guessors*
Package

slite/api.

Source

api.lisp.


5.1.2 Ordinary functions

Function: guess-framework (result)
Package

slite/api.

Source

api.lisp.

Function: on-pass (results &key shell)
Package

slite.

Source

slite.lisp.


5.1.3 Generic functions

Generic Function: rem-test (framework name package)
Package

slite/api.

Source

api.lisp.

Methods
Method: rem-test ((framwork (eql :fiveam)) name package)
Source

fiveam.lisp.

Method: rem-test :around (framework name package)
Source

slite.lisp.

Generic Function: remove-test (engine name package)
Package

slite.

Source

slite.lisp.

Generic Function: rerun-in-debugger (framework name package)
Package

slite/api.

Source

api.lisp.

Methods
Method: rerun-in-debugger ((framework (eql :fiveam)) name package)
Source

fiveam.lisp.

Method: rerun-in-debugger :around (framework name package)
Source

slite.lisp.

Generic Function: rerun-in-debugger-impl (engine name package)
Package

slite.

Source

slite.lisp.

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

slite.

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

fiveam.lisp.

Generic Function: test-case (test-result)
Package

slite.

Source

slite.lisp.

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

fiveam.lisp.

Generic Function: test-case-package (result)
Package

slite.

Source

slite.lisp.

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

fiveam.lisp.

Generic Function: test-expression (result)
Package

slite.

Source

slite.lisp.

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

fiveam.lisp.

Generic Function: test-message (result)
Package

slite.

Source

slite.lisp.

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

fiveam.lisp.

Generic Function: test-name (test-case)
Package

slite.

Source

slite.lisp.

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

fiveam.lisp.

Generic Function: test-result-list (response)
Package

slite.

Source

slite.lisp.

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

slite.

Source

slite.lisp.

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

fiveam.lisp.

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

fiveam.lisp.


5.1.4 Classes

Class: engine

An abstraction over the test framework to integrate with slite

Package

slite.

Source

slite.lisp.


5.2 Internals


Next: , Previous: , Up: Internals   [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.


5.2.2 Ordinary 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.

Function: guess-fiveam (result)
Package

slite/fiveam.

Source

fiveam.lisp.

Function: serialize-result (result)
Package

slite.

Source

slite.lisp.


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.

Generic Function: process-results (results)
Package

slite.

Methods
Method: process-results (results)
Source

slite.lisp.


Appendix A Indexes


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

A.1 Concepts


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*: Private ordinary functions

F
Function, ensure-safe-for-sl*: Private ordinary functions
Function, guess-fiveam: Private ordinary functions
Function, guess-framework: Public ordinary functions
Function, on-pass: Public ordinary functions
Function, serialize-result: Private ordinary functions

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

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

O
on-pass: Public ordinary functions

P
process-results: Private generic functions
process-results: Private generic functions

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

S
serialize-result: Private ordinary functions

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

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