XCode 5 测试符号“rT"意味着什么? [英] XCode 5 Testing symbol "rT" means what?

查看:19
本文介绍了XCode 5 测试符号“rT"意味着什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 XCode 5 项目中有 2 个测试类:

I have 2 test classes in a XCode 5 project:

ABCDataModelTests.{h,m}

ABCDataModelTests.{h,m}

- (void)testAlwaysPassing { ... }

ABCDataModelListColorsTests.m 继承自 ABCDataModelTests.

ABCDataModelListColorsTests.m which inherits from ABCDataModelTests.

- (void)testNumberOfListColorsGreaterThan7 { ... }

当我运行测试时,我注意到子类的测试下面有一个符号rT",如图所示.

When I ran the test, I noticed that there is a symbol "rT" underneath the subclass's tests as shown in the picture.

rT"代表什么?注意子类继承了测试方法testAlwaysPassing".

What does "rT" stand for? Note that the subclass inherits the test method "testAlwaysPassing."

我在 Apple 文档中找不到关于XCode 5/5.0.1 中的新功能"的任何内容 是否有任何关于所有符号代表什么的文档?

I can't find anything in the Apple documentation for "New Features in XCode 5/5.0.1" Is there any documentation for what all the symbols stand for?

推荐答案

我在一些论坛上找到了这个信息:

I found this information on some forums:

在 SenTestingKit/OCUnit/XCTest 中执行操作的标准方法是在代码中声明您的测试.如果这样做,Xcode 将使用索引静态地(即不在运行时)发现它们.一旦 Xcode 发现这些测试,它们就会显示在带有t"图标的测试导航器中.到目前为止一切顺利.

The standard way to do things in SenTestingKit/OCUnit/XCTest is to declare your tests in code. If you do, Xcode will discover them statically (ie. not at runtime) using the index. Once Xcode these tests are discovered, they show up in the test navigator with a "t" icon. So far so good.

现在,SenTestingKit/OCUnit/XCTest 框架还允许您在运行时即时创建测试.我们的一些用户创造性地使用此功能,可能是为了包装外部测试系统或创建测试来表示一组动态数据.Xcode 无法静态地发现这些测试,只有在测试运行期间返回结果时才能发现它们的存在.发现后,它们将显示在带有rT"图标的测试导航器中.rT"是运行时发现的测试"的缩写.

Now, the SenTestingKit/OCUnit/XCTest frameworks also allow you to create tests on the fly at runtime. Some of our users make creative user of this capability, perhaps to wrap an external testing system or to create tests to represent a dynamic set of data. Xcode cannot discover these tests statically, and only find out about their existence when they are returning resutls during a test run. When discovered, they will show up in the test navigator with a "rT" icon. "rT" being short for "runtime discovered tests".

最后.如果您的项目有任何错误/异常阻止索引完成或正确解析您的测试类,那么您的测试将不会被静态发现.您仍然可以成功构建和运行它们,在这种情况下,Xcode 最终会将它们视为运行时发现的测试,并为它们提供rT"图标.

Finally. If there's anything wrong / unusual about your project that prevents indexing from completing or from properly parsing your test classes, then your tests wouldn't be statically discovered. You may still successfully build and run them, in which case Xcode would end up treating them as runtime discovered tests, and give them the "rT" icon.

这篇关于XCode 5 测试符号“rT"意味着什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆