Repository navigation
Add pytest-rerunfailures retry reporting support #433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ParthibanRajasekaran
wants to merge
24
commits into
reportportal:develop
Choose a base branch
from
ParthibanRajasekaran:feat/pytest-rerunfailures-support
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
08b9eb5
fix hierarchy flags working independently
ParthibanRajasekaran 1581a2e
add test for independent hierarchy flags
ParthibanRajasekaran c5aed68
fix BDD scenario handling for hierarchy flags
ParthibanRajasekaran b24ac28
add docstring to _merge_code_with_separator method
ParthibanRajasekaran 762b8af
add docstrings to merge methods
ParthibanRajasekaran 346f95a
plugin.py: Ensure pytest-rerunfailures hook runs in correct order
ParthibanRajasekaran c5e12b5
plugin.py: Route retry detection through handle_retry_transition
ParthibanRajasekaran 3afe710
service.py: Initialize retry state tracking dictionaries
ParthibanRajasekaran 3185f49
service.py: Add retry metadata to start_test_item payload
ParthibanRajasekaran ea57d48
service.py: Add retry metadata to finish_test_item payload
ParthibanRajasekaran a14cb21
service.py: Add retry detection and state management methods
ParthibanRajasekaran 8cfd82f
service.py: Check active_leaves in start_pytest_item
ParthibanRajasekaran e3cd1a6
service.py: Defer parent finishing until all retries complete
ParthibanRajasekaran 2f80610
service.py: Route test results to correct leaf during retries
ParthibanRajasekaran 4b54450
plugin.py: Clean up retry tracking state after session ends
ParthibanRajasekaran 24ee0c5
tests: Add unit tests for retry support
ParthibanRajasekaran 8ee91fc
tests: Add integration tests with pytest-rerunfailures
ParthibanRajasekaran 1c5e976
tests: Fix retry support tests to match actual implementation
ParthibanRajasekaran 672581b
service: Fix error log routing and first execution handling
ParthibanRajasekaran 5590e46
tests: Expand retry support tests with better coverage
ParthibanRajasekaran acf2321
fix(retry): consolidate retry handling into start_pytest_item to prev…
ParthibanRajasekaran 2da8005
tests: Add comprehensive unit tests for hierarchy flag independence (…
ParthibanRajasekaran d117b4e
tests: Add comprehensive functional tests for hierarchy flag independ…
ParthibanRajasekaran 56681dc
Fix attributes handling in finish_test_item and test discovery for su…
ParthibanRajasekaran File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| """Integration tests for pytest-rerunfailures support.""" | ||
|
|
||
| import pytest | ||
|
|
||
|
|
||
| @pytest.mark.flaky(reruns=2) | ||
| def test_eventual_pass_with_retries(): | ||
| """Test that passes after retries are properly reported.""" | ||
| if not hasattr(test_eventual_pass_with_retries, 'attempts'): | ||
| test_eventual_pass_with_retries.attempts = 0 | ||
| test_eventual_pass_with_retries.attempts += 1 | ||
|
|
||
| # Passes on third attempt | ||
| assert test_eventual_pass_with_retries.attempts >= 3 | ||
|
|
||
|
|
||
| def test_without_retries(): | ||
| """Test that passes without retries.""" | ||
| assert True | ||
|
|
||
|
|
||
| @pytest.mark.flaky(reruns=1) | ||
| def test_passes_on_second_attempt(): | ||
| """Test that passes on second attempt.""" | ||
| if not hasattr(test_passes_on_second_attempt, 'count'): | ||
| test_passes_on_second_attempt.count = 0 | ||
| test_passes_on_second_attempt.count += 1 | ||
|
|
||
| # Fails once, passes on second attempt | ||
| assert test_passes_on_second_attempt.count >= 2 |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.