From 68493e6981ae0a6a2f28c1186144ae63ce97ed19 Mon Sep 17 00:00:00 2001 From: Dariusz Depta Date: Fri, 20 Dec 2024 10:55:25 +0100 Subject: [PATCH] Added summary after describing testing process. --- .../getting-started/writing-tests/_meta.json | 3 +- .../writing-tests/writing-tests-summary.mdx | 46 +++++++++++++++++++ .../writing-tests/writing-tests-sylvia.mdx | 2 +- 3 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 src/pages/cw-multi-test/getting-started/writing-tests/writing-tests-summary.mdx diff --git a/src/pages/cw-multi-test/getting-started/writing-tests/_meta.json b/src/pages/cw-multi-test/getting-started/writing-tests/_meta.json index b3278ea0..5f35308f 100644 --- a/src/pages/cw-multi-test/getting-started/writing-tests/_meta.json +++ b/src/pages/cw-multi-test/getting-started/writing-tests/_meta.json @@ -1,4 +1,5 @@ { "writing-tests-cosmwasm": "CosmWasm", - "writing-tests-sylvia": "Sylvia" + "writing-tests-sylvia": "Sylvia", + "writing-tests-summary": "Summary" } diff --git a/src/pages/cw-multi-test/getting-started/writing-tests/writing-tests-summary.mdx b/src/pages/cw-multi-test/getting-started/writing-tests/writing-tests-summary.mdx new file mode 100644 index 00000000..2e46a715 --- /dev/null +++ b/src/pages/cw-multi-test/getting-started/writing-tests/writing-tests-summary.mdx @@ -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: + + + ### 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. + + + + + 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. + diff --git a/src/pages/cw-multi-test/getting-started/writing-tests/writing-tests-sylvia.mdx b/src/pages/cw-multi-test/getting-started/writing-tests/writing-tests-sylvia.mdx index 9ca01574..3a2d9496 100644 --- a/src/pages/cw-multi-test/getting-started/writing-tests/writing-tests-sylvia.mdx +++ b/src/pages/cw-multi-test/getting-started/writing-tests/writing-tests-sylvia.mdx @@ -1,5 +1,5 @@ --- -tags: ["multitest", "getting started", "tests", "CosmWasm"] +tags: ["multitest", "getting started", "tests", "Sylvia"] --- import { Callout, Card, Cards, Steps } from "nextra/components";