[Django] #30220: Use headless browsers for selenium tests

12 views
Skip to first unread message

Django

unread,
Feb 27, 2019, 7:22:48 AM2/27/19
to django-...@googlegroups.com
#30220: Use headless browsers for selenium tests
------------------------------------------------+--------------------------
Reporter: Johannes Hoppe | Owner: nobody
Type: Cleanup/optimization | Status: assigned
Component: Testing framework | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 1 |
------------------------------------------------+--------------------------
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?

--
Ticket URL: <https://code.djangoproject.com/ticket/30220>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Feb 27, 2019, 7:23:04 AM2/27/19
to django-...@googlegroups.com
#30220: Use headless browsers for selenium tests
-------------------------------------+-------------------------------------
Reporter: Johannes Hoppe | Owner: Johannes
Type: | Hoppe

Cleanup/optimization | Status: assigned
Component: Testing framework | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Johannes Hoppe):

* owner: nobody => Johannes Hoppe


--
Ticket URL: <https://code.djangoproject.com/ticket/30220#comment:1>

Django

unread,
Feb 27, 2019, 8:30:20 AM2/27/19
to django-...@googlegroups.com
#30220: Use headless browsers for selenium tests
-------------------------------------+-------------------------------------
Reporter: Johannes Hoppe | Owner: Johannes
Type: | Hoppe
Cleanup/optimization | Status: assigned
Component: Testing framework | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (by Tim Graham):

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/30220#comment:2>

Django

unread,
Feb 27, 2019, 10:18:51 AM2/27/19
to django-...@googlegroups.com
#30220: Use headless browsers for selenium tests
-------------------------------------+-------------------------------------
Reporter: Johannes Hoppe | Owner: Johannes
Type: | Hoppe
Cleanup/optimization | Status: assigned
Component: Testing framework | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (by Johannes Hoppe):

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/30220#comment:3>

Django

unread,
Feb 28, 2019, 10:54:32 AM2/28/19
to django-...@googlegroups.com
#30220: Use headless browsers for selenium tests
-------------------------------------+-------------------------------------
Reporter: Johannes Hoppe | Owner: Johannes
Type: | Hoppe
Cleanup/optimization | Status: assigned
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* needs_docs: 0 => 1
* has_patch: 0 => 1
* needs_tests: 0 => 1
* stage: Unreviewed => Accepted


Comment:

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... 🤔

--
Ticket URL: <https://code.djangoproject.com/ticket/30220#comment:4>

Django

unread,
Mar 9, 2019, 7:49:01 AM3/9/19
to django-...@googlegroups.com
#30220: Use headless browsers for selenium tests
-------------------------------------+-------------------------------------
Reporter: Johannes Hoppe | Owner: Johannes
Type: | Hoppe
Cleanup/optimization | Status: assigned
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Johannes Hoppe):

* needs_docs: 1 => 0


Comment:

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

--
Ticket URL: <https://code.djangoproject.com/ticket/30220#comment:5>

Django

unread,
May 15, 2019, 9:53:27 AM5/15/19
to django-...@googlegroups.com
#30220: Use headless browsers for selenium tests
-------------------------------------+-------------------------------------
Reporter: Johannes Hoppe | Owner: Johannes
Type: | Hoppe
Cleanup/optimization | Status: assigned
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* needs_tests: 1 => 0
* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/30220#comment:6>

Django

unread,
May 17, 2019, 2:36:27 AM5/17/19
to django-...@googlegroups.com
#30220: Use headless browsers for selenium tests
-------------------------------------+-------------------------------------
Reporter: Johannes Hoppe | Owner: Johannes
Type: | Hoppe
Cleanup/optimization | Status: closed

Component: Testing framework | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"8d010f39869f107820421631111417298d1c5bb9" 8d010f39]:
{{{
#!CommitTicketReference repository=""
revision="8d010f39869f107820421631111417298d1c5bb9"
Fixed #30220 -- Added support for headless mode in selenium tests.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/30220#comment:7>

Django

unread,
Jun 13, 2023, 4:13:42 AM6/13/23
to django-...@googlegroups.com
#30220: Use headless browsers for selenium tests
-------------------------------------+-------------------------------------
Reporter: Johannes Maron | Owner: Johannes
Type: | Maron
Cleanup/optimization | Status: closed
Component: Testing framework | Version: dev

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"4b433ef236bf1607d5612d4c30f095ec9f6e63dc" 4b433ef]:
{{{
#!CommitTicketReference repository=""
revision="4b433ef236bf1607d5612d4c30f095ec9f6e63dc"
[4.2.x] Refs #30220 -- Bumped required version of Selenium to 3.8.0.

Follow up to 8d010f39869f107820421631111417298d1c5bb9.
Backport of 06881341d48dd17a4fdf25afc96991de4fb3b1ac from main
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/30220#comment:9>

Django

unread,
Jun 13, 2023, 4:13:42 AM6/13/23
to django-...@googlegroups.com
#30220: Use headless browsers for selenium tests
-------------------------------------+-------------------------------------
Reporter: Johannes Maron | Owner: Johannes
Type: | Maron
Cleanup/optimization | Status: closed
Component: Testing framework | Version: dev
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"06881341d48dd17a4fdf25afc96991de4fb3b1ac" 06881341]:
{{{
#!CommitTicketReference repository=""
revision="06881341d48dd17a4fdf25afc96991de4fb3b1ac"


Refs #30220 -- Bumped required version of Selenium to 3.8.0.

Follow up to 8d010f39869f107820421631111417298d1c5bb9.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/30220#comment:8>

Reply all
Reply to author
Forward
0 new messages