Redesign playwright-examples to use Sauce's native Playwright WebSocket endpoint - #438
Merged
Merged
Conversation
…et endpoint Replaces the old WebDriver-session + CDP approach (Chrome/Edge only) with Sauce's native /playwright/session WebSocket endpoint, which also supports Firefox and WebKit. Sessions are grouped per test class by default, with a single JUnit5 config switch (junit.parallel.mode.default) to run every test in its own independent session instead. A session that sees a failure is closed and reported immediately rather than reused by the next test. Also drops the sauce_bindings, saucerest, and lombok dependencies, replacing their (small) slice of functionality with a few lightweight classes and java.net.http.HttpClient, and adds a JUnit XML test report via dorny/test-reporter to the CI workflow. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The formatting check in CI runs the real tool; my manual re-wrapping of a few over-100-column lines (done without local access to the formatter) guessed slightly differently in three spots. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
My previous fix over-merged the orElseThrow lambda onto one line, pushing it back over 100 columns from a different angle. Applying the formatter's own diff exactly this time instead of re-guessing. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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
/playwright/sessionWebSocket endpoint, which also supports Firefox and WebKit.-Djunit.parallel.mode.default=concurrent) gives every test its own independent session instead. A session that sees a failure is closed and reported immediately rather than reused by the next test.sauce_bindings,saucerest, andlombokdependencies - their small slice of functionality (build naming, job reporting/renaming) is now a few lightweight classes usingjava.net.http.HttpClient.SortingTestclass for coverage parity.[Chrome, MicrosoftEdge]to[chromium, firefox, webkit](Playwright's own engine names - the native endpoint doesn't distinguish Chrome from Edge, both are Chromium).dorny/test-reporter.Test plan
mvn clean test-compile(JDK 21)-Djunit.parallel.mode.default=concurrent, 19 sessions, one per test method, all passing)StandaloneTeststill passes after thesaucerestremoval🤖 Generated with Claude Code