Skip to content

Step-based DSL for E2E Tests with structured summary and cross-platform logging #63

@piotr-iohk

Description

@piotr-iohk

Our current E2E tests are long, imperative, and difficult to understand sequentially. We want to improve readability, debugability, and CI observability without adopting full Gherkin or managing separate .feature files.

Requirements

  1. Step-Based DSL
    • Implement a utility step(description, fn) that wraps test actions.
    • Each step should:
    • Increase a global or scoped step counter
    • Execute the provided function
    • Log start and end of the step
    • Log failure with context
    • Tests should read as a series of narrative steps, improving readability.

  2. Automatic Step Summary Generation
    • Before a test runs, generate a numbered list of all steps (e.g., “1. Accept TOS”, “2. Restore wallet”).
    • The summary should be easily readable (multiline string or array).
    • Print the full step summary at the start of each test.

  3. Cross-Platform Step Logging (Android + iOS)
    • Android: Write step logs into logcat using:
    mobile: shell log -t E2ETest "<msg>"
    • iOS Simulator: Write step logs into simulator logs using:
    mobile: execute → console.log("<msg>")
    • Logs must appear in:
    • Android logcat output
    • iOS simulator system logs
    • CI job logs

  4. Optional Inline Documentation
    • Consider adding a block comment at the top of each test summarizing the steps.
    • This should match the automatically generated summary to avoid divergence.

  5. Refactor Existing E2E Tests to Use the New DSL
    • Apply the DSL to all onboarding tests first.
    • Ensure logs and summaries appear correctly in both Android and iOS runs.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions