Erebus is a practice testing framework designed to showcase automated tests for different parts of the Moralis web3 infrastructure. The framework uses Playwright for UI testing and integrates with various blockchain APIs for some end-to-end testing.
- Capability to automate UI & API with Playwright.
- Easy configuration using environment variables.
- Modular and reusable utility functions.
- Node.js (>= 14.x)
- npm (>= 6.x)
- (optional) Docker (latest)
- Clone the Repository:
git clone https://github.com/your-repo/erebus.git
cd erebus- Install Dependencies:
npm install- Set Up Environment Variables:
touch .envContent:
API_KEY=your-api-key
SEPOLIA_NODE_URL=your-sepolia-node-url
HOLESKY_NODE_URL=your-holesky-node-url
WALLET_ADDRESS=your-valid-wallet-address
MORALIS_USERNAME=your-email@example.com
MORALIS_PASSWORD=your-password
erebus/
├── docs/
├── src/
│ ├── utils/
│ └── config.ts
├── tests/
├── .env
├── .gitignore
├── .prettierrc
├── eslint.config.mjs
├── package.json
├── playwright.config.ts
├── setup.ts
├── readme.md
└── tsconfig.josn
npx playwright testnpx playwright test <test_filename.spec.ts>Example:
npx playwright test login.spec.tsPlease note that you have to have Docker Desktop installed.
After creation the .env file, run the below command to run all tests:
docker-compose up --build(not supported yet in docker)
First, install k6 on your local machine (depending on OS).
To run a specific test (from project root):
./run-k6.sh <path_to_test>.jsExample:
./run-k6.sh tests/k6-tests/getWalletNFTs.jsRecommended VS Code plugins:
Playwright Test for VSCodeby Microsoft;Playwright Test Snippetsby Mark Skelton;Prettier - Code formatterby PrettierCodeMetricsby Kiss Tamás