Skip to content
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

Add TestException property to the TestContext #4018

Merged
merged 3 commits into from
Nov 11, 2024

Conversation

Evangelink
Copy link
Member

Fixes #293

Youssef1313
Youssef1313 previously approved these changes Nov 8, 2024
testHostResult.AssertExitCodeIs(2);
testHostResult.AssertOutputContainsSummary(failed: 2, passed: 1, skipped: 0);
testHostResult.AssertOutputContains("Initialization method TestContextExceptionFailingInTestInit.TInit threw exception. System.InvalidOperationException");
testHostResult.AssertOutputContains("Test method TestContextExceptionFailingInTestMethod.TestFailingInTestMethod threw exception:");
Copy link
Member Author

Choose a reason for hiding this comment

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

The assertion type is on the next line but I validated manually it's good.

@Evangelink Evangelink merged commit f9a6140 into microsoft:main Nov 11, 2024
6 checks passed
@Evangelink Evangelink deleted the testcontext-exception branch November 11, 2024 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to get exception from test in TestCleanup?
2 participants