Browse Source

docs: update content for development-setup:cypress

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/3552/head
Raju Udava 2 years ago
parent
commit
b2289fdec0
  1. 121
      packages/noco-docs/content/en/engineering/development-setup.md

121
packages/noco-docs/content/en/engineering/development-setup.md

@ -1,6 +1,6 @@
--- ---
title: "Development setup" title: "Development setup"
description: "How to setup your development environment" description: "How to set-up your development environment"
position: 3200 position: 3200
category: "Engineering" category: "Engineering"
menuTitle: "Development setup" menuTitle: "Development setup"
@ -39,19 +39,130 @@ npm run dev
Any changes made to frontend and backend will be automatically reflected in the browser. Any changes made to frontend and backend will be automatically reflected in the browser.
### Cypress ### Cypress
Cypress tests are divided into 4 suites
- SQLite tests
- Postgres tests
- MySQL tests
- Quick import tests
First 3 suites, each have 4 test category
- Table operations (create, delete, rename, add column, delete column, rename column)
- Views (Grid, Gallery, Form)
- Roles (user profiles, access control & preview)
- Miscellaneous (Import, i18n, etc)
#### MySQL tests (ExtDB project)
```shell ```shell
# install dependencies(cypress) # install dependencies(cypress)
npm install npm install
# run mysql database with required database using docker compose # start MySQL database using docker compose
docker-compose -f ./scripts/docker-compose-cypress.yml up docker-compose -f ./scripts/docker-compose-cypress.yml up
# Run backend api using following command # Run backend api using following command
npm run start:api npm run start:api:cache
# Run frontend web UI using following command # Run frontend web UI using following command
npm run start:web npm run start:web
# wait until both 3000 and 8080 ports are available
# or run following command to run it with GUI
npm run cypress:open
# run one of 4 test scripts
- Table operations : restTableOps.js
- Views : restViews.js
- Roles & access control : restRoles.js
- Miscellaneous : restMisc.js
```
#### SQLite tests (XCDB project)
```shell
# install dependencies(cypress)
npm install
# start MySQL database using docker compose
docker-compose -f ./scripts/docker-compose-cypress.yml up
# Run backend api using following command
npm run start:xcdb-api:cache
# Run frontend web UI using following command
npm run start:web
# wait until both 3000 and 8080 ports are available
# or run following command to run it with GUI
npm run cypress:open
# run one of 4 test scripts
- Table operations : xcdb-restTableOps.js
- Views : xcdb-restViews.js
- Roles & access control : xcdb-restRoles.js
- Miscellaneous : xcdb-restMisc.js
```
#### PG tests (ExtDB project)
```shell
# install dependencies(cypress)
npm install
# start PG database using docker compose
docker-compose -f ./scripts/cypress/docker-compose-pg.yml up -d
# Run backend api using following command
npm run start:api:cache
# Run frontend web UI using following command
npm run start:web
# wait until both 3000 and 8080 ports are available # wait until both 3000 and 8080 ports are available
# and run cypress test using following command
npm run cypress:run
# or run following command to run it with GUI # or run following command to run it with GUI
npm run cypress:open npm run cypress:open
# run one of 4 test scripts
- Table operations : pg-restTableOps.js
- Views : pg-restViews.js
- Roles & access control : pg-restRoles.js
- Miscellaneous : pg-restMisc.js
```
#### Quick import tests (SQLite project)
```shell
# install dependencies(cypress)
npm install
# start MySQL database using docker compose
docker-compose -f ./scripts/docker-compose-cypress.yml up
# copy existing xcdb (v0.91.7) database to ./packages/nocodb/
cp ./scripts/cypress/fixtures/quickTest/noco_0_91_7.db ./packages/nocodb/noco.db
# Run backend api using following command
npm run start:api:cache
# Run frontend web UI using following command
npm run start:web
# wait until both 3000 and 8080 ports are available
# or run following command to run it with GUI
npm run cypress:open
# run test script
- quickTest.js
```
#### Quick import tests (PG)
```shell
# install dependencies(cypress)
npm install
# start PG database using docker compose
docker-compose -f ./scripts/cypress/docker-compose-pg.yml up -d
# copy existing xcdb (v0.91.7) database to ./packages/nocodb/
cp ./scripts/cypress/fixtures/quickTest/noco_0_91_7.db ./packages/nocodb/noco.db
# Run backend api using following command
npm run start:api:cache
# Run frontend web UI using following command
npm run start:web
# wait until both 3000 and 8080 ports are available
# or run following command to run it with GUI
npm run cypress:open
# run test script
- quickTest.js
``` ```
Loading…
Cancel
Save