在 xcode ui test 中运行所有测试类 [英] run all test classes in xcode ui test

查看:24
本文介绍了在 xcode ui test 中运行所有测试类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对 xcode ui 应用程序测试完全陌生.我有 ios 应用程序的源代码.但我必须使用 xcode ui test 来测试应用程序.目前我正在通过创建新文件并通过记录添加测试用例来向我的 ui 测试添加新的测试类.

i am completely new to xcode ui application test. i have the source of the ios app. But i have to test the app using xcode ui test. currently i am adding new test classes to my ui test by creating new file and adding test cases by recording.

我可以单独运行我的测试类.但我想一次执行我所有的测试类.我该怎么做.

I can run my test class individually. But i want to execute all my test classes at a time. How i can do this.

我是这个领域的新手.任何形式的帮助将不胜感激.

I am completely new in this domain. Any kind of help will be appreciated.

你也可以给我一个ui测试项目链接或任何可以帮助我的链接.我浏览了 apple.developers 网站.

U can also give me a ui test project link or any link which can help me. I have gone through the apple.developers website.

推荐答案

要运行所有测试,您可以在终端中使用以下命令:

To run all of your tests, you can use the following command in Terminal:

$ xcodebuild test

或者,您可以使用扫描以获得更简单的界面.

Alternatively, you can use Scan for a simpler interface.

要自动运行测试,您可以创建一个 shell 脚本来运行此命令.如果您希望 shell 脚本自动运行,请使用 Jenkins 或类似的持续集成软件以指定的时间间隔运行 shell 脚本.

To automate the running of your tests, you can create a shell script to run this command. If you want the shell script to run automatically, use Jenkins or similar continuous integration software to run the shell script at specified intervals.

您可以使用 xcodebuildscan 设置作业来运行您的测试,并在作业完成或失败时发送电子邮件.这里有一篇关于如何在 OS X 上安装 Jenkins 的优秀博客文章:https://nickcharlton.net/posts/installing-jenkins-osx-yosemite.html 并且我写了一篇博客文章,其中包含一些可能会引起您注意配置的注意事项:http://qualitytesting.tumblr.com/post/142473883709/building-with-jenkins-and-xcode.电子邮件功能默认可用,因此您只需在配置工作时配置要接收通知的电子邮件地址.

You can set a job up to run your tests using xcodebuild or scan, and send an email when the job completes, or just when it fails. There's an excellent blog post on how to install Jenkins on OS X here: https://nickcharlton.net/posts/installing-jenkins-osx-yosemite.html and I've written a blog post with notes about some things that might catch you out with the configuration: http://qualitytesting.tumblr.com/post/142473883709/building-with-jenkins-and-xcode. The email feature is available by default so you just need to configure the email addresses you want to receive the notification when you configure your job.

要在 Xcode 中运行所有测试,您可以使用 cmd+U 或转到左侧的测试导航器,然后单击将鼠标悬停在测试套件上时出现的播放按钮.

To run all the tests inside Xcode, you can use cmd+U or go to the Test Navigator on the left-hand side and click the play button that appears when you hover over your test suite.

这篇关于在 xcode ui test 中运行所有测试类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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