Dream
The test language: the pages, the states a page can be in, the acts a person performs and the scenes that tie them together.
Every MLambda test is Dream
Dream
Dream (.dm) is the language for what a person does with an application. Its compiler turns a .dm into an
Aleph test package (page modules, scene suites and a test main) that aleph test runs. Every test in the
family is written in Dream: unit scenes of a service, the stories of a window, the acceptance run of a deployment.
Scenes
dream "ActivitiesModel"
library "Tsadi.Proofs"
scene "Activities: TypeOK holds"
when call tla "holds Scenes/Activities.tla TypeOK"
then value says "holds"
scene "Activities: TypeOK is proved (INV1)"
when call tla "always Scenes/Activities.tla TypeOK"
then value says "proved"
These scenes were written by Tsadi: they check that the CRM’s activities model, a TLA+ specification, holds its type invariant and that the invariant is proved. Tsadi writes scenes like these from a system’s model, and a person writes the stories a model cannot know.
What a scene can drive
- A browser, over W3C WebDriver.
- An HTTP API, a gateway’s routes and refusals.
- An Aleph library, called directly.
- A window, over Aphrodite’s automation door, clicking and typing as a person would.
- A model, through MLambda.Code’s TLA+ checker.
Everything in Dream is native Aleph and Hilbert: no Selenium, no xUnit, no MSBuild.