Document custom LiveServerTestCase host for remote browsers#184
Merged
Conversation
8bec399 to
6e468da
Compare
There was a problem hiding this comment.
Pull request overview
Adds documentation explaining how to run browser-based tests against a Django live test server from a browser running on a different host/container (e.g., via Selenium Grid / Hub), using existing BehaviorDrivenTestCase extension points and --runner.
Changes:
- Adds a “Remote browsers and Selenium Hub” section to
docs/webbrowser.rst. - Documents subclassing
BehaviorDrivenTestCaseto overrideLiveServerTestCase.host/.port, and selecting it via--runner. - Includes a worked Splinter Remote WebDriver example and an
ALLOWED_HOSTSnote.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add a "Remote browsers and Selenium Hub" section to the webbrowser docs showing how to subclass BehaviorDrivenTestCase with a custom host/port and select it via --runner. This is the pattern requested in #124 for driving the live server from a Selenium Hub or other out-of-host browser.
a9e5db3 to
6f086b3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docs/webbrowser.rstshowing how to subclassBehaviorDrivenTestCasewith a customhost/portand select it via the--runneroption.splinterexample pointing athttp://selenium-hub:4444/wd/huband a note aboutALLOWED_HOSTS.No code changes — the pattern already works with the existing extension points (
testcase_classon a runner subclass + Django'sLiveServerTestCase.host/.port). This PR just makes that discoverable so #124 can be closed with a pointer to the docs.Test plan
tox -e docsbuilds without warnings--runnercross-link resolves toconfiguration.html#runner