apisix-dashboard icon indicating copy to clipboard operation
apisix-dashboard copied to clipboard

proposal: UI autotest

Open idbeta opened this issue 6 years ago • 6 comments

Background

Automated testing is very important to ensure quality. For apisix-dashboard, we need to add UI automated testing to CI.

Plan

  1. We plan to use the e2e test solution recommended by antd, which is base on Jest and Puppeteer.
  2. We split the corresponding test cases according to different pages.
  3. We will add an independent action integrated UI automated test in CI.

Test cases

  1. Login & Logout
  • [ ] login: correct and incorrect password/username
  • [ ] logout
  1. Metrics
  • [ ] page jump:
  1. Route
  • [ ] create: long description and name include common symbols
  • [ ] edit:
  • [ ] delete:
  • [ ] search: full match, partial match, no match
  • [ ] big data environment test: route operation under more than 200 routes
  1. SSL
  • [ ] enter correct certificate and private key:
  • [ ] enter unmatched certificate and private key:
  • [ ] upload correct certificate and private key:
  • [ ] upload unmatched certificate and private key:

5.Upstream

  • [ ] create: long description and name include common symbols
  • [ ] edit:
  • [ ] delete:
  • [ ] search: full match, partial match, no match
  • [ ] big data environment test: upstream operation under more than 200 upstreams
  1. Consumer
  • [ ] create: not enable authentication plugin, create the same name consumer
  • [ ] edit:
  • [ ] delete:
  1. Setting
  • [ ] page jump:
  • [ ] set grafana address:

related issue https://github.com/apache/apisix-dashboard/issues/44 @juzhiyuan @LiteSun

idbeta avatar Oct 28 '20 04:10 idbeta

Any suggestions for this e2e test solution? @liuxiran @bzp2010

LiteSun avatar Oct 29 '20 05:10 LiteSun

Just hold on, give us no longer than 3 days to check this issue.

juzhiyuan avatar Oct 29 '20 05:10 juzhiyuan

  1. Route a. Please adjust those cases' order, it should be: create, get, put, search, delete, get b. how to generate 200+ records? through Puppeteer or admin API?

  2. SSL a. update case b. delete case

  3. Consumer a. it should have all cases like Upstream or Route(CRUD)

  4. Setting a. Just set an URL then refresh and check if they are the same.

  5. Other a. Don't need check plugin currently, because the JSONSchema will check if the data is correct, and it's too complicated to check UI currently.

juzhiyuan avatar Oct 29 '20 06:10 juzhiyuan

This proposal looks good to me. If it is added to github actions, I suggest that each type of test use a separate action, so that it can be processed in parallel

moonming avatar Oct 29 '20 06:10 moonming

  • b. how to generate 200+ records? through Puppeteer or admin API? * I think it should generate by backend API, but we could lower its priority. The primary goal should be to ensure that the workflow of the dashboard is correct under the general situation.

idbeta avatar Nov 03 '20 08:11 idbeta

I will close this tracking issue, for there have a lot of detailed issues to track.

juzhiyuan avatar Dec 21 '20 04:12 juzhiyuan