Skip to content

Latest commit

 

History

History
59 lines (38 loc) · 3.54 KB

README.md

File metadata and controls

59 lines (38 loc) · 3.54 KB

Mento Automation Tests

Summary

Test automation framework repo to execute described tests against mento-web and other possible projects

Here you can find more detailed overview of test automation

Pre-requisites

Pre-conditions

  1. Execute npm install
  2. Paste a seed phrase into the SEED_PHRASE variable (can be taken from CI)

Environment Variables

.env file creates automatically as a "postinstall" on npm install command execution

Variable Example Description
*ENV prod required env, default prod
*SPECS_TYPE web required specs type to run. Can be: all or web or api
SPEC_NAMES wallet,slippage specs names separated by comma which will be executed locally, if no or disabled will execute all specs, disabled by default
TEST_RETRY 1 retries N times if test fails, disabled by default
*SEED_PHRASE 'seed phrase' required seed phrase for connection of metamask wallet
TEST_RUNNER_TIMEOUT 120_000 custom test runner timeout, disabled by default
LOG_LEVEL DEBUG desired log level, disabled by default. Can be: ALL, TRACE, INFO, DEBUG
TESTOMAT_REPORT_GENERATION false desired option to generate testomat test run report or not. Can be: true or false
TESTOMATIO_TITLE your own title desired testomat test run report title to run locally.
*TESTOMAT_API_KEY api key testomat api key to run locally. Can be taken from GH actions secrets or lastPass note

Local test/s execution by mods:

  • headed - with opening browser (command can be shortened to npm t)

npm run test

  • ui - with opening browser in specified app with all devtools, traces, and other playwright features

npm run test:ui

  • debug - with opening browser and specified debug app to pause/resume test

npm run test:debug

  • headless - without opening browser and other playwright features

npm run test:headless

CI test/s execution by the "Specific Test Run" trigger:

  1. Navigate to the CI
  2. Select the "Specific Test Run" workflow
  3. Click on the "Run workflow" drop-down
  4. Select a branch, write a spec name/s, and select specs type