proposal: UI autotest
Background
Automated testing is very important to ensure quality. For apisix-dashboard, we need to add UI automated testing to CI.
Plan
- We plan to use the e2e test solution recommended by antd, which is base on Jest and Puppeteer.
- We split the corresponding test cases according to different pages.
- We will add an independent action integrated UI automated test in CI.
Test cases
- Login & Logout
- [ ] login: correct and incorrect password/username
- [ ] logout
- Metrics
- [ ] page jump:
- 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
- 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
- Consumer
- [ ] create: not enable authentication plugin, create the same name consumer
- [ ] edit:
- [ ] delete:
- Setting
- [ ] page jump:
- [ ] set grafana address:
related issue https://github.com/apache/apisix-dashboard/issues/44 @juzhiyuan @LiteSun
Any suggestions for this e2e test solution? @liuxiran @bzp2010
Just hold on, give us no longer than 3 days to check this issue.
-
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?
-
SSL a. update case b. delete case
-
Consumer a. it should have all cases like Upstream or Route(CRUD)
-
Setting a. Just set an URL then refresh and check if they are the same.
-
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.
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
- 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.
I will close this tracking issue, for there have a lot of detailed issues to track.