-
Notifications
You must be signed in to change notification settings - Fork 74
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
Support for jqwik #189
Comments
We ended up showing @ragunathjawahar how to write the same test using CombinationApprovals, and thus did not add support for jqwik (yet). I'll bring the topic up next time when we maintainers get together. |
I'd also love to see jqwik support. I'd also be willing to contribute it. Is there a way to enhance framework support as some kind of plug-in? This could be the first step before getting it into the core of ApprovalTests. |
We currently get together on Mondays, 19:00 German time. If that suits you, I can send you an invite. :) |
Sure. Next Monday would be my last opportunity before vacation time. |
I sent the invite to [email protected] |
Thanks.
Am Mi., 3. Aug. 2022 um 11:59 Uhr schrieb Lars Eckart <
***@***.***>:
… I sent the invite to ***@***.***
—
Reply to this email directly, view it on GitHub
<#189 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAZMAISXMYHEKLUB4IUFG3VXI7G5ANCNFSM5D6ZLSJA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
For real jqwik support, however, jqwik's lifecycle must be considered. I'll have a look into that. |
I played around a bit and a first approach ended up using a per property lifecycle: /**
* Using this handmade lifecycle will check all values at the end,
* and only if the property succeeds otherwise.
*/
@Property(tries = 11, seed = "42")
@PerProperty(JqwikApprovals.class)
void strings(@ForAll @StringLength(5) @AlphaChars String s) {
JqwikApprovals.verify(s);
} It's not the best and most generic approach yet, but I think it proves that the approvals idea can be used within property-based testing. |
Just for reference, I have a small demo project for different test types. Before the release of approvals 18.0.0 I used an adapted copy of With PR 69 I purged the class mentioned and everything seems still to work fine using |
I assume this creates a file for each try? |
Right, so it does. So I guess this is what you want to prevent 😄 |
In the ideal world I'd like both:
I wonder if there's a way to do both without rewriting a lot of the verification logic of ApprovalTests. |
With #133 I suggested approvals to be working with jqwik but it doesn't (approvals version 12.1.1).
Only after adding jqwik's Property class to AttributeStackSelector's classNames my example test worked. Did I miss something?
The text was updated successfully, but these errors were encountered: