Skip to content

[72.3] Conjecture.Xunit: invoke ReproFileBuilder on property failure#121

Merged
kommundsen merged 3 commits intomainfrom
feat/72-109-xunit-repro-export
Apr 10, 2026
Merged

[72.3] Conjecture.Xunit: invoke ReproFileBuilder on property failure#121
kommundsen merged 3 commits intomainfrom
feat/72-109-xunit-repro-export

Conversation

@kommundsen
Copy link
Copy Markdown
Owner

Description

Wires ExportReproOnFailure and ReproOutputPath end-to-end from [Property] attribute through to PropertyTestCaseRunner, which now writes a .cs repro file when a property test fails and the option is enabled. Also adds ReproFileBuilder.WriteToFile.

Type of change

  • New feature / strategy

Checklist

  • dotnet test src/ passes
  • New behavior is covered by tests (TDD: Red → Green → Refactor)
  • Follows .editorconfig code style

Closes #109
Part of #72

…tCaseRunner

- PropertyAttribute gains ExportReproOnFailure (bool, default false) and
  ReproOutputPath (string, default ".conjecture/repros/")
- PropertyTestCase carries both values through Serialize/Deserialize
- PropertyTestCaseDiscoverer reads them from the attribute and passes through
- PropertyTestCaseRunner wires them into ConjectureSettings; on failure with
  ExportReproOnFailure=true it constructs a ReproContext and calls
  ReproFileBuilder.WriteToFile — IO errors are logged and swallowed
- ReproFileBuilder gains WriteToFile(ReproContext, outputPath)
- Hooks are not applied to spawned agents
@kommundsen kommundsen merged commit 3e23746 into main Apr 10, 2026
1 check passed
@kommundsen kommundsen deleted the feat/72-109-xunit-repro-export branch April 10, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[72.3] Conjecture.Xunit: invoke ReproFileBuilder on property failure

1 participant