Skip to content

test: report unavailable-pipeline graphics tests as Skipped, not Inconclusive - #1294

Merged
Scriptwonder merged 1 commit into
CoplayDev:betafrom
Scriptwonder:test/graphics-assume-to-ignore
Jul 28, 2026
Merged

Scriptwonder merged 1 commit into
CoplayDev:betafrom
Scriptwonder:test/graphics-assume-to-ignore

Conversation

@Scriptwonder

@Scriptwonder Scriptwonder commented Jul 28, 2026 •

Copy link
Copy Markdown
Collaborator

The problem

ManageGraphicsTests guards 18 environment-dependent tests with Assume.That, which yields Inconclusive. Three consumers disagree about what Inconclusive means:

Consumer Interpretation
Test Runner window renders it with a failure icon
run_tests summary excludes it from summary.total
run_tests progress includes it in progress.total
failures_so_far ignores it entirely

So a completely clean suite reports progress.total 1168 against summary.total 1150, and anyone reading the Test Runner window concludes 18 tests are broken. That is exactly what happened, and it cost real triage time.

TestProjects/UnityMCPTests runs the Built-in pipeline with no render-pipelines-core, so manage_graphics ping returns hasVolumeSystem/hasURP/hasHDRP all false and all 18 guards trip. This reproduces on a pristine beta checkout.

The fix

Assert.Ignore behind an explicit condition — NUnit has no condition-taking overload, hence the if. That buckets them as Skipped:Ignored, which every consumer already agrees on, and drops the misleading Expected: True / But was: False text from the message.

This matches the convention already used elsewhere in the suite for exactly this "environment not available" pattern: WriteToConfigTests.cs:44, StdioBridgeReconnectTests.cs:30, ManageSceneMultiSceneTests.cs:28.

The two helpers are renamed AssumeVolumeSystem → RequireVolumeSystem and AssumeURP → RequireURP, since Assume* named the very NUnit API being dropped. That accounts for the 17 otherwise-mechanical call-site lines in the diff.

Result

Full EditMode suite on 2021.3.45f2:

before after
progress.total 1168 1168
summary.total 1150 1168
passed 1094 1094
failed 0 0
skipped 56 74

passed is unchanged, and the two totals now reconcile.

Scope note

This does not change the run's top-level resultState, which stays "Skipped:Ignored" — roughly 56 legitimately-skipped tests already force that on a pristine beta. Flagging it because it matters for any future CI gate: "Skipped:Ignored" is not "Passed", so a gate keyed on resultState would report false red on a clean suite. That is a separate problem from this PR.

Four Assert.Inconclusive calls elsewhere (MCPToolParameterTests.cs:200, UIDocumentSerializationTests.cs:105/136/232) are left alone — they currently pass, and changing the failure mode of passing tests would be speculative.

Summary by CodeRabbit

  • Tests
    • Improved handling of unavailable rendering systems during graphics tests.
    • Tests now skip cleanly when required volume, URP, or HDRP functionality is not available.
    • Updated pipeline settings coverage to avoid inconclusive results when supported pipelines are absent.

…nclusive

The 18 environment guards in ManageGraphicsTests used Assume.That, which
yields Inconclusive. Three consumers disagree about what that means: the
Test Runner window paints it with a failure icon, run_tests drops it from
summary.total while progress.total still counts it (1150 vs 1168), and
failures_so_far ignores it. A clean suite therefore reads as 18 failures.

Use Assert.Ignore behind an explicit condition instead, matching the
existing convention in WriteToConfigTests, StdioBridgeReconnectTests and
ManageSceneMultiSceneTests. The helpers are renamed Require* since Assume*
named the very API being dropped.

Full EditMode suite on 2021.3.45f2 before: 1150 total / 1094 passed / 0 failed
/ 56 skipped, with 18 inconclusive unaccounted for. After: 1168 / 1094 / 0 / 74,
and the two totals reconcile.
Copilot AI review requested due to automatic review settings July 28, 2026 16:19
@coderabbitai

coderabbitai Bot commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: afe414bd-d4c5-4c66-befc-625110f02c5b

📥 Commits

Reviewing files that changed from the base of the PR and between bd72241 and aaef1df.

📒 Files selected for processing (1)
  • TestProjects/UnityMCPTests/Assets/Tests/EditMode/Tools/ManageGraphicsTests.cs

📝 Walkthrough

Walkthrough

Graphics EditMode tests now skip with Assert.Ignore when volume, URP, or HDRP systems are unavailable, replacing inconclusive assumption-based preconditions.

Changes

Graphics test gating

Layer / File(s) Summary
Volume system skip handling
TestProjects/UnityMCPTests/Assets/Tests/EditMode/Tools/ManageGraphicsTests.cs
Volume-related tests use RequireVolumeSystem() and skip with Assert.Ignore when the volume system is unavailable.
Pipeline and URP skip handling
TestProjects/UnityMCPTests/Assets/Tests/EditMode/Tools/ManageGraphicsTests.cs
Pipeline settings and URP feature tests use Assert.Ignore-based preconditions when the required render pipeline is unavailable.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: copilot

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main change from Inconclusive to Skipped reporting.
Description check ✅ Passed It covers the problem, fix, result, and testing context, though some template fields like type of change and related issues are omitted.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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

This PR updates Unity EditMode graphics tests to report environment-dependent cases as Skipped (Ignored) instead of Inconclusive, improving consistency across Unity Test Runner UI and run_tests aggregation.

Changes:

  • Replaced Assume.That(...) environment guards with if (...) Assert.Ignore(...) so unavailable graphics features are treated as skipped.
  • Renamed helper methods from Assume* to Require* to reflect the new behavior and updated call sites accordingly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Scriptwonder
Scriptwonder merged commit e8fe7fe into CoplayDev:beta Jul 28, 2026
3 checks passed
@Scriptwonder
Scriptwonder deleted the test/graphics-assume-to-ignore branch July 28, 2026 18:39
toxifly pushed a commit to toxifly/unity-mcp that referenced this pull request Nov 26, 2026
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.

2 participants