如何将 xcode 5 测试用例分组到测试套件中 [英] How to group xcode 5 test cases into test suites

查看:29
本文介绍了如何将 xcode 5 测试用例分组到测试套件中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 xcode 5 测试导航器来运行我的测试,但一件痛苦的事情是我需要一些时间来测试我的应用程序的整个层(比如模型).我想要一种将测试分组为逻辑单元的方法.我可能会为此目的使用测试目标,但我认为这不是一种有效的方法.

I use xcode 5 test navigator to run my test, but one painful thing is that I need sometime to test whole layers of my app (say the models). I would like a way to group tests into logical units. I could probably use Test targets for that purpose but I don't think that's an efficient way.

推荐答案

为每个逻辑单元创建测试用例类将在测试导航器中对它们进行分组.选择 File > New > File 将新的测试用例类添加到您的项目中.

Creating a test case class for each of your logical units will group them in the test navigator. Choose File > New > File to add a new test case class to your project.

如果您将光标移到测试导航器中的测试用例类上,类旁边会出现一个小的运行按钮.单击按钮仅运行该类的测试.

If you move the cursor over a test case class in the test navigator, a small Run button will appear next to the class. Click the button to run only the tests for that class.

这篇关于如何将 xcode 5 测试用例分组到测试套件中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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