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

查看:106
本文介绍了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无法静态发现这些测试,只能在测试运行期间返回resutls时查明它们的存在。发现后,它们将在测试导航器中显示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天全站免登陆