Skip to content

Commit

Permalink
Added summary to testing process (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
DariuszDepta authored Dec 20, 2024
2 parents fe39b0a + 68493e6 commit f26bb3f
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"writing-tests-cosmwasm": "CosmWasm",
"writing-tests-sylvia": "Sylvia"
"writing-tests-sylvia": "Sylvia",
"writing-tests-summary": "Summary"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
tags: ["multitest", "getting started", "tests", "summary"]
---

import { Callout, Steps } from "nextra/components";

[App]: ../../app
[AppBuilder]: ../../app-builder

# Summary

To summarize the process of writing tests with **`MultiTest`**, leveraging both pure CosmWasm
libraries and the Sylvia framework, let’s review the general structure of a test. High-quality tests
typically follow a series of common steps to ensure thorough validation and reliability.

By adhering to these structured steps, you can create maintainable and robust test suites that
effectively validate your CosmWasm contracts:

<Steps>
### Initialize the chain

🖝 Set up the blockchain simulator for testing.

### Store contract(s) on chain

🖝 Upload the contract(s) code to the chain.

### Instantiate contract(s)

🖝 Instantiate contract(s) with the desired initial state.

### Interact with contract(s)

🖝 Perform actions such as queries and executes on instantiated contract(s).

### Assert expected results

🖝 Verify the outcomes against expected values to confirm correct behavior.

</Steps>

<Callout>
While the detailed implementation of each step may vary depending on whether you are using pure
CosmWasm libraries or the Sylvia framework — and will also differ based on the specifics of the
test — the overall structure remains consistent, as outlined above.
</Callout>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
tags: ["multitest", "getting started", "tests", "CosmWasm"]
tags: ["multitest", "getting started", "tests", "Sylvia"]
---

import { Callout, Card, Cards, Steps } from "nextra/components";
Expand Down

0 comments on commit f26bb3f

Please sign in to comment.