This site requires Javascript to be enabled.

Installation

MultiTest is as a Rust library named cw-multi-test, and is hosted on crates.io.

Usage

To use MultiTest in your project, simply add it as a development dependency to Cargo.toml file:

[dev-dependencies]cw-multi-test = "2"

MultiTest is a TESTING library and should ALWAYS be added to your project as a DEVELOPMENT DEPENDENCY in section [dev-dependencies] of the Cargo.toml file.


MultiTest IS NOT designed to be used in production code on a real-life blockchain.

Prerequisities

Rust and Cargo

The only prerequisite to test smart contracts using MultiTest is having Rust and Cargo installed.

We recommend installing Rust using the official rustup installer. This makes it easy to stay on the most recent version of Rust and Cargo.

Tarpaulin and cargo-nextest

Optionally, you may want to install Tarpaulin for measuring code coverage, and cargo-nextest for running tests faster with a clean and beautiful user interface.

Installing Tarpaulin:

cargo install cargo-tarpaulin

Installing cargo-nextest:

cargo install cargo-nextest