#30220 closed Cleanup/optimization (fixed)
Use headless browsers for selenium tests
Reported by: | Johannes Maron | Owned by: | Johannes Maron |
---|---|---|---|
Component: | Testing framework | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | yes |
Description
Both Chrome and Firefox support a new headless mode now. Besides being faster, it also is more reliable as well as convenient since there are no windows popping up.
I already gave it a try, I don't see any reason not to use the headless mode for the browsers that are supporting the feature. However I don't know how the jenkins setup works. Does that use a remote test server or does it use the browsers locally?
Change History (9)
comment:1 by , 6 years ago
Owner: | changed from | to
---|
comment:2 by , 6 years ago
comment:3 by , 6 years ago
It opened a PR with a possible implementation: https://github.com/django/django/pull/11033
It would be possible to add a command line argument to run it headless or not headless.
comment:4 by , 6 years ago
Has patch: | set |
---|---|
Needs documentation: | set |
Needs tests: | set |
Triage Stage: | Unreviewed → Accepted |
Hey Joe. — I could certainly benefit from a --headless
flag (or something) to runtests.py
.
- I ticked Needs Docs because I couldn't see straight from the PR how I'd use it?
- I ticked Needs Tests, but if it's just runtests..., and if Jenkins already does that... 🤔
comment:5 by , 6 years ago
Needs documentation: | unset |
---|
Hi Carlton,
I did add new CLI option and added documentation. However I don't really know how I would tests this. Since the selenium tests on Jenkins don't even run in the regular selenium mode but, this is somewhat tricky. I did however test it locally. I don't have windows tho. If you happen to have windows and would tests this wil IE, that would be great.
Best
-Joe
comment:6 by , 6 years ago
Needs tests: | unset |
---|---|
Triage Stage: | Accepted → Ready for checkin |
Jenkins uses
xfvb-run
to run the tests headlessly. Does your proposal require changes to Django? Even if we changed the default to run the tests headlessly, I think we would still want to be able to run the tests and watch their execution for debugging purposes.