Sui.

Post

Share your knowledge.

harry phan.
Jul 14, 2025
Expert Q&A

How sui move test coverage work ?

When testing your packages on Sui, check you test coverage to see what you missed

While 100% tested code does not guarantee that all conditions and edge cases have been tested correctly, coverage <100% indicates that you may have forgotten to test some cases

Run sui move test --coverage to generate the map

Then sui move coverage summary shows a recap of the proportion of code tested per module

sui move coverage summary --summarize-functions shows a recap of the proportion of code tested per function per module:

sui move coverage source --module <module_name> shows exactly what part of the code is untested per module

finally if you're a move warrior, sui move coverage bytecode --module <module_name> shows exactly what part of the bytecode is untested per module

  • Sui
2
7
Share
Comments
.

Answers

7
MoonBags.
Jul 21 2025, 08:26

Make sure to check your test coverage on Sui before finalizing your packages

7
Best Answer
Comments
.
Thorfin.
Sep 7 2025, 22:05

Absolutely, test coverage is super important for spotting gaps in your Sui Move tests. The sui move test --coverage command is your best friend here, letting you generate detailed reports to see exactly what you've missed, from module summaries to specific lines of untested code. It's a great way to improve your testing quality.

9
Comments
.
Meaning.Sui.
Jul 23 2025, 03:17

Thanks for the info.

5
Comments
.
BigSneh.
Jul 29 2025, 23:03

Thank you for this

3
Comments
.
SuiLover.
Jul 29 2025, 15:45

Gracias.. That's helpful

0
Comments
.

Do you know the answer?

Please log in and share it.