Skip to content

Commit 9e7fbb4

Browse files
committed
e2e testing docs
1 parent 1fa2396 commit 9e7fbb4

File tree

1 file changed

+13
-24
lines changed

1 file changed

+13
-24
lines changed

documentation/e2e-tests.md

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,24 @@
11
# E2E Testing
22

3-
To run E2E tests locally, run the `avash_avalanchejs_e2e.sh` script and pass in two arguments. The first is your full working directory of your Avash directory, and the second is the full working directory of your AvalancheJS directory.
3+
We can do the end-to-end testing for the latest AvalancheJS by setting up a local Avalanche network and running the `e2e_tests` in the root directory.
44

5-
`./avash_avalanchejs_e2e.sh "<avash dir>" "<avalanchejs dir>"`
5+
## Setup Local Avalanche Network
66

7-
For example,
7+
For testing end to end, you need to have a local network running. This can easily be achieved by using Avalanche Network Runner. You can follow the steps [here](https://docs.avax.network/quickstart/network-runner) to setup a local network.
88

9-
`./avash_avalanchejs_e2e.sh "/path/to/avash/" "/path/to/avalanchejs/"`
9+
## Setup Environment Variables
1010

11-
This script runs the five node script by default.
11+
You need to add IP and PORT of the node running the local network to your environment variables. Run the following command according to your setup:
1212

13-
- New E2E tests go in the /e2e_tests/ directory.
14-
15-
Follow the steps below if you do not wish to use the five node script, but instead test against one of the nodes. You provide the PORT of the specified node.
16-
17-
## Avash
18-
19-
This option does not require executing a docker container, but it may not lead to the same results of CI, depending on the branch, version, and configuration options of the nodes executed by avash.
20-
21-
* Launch `avash`
22-
* Set env vars `AVALANCHEGO_IP`, `AVALANCHEGO_PORT` to point to one of the nodes of avash
23-
* From avalanchejs dir execute: `yarn test -i --roots e2e_tests`
13+
```bash
14+
AVALANCHEGO_IP=0.0.0.0
15+
AVALANCHEGO_PORT=9650
16+
```
2417

25-
Example workflow
18+
## Run Tests
2619

27-
```zsh
28-
cd /path/to/avash
29-
./avash
30-
avash> runscript scripts/five_node_staking.lua
20+
The following command will start the E2E testing
3121

32-
# Open another terminal tab/window
33-
cd /path/to/avalanchejs
34-
AVALANCHEGO_IP=localhost AVALANCHEGO_PORT=9650 yarn test -i --roots e2e_tests
22+
```
23+
yarn test -i --roots e2e_tests
3524
```

0 commit comments

Comments
 (0)