Testing and Debugging
Sui provides built-in tools for testing and debugging Move smart contracts at every stage of development.
Testing Move Smart Contracts
Learn about the available testing tools and frameworks for validating your Move smart contracts and Sui applications.
Troubleshooting Common Errors
Find solutions to common issues with addresses, transactions, and Move packages.
Related resources
- The Move Book — Testing - Language-level reference for
#[test],#[expected_failure], and#[test_only]attributes. - Scenario Testing example - Complete walkthrough of multi-transaction, multi-sender testing with
test_scenario, including access control, shared objects, and transaction effects inspection. - Move Trace Debugger - Step through Move execution traces line by line in VS Code to inspect variables, set breakpoints, and debug both unit tests and onchain transactions.
sui moveCLI reference - Full CLI reference for building, testing, and measuring coverage of Move packages.- Sui Stack Messaging test suite - Example of Move contract tests, SDK unit/integration tests, and E2E tests for a production Sui application.