Skip to content

feat: Auto enable MTP testrunner - #3670

Draft
richardwerkman wants to merge 1 commit into
masterfrom
feature/3656-auto-enable-mtp
Draft

feat: Auto enable MTP testrunner#3670
richardwerkman wants to merge 1 commit into
masterfrom
feature/3656-auto-enable-mtp

Conversation

@richardwerkman

Copy link
Copy Markdown
Member

closes #3656

todo:

  • Investigate if this is the best way to detect MTP projects
  • Investigate if we can support both MTP and VSTest in one solution

Copilot AI review requested due to automatic review settings June 26, 2026 21:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
5.0% Coverage on New Code (required ≥ 80%)
1 New Minor Issues (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

{
foreach (var testProject in projectInfo.TestProjectsInfo.TestProjects)
{
if (testProject.AnalyzerResult.References.Any(r => r.Contains("Microsoft.Testing.Platform")))
Comment on lines +443 to +447
// act
var result = (await target.MutateProjectsAsync(options, _reporterMock.Object, mockRunner.Object)).ToList();

// assert - the MTP runner should have been created
mockRunner.Verify(r => r.DiscoverTestsAsync(It.IsAny<string>()), Times.Once);
}

[TestMethod]
public async Task ShouldUseMtpRunnerWhenNotExplicitlyConfiguredAndNoMtpProject()
Comment on lines 270 to +273
/// </summary>
/// The test runner to use for executing tests
/// <summary>
public TestRunner TestRunner { get; init; }
public TestRunner TestRunner { get; set; }
Comment on lines +53 to +54
TestRunner TestRunner { get; set; }
bool IsTestRunnerExplicitlyConfigured { get; }
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.

MTP Enable mtp testrunner when an mtp project is detected

2 participants