Skip to content

test: Refactor session tracker tests with application states #5251

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

Merged
merged 5 commits into from
May 20, 2025

Conversation

philprime
Copy link
Contributor

While working on #5121 I refactored the session tracker tests for readability and adding application state to mimic the states when using actual app to trigger didBecomeActive etc.

It does not adapt the tests themselves.

#skip-changelog

Copy link

codecov bot commented May 19, 2025

Codecov Report

Attention: Patch coverage is 98.15498% with 5 lines in your changes missing coverage. Please review.

Project coverage is 92.900%. Comparing base (456d78e) to head (c1b6e2b).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...tegrations/Session/SentrySessionTrackerTests.swift 98.154% 5 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #5251       +/-   ##
=============================================
+ Coverage   92.885%   92.900%   +0.014%     
=============================================
  Files          688       688               
  Lines        86154     86272      +118     
  Branches     31175     31195       +20     
=============================================
+ Hits         80025     80147      +122     
+ Misses        6028      6024        -4     
  Partials       101       101               
Files with missing lines Coverage Δ
...tegrations/Session/SentrySessionTrackerTests.swift 99.024% <98.154%> (+0.430%) ⬆️

... and 5 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 456d78e...c1b6e2b. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this in an extra PR. LGTM.

@philprime philprime added the Waiting for: CI Marks PR as ready-for-merge when CI passes. To be replaced with required checks. label May 20, 2025
Copy link
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, LGTM.

@philprime philprime merged commit bdd88c7 into main May 20, 2025
51 of 52 checks passed
@philprime philprime deleted the philprime/session-tracker-test-improvements branch May 20, 2025 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Waiting for: CI Marks PR as ready-for-merge when CI passes. To be replaced with required checks.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants