Skip to content

Commit

Permalink
Added global links.
Browse files Browse the repository at this point in the history
  • Loading branch information
DariuszDepta committed Aug 7, 2024
1 parent 52ecd6e commit 5129f7a
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 18 deletions.
21 changes: 13 additions & 8 deletions src/pages/cw-multi-test.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,35 @@ tags: ["multitest"]

import { Callout } from "nextra/components";

[file an issue]: https://github.com/CosmWasm/cw-multi-test/issues

# Introduction

**`MultiTest`** is a suite of testing tools designed for facilitating multi-contract interactions
within the CosmWasm ecosystem. Its primary focus is on providing developers with a robust framework
for testing complex contract interactions and several Cosmos modules operations.
for testing complex smart contract interactions and several Cosmos modules operations.

<Callout type="info">
MultiTest is a **simulator** of the blockchain, allowing tested smart contracts to interact as if
they were operating on the real-life blockchain.
**`MultiTest`** is a **SIMULATOR** of the blockchain, allowing tested smart contracts to interact
as if they were operating on the real-life blockchain.
</Callout>

The most valuable advantage of using **`MultiTest`** is that it allows you to test and debug smart
contracts with access to Rust source code, eliminating the need to run a complete blockchain node to
begin designing smart contract functionality.

The disadvantage is that **`MultiTest`** is a blockchain simulator, and it is possible that the
behavior of the real-life blockchain may slightly differ in edge cases from the simulated model. In
such cases, we strongly encourage you to
[file an issue](https://github.com/CosmWasm/cw-multi-test/issues) with a detailed description of the
use case to help us improve **`MultiTest`**.
The disadvantage is that **`MultiTest`** is a blockchain **SIMULATOR**, and it is possible that the
behavior of the real-life blockchain may slightly differ in some edge cases from the simulated
model. In such cases, we strongly encourage you to [file an issue] with a detailed description of
the use case to help us improve **`MultiTest`**.

In the upcoming chapters, we will provide detailed instructions on installing and getting started
with **`MultiTest`**, writing unit tests for smart contracts, testing complex interactions between
smart contracts and testing smart contract interactions with Cosmos modules.

By the end of these chapters, you will have a comprehensive understanding of using **`MultiTest`**
for testing and debugging smart contracts in various scenarios.

<Callout>
To successfully follow the upcoming chapters, a basic knowledge of Rust and Cargo is required.
</Callout>
29 changes: 19 additions & 10 deletions src/pages/cw-multi-test/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,41 @@ tags: ["multitest", "installation"]

import { Callout } from "nextra/components";

[rustup installer]: https://rustup.rs
[Rust and Cargo]: https://www.rust-lang.org/tools/install
[Tarpaulin]: https://github.com/xd009642/tarpaulin
[Nextest]: https://nexte.st
[cw-multi-test]: https://crates.io/crates/cw-multi-test

# Installation

**`MultiTest`** ships as a Rust library named
[cw-multi-test](https://crates.io/crates/cw-multi-test).
**`MultiTest`** ships as a Rust library named [cw-multi-test].

To use **`MultiTest`** for building and testing smart contracts, add it as a **development
dependency** to your project:
To use **`MultiTest`** for testing smart contracts, add it as a **development dependency** to your
project:

```toml filename="Cargo.toml"
[dev-dependencies]
cw-multi-test = "2"
```

<Callout emoji="🚨">
**`MultiTest`** is a _**testing**_ library and should always be added to your project as
**`MultiTest`** is a **TESTING** library and should always be added to your project as
**DEVELOPMENT DEPENDENCY** in section **`[dev-dependencies]`** of the **Cargo.toml** file.
</Callout>

### Prerequisities

The only prerequisite to build and test smart contracts using **`MultiTest`** is having
[Rust and Cargo](https://www.rust-lang.org/tools/install) installed.
The only prerequisite to test smart contracts using **`MultiTest`** is having [Rust and Cargo]
installed.

<Callout>
We recommend installing Rust using the official [rustup installer]. This makes it easy to stay on
the most recent Rust version.
</Callout>

Optionally, you may want to install [Tarpaulin](https://github.com/xd009642/tarpaulin) for measuring
code coverage and [Nextest](https://nexte.st) for running tests faster, with clean and beautiful
user interface.
Optionally, you may want to install [Tarpaulin] for measuring code coverage and [Nextest] for
running tests faster, with clean and beautiful user interface.

Installing **Tarpaulin**:

Expand Down

0 comments on commit 5129f7a

Please sign in to comment.