# Test frameworks and utilities for Polkadot and friends

**URL:** <https://forum.polkadot.network/t/test-frameworks-and-utilities-for-polkadot-and-friends/2612>\
**Category:** Tech Talk\
**Created:** [April 14, 2023, 1:27pm UTC](https://forum.polkadot.network/t/test-frameworks-and-utilities-for-polkadot-and-friends/2612 "2023-04-14T13:27:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![s3krit](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.polkadot.network/s3krit/32/1597_2.png) [@s3krit](https://forum.polkadot.network/u/s3krit)\
**Post date:** [April 14, 2023, 1:27pm UTC](https://forum.polkadot.network/t/test-frameworks-and-utilities-for-polkadot-and-friends/2612/1 "2023-04-14T13:27:06Z")

</div>

As our ecosystem grows and many teams have needs for testing their work that often overlap (at least partially), I am interested in compiling a list of tools, utilities and frameworks that either already exist, or are actively being developed that can be used for performing testing and QA of runtimes, clients, and everything else!

If you are working on, or know of, any tools and projects not mentioned below please comment with a link to the tool and ideally a short description, so I can add them to the list. It can be focusing on a single project, or a more generic tool. Anything goes!

- Zombienet
  - [GitHub - paritytech/zombienet: A cli tool to easily spawn ephemeral Polkadot/Substrate networks and perform tests against them.](https://github.com/paritytech/zombienet/)
  - Zombienet aims to be a testing framework for Substrate based blockchains, providing a simple **cli** tool that allows users to spawn and test ephemeral networks. Tests can be written in a DSL or JS (with polkadot.js)

- try-runtime
  - [https://docs.substrate.io/reference/command-line-tools/try-runtime/](https://docs.substrate.io/reference/command-line-tools/try-runtime/)
  - A tool that allows you to write tests against snapshots of runtime state

- Trappist
  - [GitHub - paritytech/trappist](https://github.com/paritytech/trappist)
  - A set of tools/playground focusing on testing cross-chain functionality

- Chopsticks
  - [GitHub - AcalaNetwork/chopsticks: Create parallel reality of your Substrate network.](https://github.com/AcalaNetwork/chopsticks)
  - Create a parallel reality of a live chain, and optionally set storage of your new chain for testing

- Acala’s e2e tests
  - [GitHub - AcalaNetwork/e2e-tests](https://github.com/AcalaNetwork/e2e-tests)
  - Great example of some really nicely-written e2e tests testing a variety of cross-chain functionality

- parachain-launch
  - [GitHub - open-web3-stack/parachain-launch: Tool to generate docker-compose.yml to launch a full relaychain - parachain testnet.](https://github.com/open-web3-stack/parachain-launch)

---

<div class="post-metadata">

**Author:** ![NachoPal](https://avatars.discourse-cdn.com/v4/letter/n/51bf81/32.png) [@NachoPal](https://forum.polkadot.network/u/NachoPal)\
**Post date:** [April 14, 2023, 3:11pm UTC](https://forum.polkadot.network/t/test-frameworks-and-utilities-for-polkadot-and-friends/2612/2 "2023-04-14T15:11:10Z")

</div>

- Parachains Integration Tests
  - [GitHub - paritytech/parachains-integration-tests: Tool to make Parachains integrations tests development easier and faster](https://github.com/paritytech/parachains-integration-tests)
  - [@parity/parachains-integration-tests - npm](https://www.npmjs.com/package/@parity/parachains-integration-tests)
  - For writing e2e test in yaml format, abstracting Mocha, Chia and Polkadot JS API implementations. It can connect to Zombienet or to any other testnet of your choice.

---

<div class="post-metadata">

**Author:** ![xlc](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.polkadot.network/xlc/32/690_2.png) [@xlc](https://forum.polkadot.network/u/xlc)\
**Post date:** [April 16, 2023, 11:43am UTC](https://forum.polkadot.network/t/test-frameworks-and-utilities-for-polkadot-and-friends/2612/3 "2023-04-16T11:43:03Z")

</div>

For XCM tests

- XCM simulator
  - Test XCM code with mock runtime
  - [polkadot/xcm/xcm-simulator at master · paritytech/polkadot · GitHub](https://github.com/paritytech/polkadot/tree/master/xcm/xcm-simulator)

- XCM emulator
  - Test XCM code with real runtime
  - [xcm-simulator/xcm-emulator at master · shaunxw/xcm-simulator · GitHub](https://github.com/shaunxw/xcm-simulator/tree/master/xcm-emulator)
  - Also [WIP PR](https://github.com/paritytech/cumulus/pull/2447) to merge this into Cumulus

---

<div class="post-metadata">

**Author:** ![tomaka](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.polkadot.network/tomaka/32/286_2.png) [@tomaka](https://forum.polkadot.network/u/tomaka)\
**Post date:** [April 17, 2023, 10:09am UTC](https://forum.polkadot.network/t/test-frameworks-and-utilities-for-polkadot-and-friends/2612/4 "2023-04-17T10:09:27Z")

</div>

As I’ve mentioned in [my latest smoldot treasury proposal](https://docs.google.com/document/d/1iYOIe_pyOdnV27hUA6FToWVSs7uUNHxIm5bA3KrMAE8/edit#), feel free to open issues/discussions in the smoldot repository if you need some specialized tools.

Examples that I have in mind: a tool that prints the runtime spec of a runtime blob, a DHT crawler (that enumerates all nodes on the network), a tool that prints the list of all validators that register themselves with authority-discovery, a tool that prints the PeerId and version of a node given an IP+port, a tool that prints the IP+port of a PeerId, etc.  
Some of these examples would require a lot of efforts though, but they’re all theoretically feasible.

Given that smoldot has been designed to run in the browser, there’s the possibility to create a web page that proposes these tools, which is generally a better UX compared to having to compile some Rust source code.

However, since it’s efforts, I’d prefer to work on this only if there’s an actual demand, and not create these tools only for them to not be used.
