Vv/283 session test title - #308
Merged
Merged
Conversation
Greptile SummaryThe PR improves Selenium Python test reporting by naming plain-script tests as sessions, nesting pytest class tests beneath class suites, rolling child states up to their parent suites, and resolving source paths against pytest’s root directory.
Confidence Score: 5/5The PR appears safe to merge, with no concrete changed-code defect identified. The new hierarchy matches the recursive suite contract used by downstream consumers, and the added tests cover the primary class, module, path, and state behaviors.
|
| Filename | Overview |
|---|---|
| packages/selenium-devtools-py/src/selenium_devtools/pytest_plugin.py | Builds nested class suites, derives aggregate states, and emits absolute source paths while retaining relative display titles. |
| packages/selenium-devtools-py/src/selenium_devtools/instrumentation.py | Changes the implicit plain-script test title to “session” and aligns its hierarchy metadata with pytest output. |
| packages/selenium-devtools-py/tests/test_pytest_plugin.py | Covers class and module hierarchy, parameterized leaf names, absolute paths, grouping, and state roll-up. |
| packages/selenium-devtools-py/tests/test_instrumentation.py | Verifies the synthetic session title, UID, hierarchy, and entry-file metadata. |
| examples/selenium/python-test/test_login_pytest.py | Adds a realistic pytest example exercising grouped and module-level Selenium tests. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
P[pytest report] --> R[Suite registry]
R --> F[File suite]
F --> M[Module-level tests]
F --> C[Class suite]
C --> T[Class test methods]
M --> S[Roll up file state]
T --> CS[Roll up class state]
CS --> S
S --> D[Send suite snapshot]
Reviews (1): Last reviewed commit: "docs(examples): add a Python login examp..." | Re-trigger Greptile
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.
What & why
Type of change
Packages touched
shared(types and contracts)core(framework-agnostic capture/reporting)elements(published element/snapshot API —@wdio/elements)service(WebdriverIO adapter)nightwatch-devtools(Nightwatch adapter)selenium-devtools(Selenium adapter)backend(server)app(UI)script(page-injected runtime)Notes for reviewers
Screenshots / recordings