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 ability to ignore specific test cases #4457

Merged
merged 17 commits into from
Jan 7, 2025

Conversation

Youssef1313
Copy link
Member

@Youssef1313 Youssef1313 commented Dec 27, 2024

Fixes #1043 and fixes #1411

@Youssef1313 Youssef1313 requested a review from Copilot December 27, 2024 09:27

Choose a reason for hiding this comment

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

Copilot reviewed 5 out of 19 changed files in this pull request and generated no comments.

Files not reviewed (14)
  • src/TestFramework/TestFramework/PublicAPI/PublicAPI.Unshipped.txt: Language not supported
  • src/TestFramework/TestFramework/Attributes/TestMethod/TestClassAttribute.cs: Evaluated as low risk
  • src/TestFramework/TestFramework/Attributes/DataSource/DynamicDataAttribute.cs: Evaluated as low risk
  • src/Adapter/MSTest.TestAdapter/ObjectModel/UnitTestElement.cs: Evaluated as low risk
  • src/TestFramework/TestFramework/Attributes/DataSource/DataRowAttribute.cs: Evaluated as low risk
  • src/Adapter/MSTest.TestAdapter/ObjectModel/TestMethod.cs: Evaluated as low risk
  • src/Adapter/MSTest.TestAdapter/Execution/UnitTestRunner.cs: Evaluated as low risk
  • src/Adapter/MSTest.TestAdapter/Extensions/TestCaseExtensions.cs: Evaluated as low risk
  • src/Adapter/MSTest.TestAdapter/Extensions/TestResultExtensions.cs: Evaluated as low risk
  • src/Adapter/MSTest.TestAdapter/Discovery/TypeEnumerator.cs: Evaluated as low risk
  • test/UnitTests/MSTestAdapter.UnitTests/Execution/TestExecutionManagerTests.cs: Evaluated as low risk
  • src/Adapter/MSTest.TestAdapter/Constants.cs: Evaluated as low risk
  • test/UnitTests/MSTestAdapter.UnitTests/Discovery/TypeEnumeratorTests.cs: Evaluated as low risk
  • src/TestFramework/TestFramework/Attributes/TestMethod/TestResult.cs: Evaluated as low risk
Comments suppressed due to low confidence (4)

src/Adapter/MSTest.TestAdapter/Execution/TestMethodRunner.cs:171

  • Ensure that tests are added to cover the new functionality of ignoring specific test cases based on the TestDataSourceIgnoreReason.
if (_test.TestDataSourceIgnoreReason is not null)

src/TestFramework/TestFramework/Attributes/TestMethod/TestMethodAttribute.cs:56

  • Ensure that the new Ignore property is covered by tests. The TODO in the pull request description indicates that tests are yet to be added.
public string? Ignore { get; set; }

src/Adapter/MSTest.TestAdapter/Execution/TestClassInfo.cs:571

  • The new behavior of ignoring the class cleanup should be covered by tests. Ensure that tests cover both TestDataSourceUnfoldingStrategy.Unfold and TestDataSourceUnfoldingStrategy.Fold.
if (ClassAttribute.Ignore is null &&

src/Adapter/MSTest.TestAdapter/Execution/TestClassInfo.cs:583

  • The new behavior of ignoring the class cleanup should be covered by tests. Ensure that tests cover both TestDataSourceUnfoldingStrategy.Unfold and TestDataSourceUnfoldingStrategy.Fold.
if (ClassAttribute.Ignore is null &&
@Youssef1313
Copy link
Member Author

@Evangelink This doesn't yet implement a new type that can be specialized under IEnumerable<object[]>. I assume this can come in future? If not, we can discuss the design and I'll implement in this PR.

@Evangelink Evangelink enabled auto-merge (squash) January 7, 2025 11:18
@Evangelink Evangelink merged commit 36eaf05 into microsoft:main Jan 7, 2025
10 checks passed
@Youssef1313 Youssef1313 deleted the ignore-specific-cases branch January 7, 2025 11:25
@Youssef1313 Youssef1313 restored the ignore-specific-cases branch January 7, 2025 11:26
@Youssef1313 Youssef1313 deleted the ignore-specific-cases branch January 7, 2025 11:26
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.

RFC: Ignore/Skip test or test case How to ignore particular test case (DataRow)
2 participants