kruize / kruize-ui

Kruize Autotune UI
MIT License
6 stars 12 forks source link

Setup E2E tests covering user flow for SRE Analytics #117

Open bhanvimenghani opened 1 year ago

bhanvimenghani commented 1 year ago

This pr sets up e2e test in cypress and also does a list of test on the current ur

  1. Checks Kruize About page loads successfully
  2. Navigation from main page to SRE Analytics
  3. Testing ip and port setup
  4. Tests List Experiments api
  5. Tests List Recommendations api
  6. Mimics User clicks on UseCase selection page to get recommendations

To test the changes:

  1. Make sure UI is up and running
  2. run npx cypress open
chandrams commented 12 months ago

@bhanvimenghani - You can use cypress run instead of cypress open to run in headless mode (without ui) and launch the browser using --browser option. Refer this doc - https://docs.cypress.io/guides/guides/command-line

It would be good to capture the test report and have a script to run the test and process the report and accordingly pass (exit 0) or fail (exit 1) the test. This will enable adding and end-to-end sanity test to github workflow.