I’d like to announce the unit test library plutus-simple-model for plutus that is joy to use .
It’s simple and easy to grasp and it can estimate resource usage for TX (size and execution units).
Main idea is to implement simple blockchain model that updates UTXOs inside pure State monad if
TX is valid. To check TX cardano node functions are used so the check is
the same as if node would check it and it produce useful stats for resource usage.
Benefits comparing to EmulatorTrace to me:
- I find resource usage stats are useful to know in production and this is missing in Emulator tests
- EmulatorTrace approach makes it hard to query run-time information and with given lib it’s super easy
- Having to define separate API and use lookups/constraints seems clumsy to me. It often leads to writing lots of boiler plate code.
- it’s much faster to run
I’ve tested it successfully in one project and using it for the second one.
It has great docs and tutorial.
Enjoy! I hope it will improve your testing experience with plutus.