-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added summary to testing process (#215)
- Loading branch information
Showing
3 changed files
with
49 additions
and
2 deletions.
There are no files selected for viewing
3 changes: 2 additions & 1 deletion
3
src/pages/cw-multi-test/getting-started/writing-tests/_meta.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} |
46 changes: 46 additions & 0 deletions
46
src/pages/cw-multi-test/getting-started/writing-tests/writing-tests-summary.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
2 changes: 1 addition & 1 deletion
2
src/pages/cw-multi-test/getting-started/writing-tests/writing-tests-sylvia.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters