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

Get Selenium tests working again (locally) #425

Open
StephenChan opened this issue Nov 9, 2021 · 0 comments
Open

Get Selenium tests working again (locally) #425

StephenChan opened this issue Nov 9, 2021 · 0 comments
Milestone

Comments

@StephenChan
Copy link
Member

StephenChan commented Nov 9, 2021

Selenium tests are basically our way of testing Javascript behavior.

Per this comment, we previously limited Selenium unit tests to the SQLite database, because it was the only available database backend that doesn't accept multiple DB connections, and multiple connections present a problem in our Selenium tests.

Then we started using the Django JSONField which was PostgreSQL-only, so we could no longer run tests in SQLite, and hence we could no longer run our Selenium tests.

Possible ways to get Selenium tests working again:

  1. Update to Django 3.1 and start using its DB-agnostic JSONField, so that those fields can work in SQLite.

  2. See if there is a convenient way to run PostgreSQL while restricting to a single DB connection. I'm not sure if I thought to look this up before. This would be a good solution if it works, since it's otherwise preferable to stick to PostgreSQL for tests (to keep behavior similar to production).

    • (EDIT) Could try django-postgrespool2 with pool_size 1, max_overflow 0. Only use this for development environments of course.
  3. See if there's a way to rework our Selenium tests in a way that multiple DB connections can't mess them up. I'm pretty sure I did look into this, but I could have missed something, or maybe Django has made better options available by now.

This is just to get Selenium tests working locally. I don't remember if we ever got them working in our continuous-integration systems or not. That'd be ideal to have also, but I'm not really sure what it'd involve. That can be a separate issue once this is taken care of.

@StephenChan StephenChan added this to the 1.1 - General tasks milestone Nov 9, 2021
@StephenChan StephenChan added this to Main ideas in Next NOAA tasks via automation Nov 9, 2021
@StephenChan StephenChan moved this from Main ideas to Upkeep and other ideas in Next NOAA tasks Nov 9, 2021
@StephenChan StephenChan modified the milestones: 1.1 - General tasks, 1.x Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Next NOAA tasks
  
Upkeep and other ideas
Development

No branches or pull requests

1 participant