Skip to content
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

Inserting test data for E2E tests #1966

Open
gweiying opened this issue Sep 15, 2022 · 1 comment
Open

Inserting test data for E2E tests #1966

gweiying opened this issue Sep 15, 2022 · 1 comment

Comments

@gweiying
Copy link
Contributor

gweiying commented Sep 15, 2022

Context

Our E2E Directory tests test for correctness of link search, sorted by popularity and recency. To create test data, we currently create links and programmatically retrieve them within the test itself.

This has the unintended side effect that a Directory test could fail for reasons outside of the Directory flow. This would also mean more maintenance work in the future, say if the link creation flow changes.

Technical brief

Investigate potential solutions for seeding data for our E2E tests, evaluate which is best and implement

Some potential solutions:

  • Running a script to seed the test db before our E2E hooks
  • API calls to seed the db before our E2E hooks
  • TestCafe (is there a way to seed the data via TestCafe)

More Details

From #1963

Populating links within the Directory tests couples the success of the Directory tests to the success of link creation and retrieval. This has the unintended side effect that a Directory test could fail for reasons outside of the Directory flow. This would also mean more maintenance work in the future, say if the link creation flow changes. One alternative to consider is, instead of adding links and retrieving them within the web console, to run a script to seed the database before running the tests. I think this isn't a high priority task since the functionality here is complete, so I will just open it as an issue for now.

@gweiying
Copy link
Contributor Author

tagging @KoalaTasha to leave some thought since she worked on the upstream feature previously

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant