Skip to content

Ensure TestMethodAttribute.Execute is run on the correct execution context #5688

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 4 commits into from
Jun 6, 2025

Conversation

Youssef1313
Copy link
Member

@Youssef1313 Youssef1313 commented Jun 3, 2025

One more execution context bug :)

Also adding a new test project that's kinda in-between unit tests and integration tests. It's similar to Playground but intended to contain real tests. It can only test "positive" cases.

Fixes #5687

@Youssef1313
Copy link
Member Author

/backport to rel/3.9

Copy link
Contributor

github-actions bot commented Jun 3, 2025

Started backporting to rel/3.9: https://github.com/microsoft/testfx/actions/runs/15421123134

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 94.73684% with 2 lines in your changes missing coverage. Please review.

Project coverage is 76.35%. Comparing base (35ac25e) to head (d3c23b2).
Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
...r/MSTest.TestAdapter/Execution/TestMethodRunner.cs 88.23% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5688      +/-   ##
==========================================
- Coverage   76.39%   76.35%   -0.04%     
==========================================
  Files         600      600              
  Lines       36743    36749       +6     
==========================================
- Hits        28068    28060       -8     
- Misses       8675     8689      +14     
Flag Coverage Δ
Debug 76.35% <94.73%> (-0.04%) ⬇️
integration 76.35% <94.73%> (-0.04%) ⬇️
production 76.35% <94.73%> (-0.04%) ⬇️
unit 76.35% <94.73%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ter/MSTest.TestAdapter/Execution/TestMethodInfo.cs 80.85% <100.00%> (+1.09%) ⬆️
...ework/Attributes/TestMethod/TestMethodAttribute.cs 100.00% <ø> (ø)
...r/MSTest.TestAdapter/Execution/TestMethodRunner.cs 85.67% <88.23%> (-1.03%) ⬇️

... and 7 files with indirect coverage changes

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

@Youssef1313
Copy link
Member Author

/backport to rel/3.9

@Youssef1313 Youssef1313 marked this pull request as ready for review June 4, 2025 15:14
Copy link
Contributor

github-actions bot commented Jun 4, 2025

Started backporting to rel/3.9: https://github.com/microsoft/testfx/actions/runs/15446020753

@Youssef1313
Copy link
Member Author

/backport to rel/3.9

Copy link
Contributor

github-actions bot commented Jun 4, 2025

Started backporting to rel/3.9: https://github.com/microsoft/testfx/actions/runs/15451799033

@Youssef1313 Youssef1313 requested a review from nohwnd June 5, 2025 09:12
@Youssef1313 Youssef1313 merged commit 8cda3e1 into main Jun 6, 2025
8 checks passed
@Youssef1313 Youssef1313 deleted the dev/ygerges/exec-context-again branch June 6, 2025 09:16
Youssef1313 added a commit that referenced this pull request Jun 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression: AsyncLocal loses value since v3.9.*
4 participants