如何将 xcode 5 测试用例分组到测试套件中

编程入门 行业动态 更新时间:2024-10-28 12:26:19
本文介绍了如何将 xcode 5 测试用例分组到测试套件中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我使用 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屋!

更多推荐

[db:关键词]

本文发布于:2023-04-30 22:26:43,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1401161.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:测试   套件   如何将   xcode

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!