feat: test runner and ScriptableObject commands (v2.2.0) - #16
Merged
Merged
Conversation
- editor/test.run starts a Unity Test Framework run (EditMode or PlayMode) and editor/test.status reports the latest run with structured results; state survives domain reloads via Temp/CSharpConsole/test_run_state.json and editor restarts are reported as aborted via a SessionState flag. - The commands stay registered without com.unity.test-framework and return an explanatory error, keeping the registry uniform for discovery; the optional dependency is gated by an asmdef versionDefine. - scriptableobject/create|get|modify manage ScriptableObject assets by type name and serialized fields, mirroring the material/component patterns. - READMEs document the new commands (61 built-ins across 14 namespaces) and state the trusted-LAN service model explicitly. - Version 2.2.0 (additive; protocol stays 1). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The editor recreates Temp on every start, so a run interrupted by a crash or quit lost its record and reported idle instead of aborted. Library survives restarts, making the orphaned-run reconciliation reachable. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds two capability groups to the command surface and bumps the package to 2.2.0.
Test runner —
editor/test.run,editor/test.statusDrives the Unity Test Framework through
TestRunnerApi.test.runstarts anEditMode or PlayMode run with optional
testNames/groupNamesfilters andreturns a run id;
test.statusreports the phase and the structured result(counts, duration, and up to 25 failures with truncated messages).
Two details worth review attention:
com.unity.test-frameworkis absent.The CLI's overlay validation requires strict overlay↔registry equality, so
conditional registration would break discovery in projects without the
framework. Instead an
asmdefversionDefinesentry gates theimplementation, and the absent case returns an explanatory validation error.
Library/CSharpConsole/test_run_state.json. Theeditor recreates
Temp/on every start, so a record kept there could neversurvive to report an interrupted run as
aborted. ASessionStatesentineldistinguishes "still running in this session" from "the editor restarted
mid-run", and
[InitializeOnLoadMethod]re-registers the callbacks aftereach domain reload.
ScriptableObject authoring —
scriptableobject/create|get|modifyCreates SO assets by type name and reads/writes their serialized fields via
SerializedObject, following the existing material command idiom. Save pathsmust sit under
Assets/and end in.asset; the type must be a concreteScriptableObject.Also
interfaces without authentication by design and must not be exposed to
untrusted networks.
the registry holds 56 (51 authoring + 5 control), now 61 with these five.
Validation
Live-tested on two projects, including one using HybridCLR/IL2CPP: editor
compile, full EditMode suite, PlayMode run, and a Windows IL2CPP development
build. The build confirms the new
asmdefTestRunner references do not reachthe player (
ScriptingAssemblies.jsoncarries no TestRunner/NUnit), theruntime service starts and answers commands, and the editor-only commands are
correctly absent in the player.
🤖 Generated with Claude Code