-
-
Notifications
You must be signed in to change notification settings - Fork 108
Add TUnit.FsCheck library #4181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| #pragma warning disable IL2046 // RequiresUnreferencedCode attribute mismatch | ||
| #pragma warning disable IL3051 // RequiresDynamicCode attribute mismatch | ||
| #pragma warning disable IL2072 // DynamicallyAccessedMembers warning | ||
| public class FsCheckPropertyTestExecutor : ITestExecutor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is pretty cool - I was wondering if someone could give property based testing a go.
Did you give creating a custom data attribute a go at all? Wondering what that'd look like too. Might just fill up the IDE a lot.
SummaryAdds TUnit.FsCheck library with property-based testing support, extending the test discovery to support custom test attributes inheriting from BaseTestAttribute. Critical Issues1. AOT Compatibility - Missing [DynamicallyAccessedMembers] Annotations
|
SummaryThis PR adds a new TUnit.FsCheck library that provides property-based testing support using FsCheck, allowing tests to be run with automatically generated input values. Critical Issues1. AOT Compatibility - Missing
|
|
I realise that I made this way more complicated that it needed to be 😅 should be a bit simpler now |
SummaryAdds TUnit.FsCheck library for property-based testing integration with FsCheck. Critical Issues1. AOT Compatibility Violation - Missing Proper Annotations
|

Description
I've had a go at adding
TUnit.FsCheck, with some tweaks to the core to better support this extensibility.I'm opening as a draft for visibility, but will properly fill out the checklist below when it's ready.
Related Issue
Fixes #
Type of Change
Checklist
Required
TUnit-Specific Requirements
TUnit.Core.SourceGenerator)TUnit.Engine)TUnit.Core.SourceGenerator.Testsand/orTUnit.PublicAPItests.received.txtfiles and accepted them as.verified.txt.verified.txtfiles[DynamicallyAccessedMembers]annotationsdotnet publish -p:PublishAot=trueTesting
dotnet test)Additional Notes