Opened 4 years ago

Closed 4 years ago

#32606 closed New feature (wontfix)

Allow rich configuration of Selenium tests

Reported by: Dominik George Owned by: nobody
Component: Testing framework Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Currently, the SeleniumTestCase allows passing a list of browsers to run tests with.

I propose to extend this feature from a flat list of strings to the following:

A dictionary mapping browsers to a list of dictionaries can be passed. The key is the name of the browser (the same string that was currently passed in the browsers list), and the list contains dictionaries of capabilities that are passed to the respective browsers.

The use case is testing with the same browser with different settings. e.g. different screen resolutions, different versions (possible with BrowserStack), etc.

I am willing to implement this change if the idea is accepted.

Change History (4)

comment:1 by Tim Graham, 4 years ago

Can you think of a suitable alternative to passing complex data structures on the command line? That seems a little verbose and tricky with issues like character escaping. Something like --selenium={\"foo\":[{\"bar\":\"baz\"}]} doesn't look so nice to me. Maybe reading configurations from a file?

comment:2 by Mariusz Felisiak, 4 years ago

Resolution: needsinfo
Status: newclosed

comment:3 by Dominik George, 4 years ago

Resolution: needsinfo
Status: closednew

I did not think of passing such configuration on the command-line.

Reading from a file would be an optoin, of course. Or hard-coded in the test suite.

comment:4 by Carlton Gibson, 4 years ago

Resolution: wontfix
Status: newclosed

Hi Dominik.

I'm going to say wontfix here initially. That doesn't mean definitely not, just that it seems out of scope for what we'd include in Django itself.

If you want to pull together a proof-of-concept, it's something we could look at. (And happily so!) (So I'm tempted towards needsinfo again for that reason.)

Maybe what you're suggesting would be a trivial pass-through to selenium, but a quick initial look browser capabilities there presents a wall of posts and docs that aren't exactly inviting, so it's hard to assess.

(New features like this often need some idea of what's really involved, and we often begin with discussion on the DevelopersMailingList, which has a larger audience, rather than straight here on Trac, which is better for concrete addressable with a plan.)

I hope that makes sense.

Note: See TracTickets for help on using tickets.
Back to Top