GithubHelp home page GithubHelp logo

e2e-tests's Introduction

e2e-tests

End to end tests for Acala and Karura.

Tests are powered by Chopsticks to always run with latest mainnet block.

Running tests

All tests: yarn test

Run one test only: yarn test ./tests/xcm-transfer/kusama-relay.test.ts

Or you can just use a keywork since it is using vitest and use regex to find tests: yarn test xcm

Environment variables

  • {NETWORK_NAME}_BLOCK_NUMBER - block number to run tests against
  • {NETWORK_NAME}_ENDPOINT - endpoint to connect to
  • DB_URL - path to db file for caching

Example .env file

POLKADOT_BLOCK_NUMBER=15052153
KUSAMA_BLOCK_NUMBER=17443980
POLKADOT9420_BLOCK_NUMBER=15052153
KUSAMA9420_BLOCK_NUMBER=17443980
STATEMINT_BLOCK_NUMBER=3609016
STATEMINE_BLOCK_NUMBER=4263656
ACALA_BLOCK_NUMBER=3342960
KARURA_BLOCK_NUMBER=4103523
ACALA2160_BLOCK_NUMBER=3342960
KARURA2160_BLOCK_NUMBER=4103523
MOONBEAM_BLOCK_NUMBER=3334880
MOONRIVER_BLOCK_NUMBER=4017536
HYDRADX_BLOCK_NUMBER=2328334
BASILISK_BLOCK_NUMBER=3144786

ACALA_ENDPOINT=ws://0.0.0.0:9000
ACALA2160_ENDPOINT=ws://0.0.0.0:9000
KARURA_ENDPOINT=ws://0.0.0.0:9001
KARURA2160_ENDPOINT=ws://0.0.0.0:9001
KUSAMA_ENDPOINT=ws://0.0.0.0:9002
KUSAMA9420_ENDPOINT=ws://0.0.0.0:9002
POLKADOT_ENDPOINT=ws://0.0.0.0:9003
POLKADOT9420_ENDPOINT=ws://0.0.0.0:9003
STATEMINE_ENDPOINT=ws://0.0.0.0:9004
STATEMINT_ENDPOINT=ws://0.0.0.0:9005
BASILISK_ENDPOINT=ws://0.0.0.0:9006
HYDRADX_ENDPOINT=ws://0.0.0.0:9007
MOONBREAM_ENDPOINT=ws://0.0.0.0:9008
MOONRIVER_ENDPOINT=ws://0.0.0.0:9009
ASTAR_ENDPOINT=ws://0.0.0.0:9010
SHIDEN_ENDPOINT=ws://0.0.0.0:9011
CENTRIFUGE_ENDPOINT=ws://0.0.0.0:9012
ALTAIR_ENDPOINT=ws://0.0.0.0:9013

DB_PATH=./db.sqlite

Use specific block number for tests and db cache can signficantly improve test running speed.

Run yarn update-env to update .env file with latest block number.

To debug failing tests on CI, find the block number config from CI log and put them in .env to run the test with the same block height.

Use Subway to catch RPC responses

Use subway to run local endpoints to catch RPC responses for additonal improved test running speed.

  • Install Subway: cargo install --git https://github.com/AcalaNetwork/subway.git
  • Run: ./scripts/run-all.sh

To do

  1. Enhance XCM tests by using Bridge SDK in additonal to Polkadot.js

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.