wavefnd / wavefnd/Wave

Add expected stdout and stderr fixtures to wave-test metadata

Open
#369 0 comments 0 reactions 0 assignees View on GitHub
enhancement good first issue needs testing
Dominant language
Rust
Stars
53
Forks
16
Avg merge
4h 22m
Merged PRs (30d)
46

Description

## Problem

The Wave E2E runner can validate exit status and compiled artifacts, but successful native tests are not able to declare their expected stdout or stderr. Output regressions may therefore pass as long as the process exits successfully and does not match a generic failure pattern.

## Proposed contract

Support fixture-backed metadata such as:

```wave
// wave-test: stdout-file=expected/hello.stdout, stderr-file=expected/hello.stderr
```

## Scope

- Add optional stdout/stderr fixture fields to `TestMetadata`.
- Resolve paths under a documented test fixture root.
- Reject absolute paths and path traversal.
- Compare exact UTF-8 output after documenting newline behavior.
- Show a readable diff on mismatch.
- Add metadata parser and runner unit tests.
- Migrate at least two stable E2E cases.

## Completion criteria

- [ ] Output contracts are optional and do not affect existing tests.
- [ ] Mismatches fail with expected/actual context.
- [ ] Empty output can be asserted explicitly.
- [ ] JSON test reports record output-contract failures.
- [ ] The metadata guide in #357 is updated.

Contributor guide

Open the contributing guide

Research direction

Start by locating TestMetadata, the metadata parser, and the E2E runner, then inspect existing metadata and stable E2E cases. Read the metadata guide from #357 and the parser/runner unit tests; done means optional safe fixture paths, exact output checks with readable diffs, JSON failure reporting, migrated cases, and updated documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.