Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Moonwall #315

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Add Moonwall #315

wants to merge 3 commits into from

Conversation

0xLucca
Copy link
Collaborator

@0xLucca 0xLucca commented Jan 21, 2025

This PR adds Moonwall e2e testing framework to Develop -> Toolkig -> Parachains -> E2E Testing -> Moonwall

@0xLucca 0xLucca requested a review from a team as a code owner January 21, 2025 19:42
@0xLucca 0xLucca added C1 - Medium Medium priority task A0 - New Content Pull request contains new content pages labels Jan 21, 2025
@0xLucca 0xLucca requested a review from a team January 21, 2025 19:42
- fork-chains
- e2e-testing
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- e2e-testing
- 'E2E Testing': e2e-testing

Otherwise, it renders as:
image

@@ -0,0 +1,7 @@
---
title: E2E Testing
description: TODO
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing desc


## Introduction

Moonwall is a end-to-end testing framework specifically designed for Polkadot SDK-based blockchain networks. It addresses one of the most significant challenges in blockchain development: managing complex test environments and network configurations.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unsure if "network configurations" would be 100% accurate here. Does moonwall allow us to test p2p settings and that kind of things?

Copy link
Collaborator

@nhussein11 nhussein11 Jan 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, maybe you meant something related to the moonwall.config.json file, but even though that file defines some parameters to bootstrap the node, I think the purpose of that file is to define the settings of the test suite

Moonwall can be installed either globally for system-wide access or locally within specific projects. This section covers both installation methods.

!!! note
his documentation corresponds to Moonwall version `{{ dependencies.moonwall.version }}`. Ensure you're using the matching version to avoid compatibility issues with the documented features.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
his documentation corresponds to Moonwall version `{{ dependencies.moonwall.version }}`. Ensure you're using the matching version to avoid compatibility issues with the documented features.
This documentation corresponds to Moonwall version `{{ dependencies.moonwall.version }}`. Ensure you're using the matching version to avoid compatibility issues with the documented features.

yarn global add @moonwall/cli@{{ dependencies.moonwall.version }}
```

Now, you should be able to run the `moonwall` command from your terminal.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you can add the output in a termynal element

!!!note
A provider is a tool that allows you or your application to connect to a blockchain network and simplifies the low-level details of the process. A provider handles submitting transactions, reading state, and more. For more information on available providers check the [Providers supported](https://moonsong-labs.github.io/moonwall/guide/intro/providers.html#providers-supported){target=\_blank} page.

Here's a complete configuration example for testing a local node using polkadot.js as a provider:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Here's a complete configuration example for testing a local node using polkadot.js as a provider:
Here's a complete configuration example for testing a local node using Polkadot.js as a provider:


## Writing Tests

Moonwall uses the `describeSuite` function to define test suites, like using [Mocha](https://mochajs.org/){target=\_blank}. Each test suite requires:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a link to add as a reference for describeSuite?


During setup, you'll be prompted for the following parameters:

- Label - identifies your test configuration
Copy link
Collaborator

@nhussein11 nhussein11 Jan 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the writing test section, you set the parameters using ``, and for consistency you should do the same here

@@ -14,6 +14,7 @@ This section explores essential tools for blockchain testing, forking live netwo

- [Use Zombienet to spawn a chain](/develop/toolkit/parachains/spawn-chains/zombienet/get-started/)
- [Use Chopsticks to fork a chain](/develop/toolkit/parachains/fork-chains/chopsticks/get-started/)
- [Use Moonwall to execute e2e testing](/develop/toolkit/parachains/e2e-testing/moonwall/)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- [Use Moonwall to execute e2e testing](/develop/toolkit/parachains/e2e-testing/moonwall/)
- [Use Moonwall to execute E2E testing](/develop/toolkit/parachains/e2e-testing/moonwall/)

Execute your tests using the Moonwall CLI command:

```bash
moonwall test INSERT_ENVIRONMENT_NAME_HERE
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a note below explaining this placeholder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A0 - New Content Pull request contains new content pages C1 - Medium Medium priority task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants