aleeusgr / gimbalabs-dandelion-pbl

Test Driven Development of dApps on Cardano
MIT License
1 stars 1 forks source link

smart contract testing #18

Closed aleeusgr closed 1 year ago

aleeusgr commented 1 year ago

Discussion

Some input on how to test plutus contracts using a ContractModel. That is, use a QuickCheck model to automatically generate test cases for your plutus contract.

https://plutus-apps.readthedocs.io/en/latest/plutus/tutorials/contract-testing.html https://plutus-apps.readthedocs.io/en/latest/plutus/tutorials/contract-models.html

Note that you do not necessary need to use the contract monad in plutus-apps, even though the tutorials do use this for their testing approach. Just ping Quviq if you want to get automatic test case generation in a different setting.

aleeusgr commented 1 year ago

Sujeetha, R, and C. A. S Deiva Preetha. “A Literature Survey on Smart Contract Testing and Analysis for Smart Contract Based Blockchain Application Development.” In 2021 2nd International Conference on Smart Electronics and Communication (ICOSEC), 378–85. Trichy, India: IEEE, 2021. https://doi.org/10.1109/ICOSEC51865.2021.9591750.

https://en.wikipedia.org/wiki/Mutation_testing

aleeusgr commented 1 year ago

init

Plutus comes with a library for testing contracts using QuickCheck.

aleeusgr commented 1 year ago

https://github.com/aleeusgr/plutus-tests