uloop-run-tests

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

uloop 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
XmlPath
for detailed failure diagnosis.
执行Unity Test Runner。当测试失败时,会自动保存包含错误信息和堆栈跟踪的NUnit XML结果文件。可读取
XmlPath
路径下的XML文件以进行详细的失败诊断。

Usage

使用方法

bash
uloop run-tests [options]
bash
uloop run-tests [options]

Parameters

参数

ParameterTypeDefaultDescription
--test-mode
string
EditMode
Test mode:
EditMode
,
PlayMode
--filter-type
string
all
Filter type:
all
,
exact
,
regex
,
assembly
--filter-value
string-Filter value (test name, pattern, or assembly)
参数类型默认值描述
--test-mode
字符串
EditMode
测试模式:
EditMode
PlayMode
--filter-type
字符串
all
筛选类型:
all
exact
regex
assembly
--filter-value
字符串-筛选值(测试名称、正则表达式或程序集)

Examples

示例

bash
undefined
bash
undefined

Run 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."
undefined
uloop run-tests --filter-type regex --filter-value ".Integration."
undefined

Output

输出结果

Returns JSON with:
  • Success
    (boolean): Whether all tests passed
  • Message
    (string): Summary message
  • TestCount
    (number): Total tests executed
  • PassedCount
    (number): Passed tests
  • FailedCount
    (number): Failed tests
  • SkippedCount
    (number): Skipped tests
  • XmlPath
    (string): Path to NUnit XML result file (auto-saved when tests fail)
返回包含以下字段的JSON:
  • Success
    (布尔值):是否所有测试均通过
  • Message
    (字符串):摘要信息
  • TestCount
    (数字):执行的测试总数
  • PassedCount
    (数字):通过的测试数量
  • FailedCount
    (数字):失败的测试数量
  • SkippedCount
    (数字):跳过的测试数量
  • XmlPath
    (字符串):NUnit XML结果文件的路径(测试失败时自动保存)

XML Result File

XML结果文件

When tests fail, NUnit XML results are automatically saved to
{project_root}/.uloop/outputs/TestResults/<timestamp>.xml
. The XML contains per-test-case results including:
  • Test name and full name
  • Pass/fail/skip status and duration
  • For failed tests:
    <message>
    (assertion error) and
    <stack-trace>
当测试失败时,NUnit XML结果会自动保存到
{project_root}/.uloop/outputs/TestResults/<timestamp>.xml
。该XML文件包含每个测试用例的结果,包括:
  • 测试名称和完整名称
  • 测试状态(通过/失败/跳过)和耗时
  • 对于失败的测试:
    <message>
    (断言错误)和
    <stack-trace>
    (堆栈跟踪)