Runs Move Unit Tests for a Package

This will run Move unit tests against a package with debug mode turned on. Note that move code warnings currently block tests from running.


movement aptos move test [OPTIONS]


  • -f, --filter <FILTER> A filter string to determine which unit tests to run.

  • --ignore-compile-warnings A boolean value to skip warnings.

  • --dev Enables dev mode, which uses all dev-addresses and dev-dependencies. Dev mode allows for changing dependencies and addresses to the preset [dev-addresses] and [dev-dependencies] fields. This works both inside and out of tests for using preset values. Currently, it also additionally pulls in all test compilation artifacts.

  • --package-dir <PACKAGE_DIR> Path to a move package (the folder with a Move.toml file).

  • --output-dir <OUTPUT_DIR> Path to save the compiled move package. Defaults to <package_dir>/build.

  • --named-addresses <NAMED_ADDRESSES> Named addresses for the move binary. Example: alice=0x1234, bob=0x5678. Note: This will fail if there are duplicates in the Move.toml file remove those first. [default: ]

  • --skip-fetch-latest-git-deps Skip pulling the latest git dependencies. This will allow overriding this for local development.

  • --bytecode-version <BYTECODE_VERSION> Specify the version of the bytecode the compiler is going to emit.

  • -i, --instructions <instructions> The maximum number of instructions that can be executed by a test. If set, the number of instructions executed by one test will be bounded. [default: 100000]

  • --coverage Collect coverage information for later use with the various aptos move coverage subcommands.

  • --dump Dump storage state on failure.

Last updated