Skip to main content

Testing and Debugging

Sui provides built-in tools for testing and debugging Move smart contracts at every stage of development.

  • 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 move CLI 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.