MystenLabs / sui

Sui, a next-generation smart contract platform with high throughput, low latency, and an asset-oriented programming model powered by the Move programming language
https://sui.io
Apache License 2.0
6.23k stars 11.2k forks source link

Design a testing framework for Move code #408

Closed lxfind closed 2 years ago

lxfind commented 2 years ago

One fundamental limitation in the way we program Move is that, often when you create a new object and transfer it to someone, that object is no longer accessible from Move in the same call. To test something an entire flow of Move code, we need to make several calls to Move (see the hero test in authority_tests). This is inconvenient and not an accessible way of testing application code for Move developers. We need to come up with a framework that allows Move developers to test that code fully within Move.

stella3d commented 2 years ago

Some non-exhaustive notes on Solidity contract testing frameworks I'm familiar with:

From these, i think we can see that:

huitseeker commented 2 years ago

Another important framework is OpenZepplin, which is the ancestor of DappTools/Foundry.

The audit report provides a nice overview.