input-output-hk / quickcheck-contractmodel

Adversary testing of your plutus contract
Apache License 2.0
7 stars 9 forks source link

Initial attempt at connecting to negative testing in quickcheck-dynamic #23

Closed MaximilianAlgehed closed 1 year ago

MaximilianAlgehed commented 1 year ago

We've developed some pretty strong negative testing functionality for quickcheck-dynamic and I'm trying to hook it up with quickcheck-contractmodel.

I seem to recall @Ali-Hill saying that you have some nice example you want to try this out on? Perhaps if you try to use this functionality to run negative testing there we can test out and debug this before I try to merge it?

The interface is really simple, you can now optionally define a validFailingAction callback that says "if you perform this action it should have no effect on the state of the blockchain". That action is then a negative action and it having no effect is checked by not running the nextState function for this action while still running perform. There are some extra features whereby you can fine-tune this if you want. But if you start off with this I think it will be enough to check if it's fit for purpose.