Skip to content

Conversation

@bitsandfoxes
Copy link
Contributor

@bitsandfoxes bitsandfoxes commented Jan 15, 2026

Problem

The SDK was lacking an easy to use way to run unit tests from commandline.

Proposal

Have a scripts/run-tests.ps1 that allows for running and parsing unit tests from commandline.

#skip-changelog

<Delete Files="$(UnityTestPlayModeResultFilePath)" />
<Exec EnvironmentVariables="IgnoreExitCode=true" Command="pwsh &quot;$(RepoRoot)scripts/unity.ps1&quot; $(UnityExec) -batchmode -nographics -runTests -testPlatform PlayMode -projectPath $(UnitySampleProjectPath) -testResults $(UnityTestPlayModeResultFilePath)" />
<UnityTestResults Path="$(UnityTestPlayModeResultFilePath)" />
<Exec Command="pwsh &quot;$(RepoRoot)scripts/report-test-results.ps1&quot; &quot;$(UnityTestPlayModeResultFilePath)&quot;" />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This now reuses the script that parses the test result for local development.

<Delete Files="$(UnityTestEditModeResultFilePath)" />
<Exec EnvironmentVariables="IgnoreExitCode=true" IgnoreStandardErrorWarningFormat="true" Command="pwsh &quot;$(RepoRoot)scripts/unity.ps1&quot; $(UnityExec) -batchmode -nographics -runTests -testPlatform EditMode -projectPath $(UnitySampleProjectPath) -testResults $(UnityTestEditModeResultFilePath)"/>
<UnityTestResults Path="$(UnityTestEditModeResultFilePath)" />
<Exec Command="pwsh &quot;$(RepoRoot)scripts/report-test-results.ps1&quot; &quot;$(UnityTestEditModeResultFilePath)&quot;" />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This now reuses the script that parses the test result for local development.

</Task>
</UsingTask>

<!-- Parse test results -->
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This now happens in report-test-results.ps1

@github-actions
Copy link
Contributor

github-actions bot commented Jan 16, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


This PR will not appear in the changelog.


🤖 This preview updates automatically when you update the PR.

@bitsandfoxes bitsandfoxes requested a review from a team January 16, 2026 10:45
@bitsandfoxes bitsandfoxes merged commit 6333bbf into main Jan 16, 2026
58 checks passed
@bitsandfoxes bitsandfoxes deleted the chore/testing-environment branch January 16, 2026 15:43
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.

3 participants