Sunny Side
Sunny Side is a minimal, pure-Lisp Gherkin engine that parses a .feature file and turns each Scenario into an ordinary FiveAM test, with no Ruby, no wire protocol, and no subprocess involved. A project's .feature file stays the human- and LLM-readable spec, and is also literally what runs, rather than documentation sitting next to a separately maintained test suite.
- Author: Tony Spencer
- License: BSD-3-Clause license
- Documentation: https://github.com/denzuko/sunny-side/blob/develop/README.md
- Source: https://github.com/denzuko/sunny-side/
Supported Gherkin subset
Feature, Background, Scenario, and Given/When/Then/And/ But steps, with #-comments and blank lines ignored.Not supported: Scenario Outline/Examples tables, data tables, doc strings, and tags. Adding support for any of these means extending the parser in src/sunny-side.lisp directly, since the parser is deliberately small and single-file, with no separate configuration surface to extend instead.
Installation
# edge repo qlot add sunny-side https://github.com/denzuko/sunny-side qlot install # ultralisp.org repo qlot exec ros -e '(ql:quickload :sunny-side)'
Usage
;; steps.lisp
(sunny-side:Given! "^a fresh counter$" ()
(setf *count* 0))
(sunny-side:When! "^I increment it$" ()
(incf *count*))
(sunny-side:Then! "^the count should be (\\d+)$" (expected)
(fiveam:is (= (parse-integer expected) *count*)))
(sunny-side:define-feature-tests
#.(asdf:system-relative-pathname :my-project "features/counter.feature")
:suite my-project-gherkin-suite)
(defun run-bdd ()
(fiveam:run! 'my-project-gherkin-suite))
The keyword a step is written under (Given, When, Then, And, or But) is cosmetic. Matching happens by regex text alone, the same way real Cucumber matches steps, so an And-continuation of a prior step matches whichever registered regex fits its text, not a type-specific one tied to the keyword above it.