-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add UI test/canary that exercises "typical flow" #631
Comments
Interesting - so the bug in #630 wouldn't have been caught by an integration test (e.g. on PRs or as a check on our internal pipeline) because the change has to actually take affect in a newly generated package before it's noticed on the UI. I wonder if something like a Cloudwatch Synthetics broken link checker canary would make sense here, since it could potentially catch any broken links on the website in the future (and could be a lot simpler to set up)? |
So even with the above in mind, the Construct Hub should still run UI tests going through typical website user flows on a periodic basis. Running tests on pull requests or as deployment steps isn't enough since these tests can also fail due to changes in our backend data (like new packages, or backend reprocessing). We should also try to reuse the tests we have already written with Cypress in construct-hub-webapp so that they can be used as a single source of truth. (Maybe we could add a flag to enable or disable running the tests with fixture data) Here's a couple of ways that I thought might achieve this:
Note: options 1 and 2 don't provide UI test canaries for private Construct Hub. But I think option 2 might be the easiest (at least as an interim solution). |
Ah I just realized (2) probably is no good since the UI tests and our actual deployment of the website will be tied to different lifecycles. For example, we might update the integration tests along with a code change to the website, and then the tests will start failing until our actual website deployment change is live. We would also have less options for tracking and monitoring test metrics so... I guess (3) is the way to go. |
What about CloudWatch Synthetics? This is supposedly what it's intended for...? |
This issue requires some further discussion as we decide what features we want to provide for private Construct Hub, and how high priority this is, and how important it is to continue using our Cypress-based test suite. If we want to have a UI canary running as a construct (within Construct Hub), then I believe the best path forward would be to have the Cypress test suite available at deployment time (so that the canary can run the tests corresponding to the deployed version of Construct Hub). This requires either taking If this doesn't need to be a construct, we could consider how can we just run the E2E testing code in our internal pipeline. And if we don't want to use Cypress, then we would have to rewrite our tests with Puppeteer to work with CloudWatch Synthetics. For now I've submitted cdklabs/construct-hub-webapp#820 as a stop gap solution. |
Following discovery of the bug fixed in #630, it became clear we need automated UI testing around the whole user flow/journey, so that such issues don't go unnoticed in the future.
The text was updated successfully, but these errors were encountered: