-
Notifications
You must be signed in to change notification settings - Fork 725
SIP-031 stateful property tests #6321
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
SIP-031 stateful property tests #6321
Conversation
|
@BowTiedRadone I pushed a 1-line change for the pox-4 tests - the |
|
@hstove thanks! I'm looking into the remaining failing tests. |
f223d26 to
2e3e92f
Compare
jcnelson
left a comment
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.
LGTM
2e3e92f to
6a2c90d
Compare
Added `sip-031.stateful.prop.test.ts`, with initial command set: Claim, ClaimErr, Mint, MintInitial, MineBlocks, UpdateRecipient, UpdateRecipientErr. Tests use fast-check's `modelRun` to verify sip-031.clar against a tracked model. Based on: - https://github.com/stacks-network/stacks-core/tree/a5587d13c51829f49a7645d9484469e5ca891e29/contrib/boot-contracts-stateful-prop-tests/tests/pox-4 - https://blog.nikosbaxevanis.com/2022/03/15/clarity-clarity-model-based-testing-primer/ - https://github.com/moodmosaic/counter-invariant-tests/tree/99c9987c446c74feb1acf970993214c7b2350b53/tests/counter !!! NOT A COMPLETE TEST SUITE !!!
Maybe there's a better way via clarigen, but not known at time of writing.
The constants were affected by the addition of wallet_10 for testing SIP-031.
6a2c90d to
225d25b
Compare
63f180e
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project status has failed because the head coverage (55.95%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage.
Additional details and impacted files@@ Coverage Diff @@
## develop #6321 +/- ##
============================================
- Coverage 80.79% 55.95% -24.85%
============================================
Files 541 541
Lines 347771 347771
============================================
- Hits 280993 194598 -86395
- Misses 66778 153173 +86395 see 421 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |


Ideally, these tests would live in
boot-contracts-stateful-prop-tests, butsip-031.test.ts(example-based tests) was placed incontrib/core-contract-tests, so this follows that pattern to avoid unnecessary git noise.Details on how to run the two test suites — outside-in stateful testing with Clarinet and fast-check, and inside-out with Rendezvous — will follow shortly.