Cucumber.Compiler (Cucumber v0.9.0)

View Source

Compiles discovered features and steps into ExUnit test modules.

The compilation pipeline works as follows:

  1. Discovery finds all feature files and step definitions via Cucumber.Discovery
  2. For each feature file, a unique ExUnit test module is generated
  3. Module names are derived from the feature file path (e.g., test/features/auth.feature becomes Test.Features.AuthTest)
  4. Background steps become ExUnit setup blocks
  5. Each scenario becomes an ExUnit test block
  6. Scenario Outlines are expanded into individual scenarios using Examples data
  7. Tags from features and scenarios are mapped to ExUnit tags for filtering
  8. Hooks are wired into setup/teardown via Cucumber.Hooks

Summary

Functions

Compiles all discovered features into ExUnit test modules.

Functions

compile_features!(opts \\ [])

@spec compile_features!(keyword()) :: [module()]

Compiles all discovered features into ExUnit test modules.