uloop-run-tests
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseuloop run-tests
uloop run-tests
Execute Unity Test Runner. When tests fail, NUnit XML results with error messages and stack traces are automatically saved. Read the XML file at for detailed failure diagnosis.
XmlPath执行Unity Test Runner。当测试失败时,会自动保存包含错误信息和堆栈跟踪的NUnit XML结果文件。可读取路径下的XML文件以进行详细的失败诊断。
XmlPathUsage
使用方法
bash
uloop run-tests [options]bash
uloop run-tests [options]Parameters
参数
| Parameter | Type | Default | Description |
|---|---|---|---|
| string | | Test mode: |
| string | | Filter type: |
| string | - | Filter value (test name, pattern, or assembly) |
| 参数 | 类型 | 默认值 | 描述 |
|---|---|---|---|
| 字符串 | | 测试模式: |
| 字符串 | | 筛选类型: |
| 字符串 | - | 筛选值(测试名称、正则表达式或程序集) |
Examples
示例
bash
undefinedbash
undefinedRun all EditMode tests
运行所有EditMode测试
uloop run-tests
uloop run-tests
Run PlayMode tests
运行PlayMode测试
uloop run-tests --test-mode PlayMode
uloop run-tests --test-mode PlayMode
Run specific test
运行指定测试
uloop run-tests --filter-type exact --filter-value "MyTest.TestMethod"
uloop run-tests --filter-type exact --filter-value "MyTest.TestMethod"
Run tests matching pattern
运行匹配指定模式的测试
uloop run-tests --filter-type regex --filter-value ".Integration."
undefineduloop run-tests --filter-type regex --filter-value ".Integration."
undefinedOutput
输出结果
Returns JSON with:
- (boolean): Whether all tests passed
Success - (string): Summary message
Message - (number): Total tests executed
TestCount - (number): Passed tests
PassedCount - (number): Failed tests
FailedCount - (number): Skipped tests
SkippedCount - (string): Path to NUnit XML result file (auto-saved when tests fail)
XmlPath
返回包含以下字段的JSON:
- (布尔值):是否所有测试均通过
Success - (字符串):摘要信息
Message - (数字):执行的测试总数
TestCount - (数字):通过的测试数量
PassedCount - (数字):失败的测试数量
FailedCount - (数字):跳过的测试数量
SkippedCount - (字符串):NUnit XML结果文件的路径(测试失败时自动保存)
XmlPath
XML Result File
XML结果文件
When tests fail, NUnit XML results are automatically saved to . The XML contains per-test-case results including:
{project_root}/.uloop/outputs/TestResults/<timestamp>.xml- Test name and full name
- Pass/fail/skip status and duration
- For failed tests: (assertion error) and
<message><stack-trace>
当测试失败时,NUnit XML结果会自动保存到。该XML文件包含每个测试用例的结果,包括:
{project_root}/.uloop/outputs/TestResults/<timestamp>.xml- 测试名称和完整名称
- 测试状态(通过/失败/跳过)和耗时
- 对于失败的测试:(断言错误)和
<message>(堆栈跟踪)<stack-trace>