EarlGrey 一个原生iOS UI自动化测试框架

网友投稿 846 2022-10-27

EarlGrey 一个原生iOS UI自动化测试框架

EarlGrey  一个原生iOS UI自动化测试框架

EarlGrey

EarlGrey is a native iOS UI automation test framework that enables you to write clear, concise tests.

With the EarlGrey framework, you have access to enhanced synchronization features. EarlGrey automatically synchronizes with the UI, network requests, and various queues; but still allows you to manually implement customized timings, if needed.

EarlGrey’s synchronization features help to ensure that the UI is in a steady state before actions are performed. This greatly increases test stability and makes tests highly repeatable.

EarlGrey works in conjunction with the XCTest framework and integrates with Xcode’s Test Navigator so you can run tests directly from Xcode or the command line (using xcodebuild).

Getting Started

The EarlGrey documentation for users is located in the EarlGrey/docs folder. To get started, review the EarlGrey features, check for backward compatibility, and then install/run EarlGrey with your test target. After everything is configured, take a look at the EarlGrey API and start writing your own tests.

FeaturesBackward CompatibilityInstall and RunAPICheat Sheet

Getting Help

If you need help, several resources are available. First check the FAQ. If you have more questions after reading the FAQ, see Known Issues. You can bring more specific issues to our attention by asking them on stackoverflow.com using the #earlgrey tag. You can also start new discussions with us on our Google group or request to join our slack channel.

FAQ - Frequently Asked QuestionsIFAQ - Infrequently Asked QuestionsKnown IssuesStack OverflowSlackGoogle Group

Analytics

To prioritize and improve EarlGrey, the framework collects usage data and uploads it to Google Analytics. More specifically, the framework collects the MD5 hash of Bundle ID, Test Class Names and Test Method Names. This information allows us to measure the volume of usage. For more detailed information about our analytics collection, please peruse the GREYAnalytics.m file which contains the implementation details. If they wish, users can choose to opt out by disabling the Analytics config setting in their test’s - (void)setUp method:

In Objective-C:

// Disable analytics.[[GREYConfiguration sharedInstance] setValue:@(NO) forConfigKey:kGREYConfigKeyAnalyticsEnabled];

In Swift:

// Disable analytics.GREYConfiguration.sharedInstance().setValue(false, forConfigKey: kGREYConfigKeyAnalyticsEnabled)

For Contributors

Please make sure you’ve followed the guidelines in CONTRIBUTING.md before making any contributions.

Setup an EarlGrey Project

Clone the EarlGrey repository from GitHub:

git clone https://github.com/google/EarlGrey.git

After you have cloned the EarlGrey repository, download all the dependencies using setup-earlgrey.sh.After the script completes successfully, open EarlGrey.xcodeproj and ensure that all the targets build.You can now use EarlGrey.xcodeproj to make changes to the framework.

Add and Run Tests

Unit Tests

To add unit tests for EarlGrey, use UnitTests.xcodeproj located at Tests/UnitTests. To run all unit tests, select the UnitTests Scheme and press Cmd+U.

Functional Tests

To add functional tests for EarlGrey, use the FunctionalTests.xcodeproj located at Tests/FunctionalTests. To run all functional tests, select the FunctionalTests Scheme and press Cmd+U.

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:Completor是vim8的一个异步代码完成框架
下一篇:原因分析IDEA导入Spring
相关文章

 发表评论

暂时没有评论,来抢沙发吧~