Skip to content

Test MSTEST0001 adapter flag parsing - #10631

Open
Amaury Levé (Evangelink) wants to merge 1 commit into
mainfrom
dev/amauryleve/test-mstest0001-config-parsing
Open

Test MSTEST0001 adapter flag parsing#10631
Amaury Levé (Evangelink) wants to merge 1 commit into
mainfrom
dev/amauryleve/test-mstest0001-config-parsing

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Summary

  • centralize MSTEST0001 analyzer-config setup so tests can provide raw adapter flag values
  • cover explicit false, invalid text, and case-insensitive true parsing
  • retain the existing absent-property and lowercase-true diagnostic baselines

Validation

  • MSTest.Analyzers.UnitTests build for net472 and net8.0
  • full suite: 1728 passed on net472; 1786 passed on net8.0
  • focused suite after two independent reviews: 11 passed on each target framework

Closes #10588

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings August 18, 2026 10:06
@Evangelink Amaury Levé (Evangelink) added the state/needs-review Awaiting review from the team. label Aug 18, 2026

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

Adds edge-case coverage for MSTEST0001 adapter-flag parsing.

Changes:

  • Centralizes analyzer-config setup for raw adapter values.
  • Tests false, invalid, and case-insensitive true values.
  • Preserves existing absent-property and lowercase-true coverage.
Show a summary per file
File Description
test/UnitTests/MSTest.Analyzers.UnitTests/UseParallelizeAttributeAnalyzerTests.cs Adds data-driven adapter-flag parsing tests.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Balanced

@github-actions github-actions Bot 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.

Note

🤖 Automated review by GitHub Copilot. Generated by the Expert Code Review workflow. To request a follow-up action, reply by tagging @copilot directly.

Review Summary — All Clear ✅

# Dimension Verdict
1 Algorithmic Correctness N/A — test-only
2 Threading & Concurrency N/A
3 Security & IPC Contract Safety N/A
4 Public API & Binary Compatibility N/A — no public API change
5 Performance & Allocations N/A — test code
6 Cross-TFM Compatibility N/A
7 Resource Management N/A
8 Error Handling N/A
9 Naming & Readability ✅ Clear test name and parameterization
10 Test Quality ✅ Good coverage of edge cases (case-insensitivity, invalid values)
11 Localization N/A
12 Documentation N/A
13 Configuration & Options N/A
14 Logging & Diagnostics N/A
15 Serialization N/A
16 Build & Packaging N/A
17 Telemetry N/A
18 Extension Points N/A
19 Cancellation N/A
20 Nullability ✅ Correct use of string? for optional parameter
21 Code Style ✅ Consistent with existing patterns
22 PowerShell & Scripting N/A

Verdict: No actionable findings. The new [DataRow] parameterized test properly validates case-insensitive parsing of the IsMSTestTestAdapterReferenced build property and graceful handling of non-boolean values. The helper method refactoring cleanly separates the boolean convenience overload from the raw-string overload.

@github-actions

Copy link
Copy Markdown
Contributor

🧵 Parallel-safety audit — PR #10631

Nothing audited here touches process-global state, shared filesystem paths, or [ResourceLock] / [DoNotParallelize] declarations. The only change is to test/UnitTests/MSTest.Analyzers.UnitTests/UseParallelizeAttributeAnalyzerTests.cs, which adds a new [DataRow]-driven [TestMethod] (WhenNoAttributeSpecified_AdapterFlagValue_ProducesExpectedDiagnostic) and refactors the private VerifyAsync helper to accept a raw .globalconfig flag value instead of a bool. The helper builds a self-contained VerifyCS.Test instance per call (its own TestCode/AnalyzerConfigFiles), touches no static/shared state, no environment variables, no filesystem paths, and no [ResourceLock]/[DoNotParallelize] declarations were added, removed, or already present. Nothing to flag for parallel-safety.

Audited MSTest.Analyzers.UnitTests at scope MethodLevel (from [assembly: Parallelize(Scope = ExecutionScope.MethodLevel, Workers = 0)] in Program.cs), workers CPU count.

Re-run with /parallel-audit.

🤖 Automated content by GitHub Copilot. Generated by the Parallel-safety audit on PR (on open / sync) workflow. · auto · 47.1 AIC · ⌖ 11.1 AIC · ⊞ 24.8K · [◷]( · )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state/needs-review Awaiting review from the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[test-improver] test: add edge case tests for UseParallelizeAttributeAnalyzer adapter flag handling

3 participants