/ cypress / README.md
README.md
 1  # AAVE e2e testing
 2  
 3  based on cypress(8.5.0) with `cypress-repeat` and tenderly
 4  
 5  ---
 6  
 7  ## Development mode
 8  
 9  there is command for development/debuging/local executing tests:
10  
11  - `yarn run test:open` - it's open visual window with all test and manual executing
12  
13  _steps:_
14  
15  1. install dependencies `yarn`
16  2. add .env.local file to the root folder with:
17  
18  
19  ```sh
20  TENDERLY_KEY=
21  TENDERLY_ACCOUNT=Aave
22  TENDERLY_PROJECT=QA
23  ```
24  
25  `cp .env.example .env` - execute before spining up environment if you want to check Stake / Governance pages.
26  
27  3. run `yarn run test:open`
28  
29  ---
30  
31  ## CI mode
32  
33  there are 2 types of suites:
34  
35  - `yarn run test:${marketName}-${marketVersion}-smoke` - executing only main specs, using for brunch pr
36  - `yarn run test:${marketName}-${marketVersion}-full` - executing all specs, using for before live deployment
37  
38  P.C. for execute those commands locally need to:
39  
40  1. install dependencies `yarn`
41  2. add .env.local file to the root folder with:
42  
43  ```sh
44  TENDERLY_KEY=
45  TENDERLY_ACCOUNT=Aave
46  TENDERLY_PROJECT=QA
47  ```
48  
49  3. add to beginning of command `DOTENV_CONFIG_PATH='.env.local'`
50  4. run command
51  
52  ---
53  ## Local execution
54  
55  1. install dependencies `yarn`
56  2. add .env.local file to the root folder with:
57  
58  ```sh
59  TENDERLY_KEY=
60  TENDERLY_ACCOUNT=
61  TENDERLY_PROJECT=
62  ```
63  
64  then possible to run all tests by:
65  ```sh
66  yarn run test:headless
67  ```
68  or for separate markets:
69  - ethereum v2 `DOTENV_CONFIG_PATH='.env.local' cypress run --spec 'cypress/e2e/0-v2-markets/0-main-v2-market/**/*'`
70  - amm v2 `DOTENV_CONFIG_PATH='.env.local' cypress run --spec 'cypress/e2e/0-v2-markets/1-amm-v2-market/**/*'`
71  - avalanche v2 `DOTENV_CONFIG_PATH='.env.local' cypress run --spec 'cypress/e2e/0-v2-markets/3-avalanche-v2-market/**/*'`
72  - polygon v2 `DOTENV_CONFIG_PATH='.env.local' cypress run --spec 'cypress/e2e/0-v2-markets/2-polygon-v2-market/**/*'`
73  - ethereum v3 `DOTENV_CONFIG_PATH='.env.local' cypress run --spec 'cypress/e2e/1-v3-markets/0-ethereum-v3-market/**/*'`
74  - arbiturm v3 `DOTENV_CONFIG_PATH='.env.local' cypress run --spec 'cypress/e2e/1-v3-markets/1-arbitrum-v3-market/**/*'`
75  - avalanche v3 `DOTENV_CONFIG_PATH='.env.local' cypress run --spec 'cypress/e2e/1-v3-markets/2-avalanche-v3-market/**/*'`
76  - polygon v3 `DOTENV_CONFIG_PATH='.env.local' cypress run --spec 'cypress/e2e/1-v3-markets/3-polygon-v3-market/**/*'`
77  - optimism v3 `DOTENV_CONFIG_PATH='.env.local' cypress run --spec 'cypress/e2e/1-v3-markets/4-optimism-v3-market/**/*'`