Changelog
View SourceAll notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[0.2.1] - 2026-07-27
Fixed
Restored the pre-0.2.0 step syntax. 0.2.0 replaced the implicit-context macros with explicit-context forms and removed the originals, breaking every project that had not migrated. Both forms now coexist — they are distinct arities, so no call site is ambiguous:
pre-0.2.0 (restored) 0.2.0 (still works) scenario "x", context doscenario "x" dogiven_ "y" do … endgiven_ "y", context do … {:ok, ctx} endsame for when_,and_,then_same for when_,and_,then_Implicit-context steps run their block for side effects and pass context through unchanged; they are not required to return
{:ok, context}.If you are on 0.2.0, upgrade to 0.2.1 — there is no reason to stay.
Added
test/spex/legacy_syntax_spex.exspinning both syntaxes, so the old forms cannot be dropped again without a failing test.
[0.2.0] - 2026-07-27
Added
- Reusable givens —
SexySpex.Givenswithregister_given/3. Shared givens become public functions on the defining module and are pulled into a spex file with a plain Elixirimport. - Boundary enforcement —
boundarydependency and theMix.Tasks.Compile.Spexcompiler, so spex files are checked against public interfaces at compile time. Seedocs/BOUNDARY_ENFORCEMENT.md. - Stale spex runs —
mix spex --staleruns only spex files that changed or that reference changed modules;--forceresets the tracking manifest. - JSONL failure output —
mix spex --jsonl [PATH]writes failures as JSONL (defaults tospex_failures.jsonl) for machine consumption. - Custom formatters —
mix spex --formatterto swap the ExUnit formatter. - Error log crash detection — spex runs surface crashes reported through the error logger rather than silently passing.
--traceand--slowest Npassthrough to ExUnit.
Changed
- BREAKING: context is passed as a function argument, matching ExUnit style,
instead of being threaded implicitly. Step bodies now take an explicit
contextargument and return{:ok, context}. - Output is quiet by default. The previous detailed Reporter output now
requires
--verbose.
Fixed
- Modifier keys use atoms rather than strings.
[0.1.0] - 2024-07-06
Added
- Initial release of Spex framework
- Given-When-Then DSL for executable specifications
- Built on ExUnit with AI-optimized features
Spex.Helpersmodule with semantic helper functionsmix spexcommand for running specifications- Manual mode with interactive step-by-step execution
- Built-in support for Scenic GUI testing
- Context flow between test steps
- Framework setup helpers for application lifecycle management
- Comprehensive documentation and examples
Features
- Core DSL:
spex,scenario,given_,when_,then_,and_macros - Semantic Helpers:
start_scenic_app/2,can_connect_to_scenic_mcp?/1,application_running?/1 - Manual Mode: Interactive testing with IEx shell integration
- Mix Integration: Dedicated
mix spexcommand with proper lifecycle management - GUI Testing: Built-in helpers for Scenic applications with MCP server integration
- Documentation: Comprehensive guides in
/docsdirectory
Architecture
- Built on ExUnit for reliability and compatibility
- Controlled execution environment via
mix spexonly - Automatic compilation and application lifecycle management
- Clean separation between framework and user code