NodeGoat icon indicating copy to clipboard operation
NodeGoat copied to clipboard

Improve Cypress script

Open UlisesGascon opened this issue 4 years ago • 5 comments

Context

  • This is part of release-1.5 #148
  • Critical task

Tasks

  • [ ] Improve the speed of the e2e tests (almost 8 minutes now). Maybe videos are generated (ci/local envs)
  • [ ] Add test that are missing (fast check)
  • [ ] Remove unnecessary/repetitive tests
  • [ ] Improve the command dbReset. Missing validation due Travis conflicts
  • [ ] Check that the npm tasks are working as expected
  • [ ] Update the readme.md with the extra relevant info (if needed)

Assignation

  • This tasks is open for assignation, just claim it (as reply to this) and submit your PR ;-)

Important

UlisesGascon avatar Aug 06 '19 06:08 UlisesGascon

I'd like to help with this. I've been looking at some performance improvements to the tests and also making them more reliable.

rcowsill avatar Aug 10 '20 21:08 rcowsill

To start, I'd like to make pull requests for two fixes that should resolve the signup test flakiness:

  • [x] Make db-reset.js wait for dropCollections to complete before inserting new data
  • [x] Set necessary env vars in docker-compose.yml to make the web service use the mongo service (instead of mongolab)

The first one affects branches master and feature/187. The second currently only affects feature/187, because master isn't using docker in Travis.

I have more to follow, but these are higher priority because they make the tests reliable. Making these changes should save a lot of time looking into false build failures.

@UlisesGascon, which branch(es) would you prefer the pull request(s) to be made against?

rcowsill avatar Aug 11 '20 14:08 rcowsill

Pull request for the dropCollections fix is open: #214

rcowsill avatar Sep 27 '20 22:09 rcowsill

To start, I'd like to make pull requests for two fixes that should resolve the signup test flakiness:

Both these fixes were merged into master in c44bbd64cac539bb5d24f3c4a65025f7fc1690d2.

The fix to set MONGODB_URI in docker builds needs to be merged into feature/187 before January 12, 2021. On that date the mLab database currently used by CI in this branch will be shut down, causing all subsequent Travis jobs to fail.

rcowsill avatar Nov 10 '20 10:11 rcowsill

Just made PR #230 which adds video recording/upload to the github actions CI workflow.

Video recording is off by default for local test runs, but can be activated like this if needed: npm run test:ci -- --config video=true or: npx cypress run --config video=true

rcowsill avatar Feb 24 '21 16:02 rcowsill