-
Notifications
You must be signed in to change notification settings - Fork 744
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EarlGrey 2.0 Prototype (multiprocess, XCUITest support) #193
Conversation
Do we need IPC if we can just link in Facebook's XCUITest library? |
3f17553
to
76c9a40
Compare
If your only goal is to use XCUITest and EarlGrey together, no. Multiprocess design has other advantages though, not just XCUITest support. With it, the prototype can today inject EarlGrey into SpringBoard on iOS simulator and confirm system alert dialogs using EarlGrey API. In the future it can be extended to inject EarlGrey into any application on iOS simulator and on jailbroken iOS devices, and allow testing of Today widgets, Notifications, iMessage extensions, Siri extensions, Maps extensions, other app extensions, and anything else that requires testing in apps that you cannot compile and deploy yourself such as SpringBoard, Calendar, Photos, and Mobile Safari. All of this within a single test. |
154ef63
to
8e1e123
Compare
- (void)launch; | ||
- (void)terminate; | ||
|
||
- (BOOL)isHealthy; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to have this documented.
2b23255
to
e1d43f0
Compare
f59dee6
to
31ffb66
Compare
0b6422d
to
1739c16
Compare
Is real device supported to confirm system alert dialogs using EarlGrey API? |
@Liusunming the current prototype being worked out will be using XCUITest API's to work with System Dialogs on sim/device. |
@tirodkar, does it only work within UI testing target, but not Unit testing target? In the testSystemDialog example, it just return if not on simulator: // Interaction with SpringBoard is not on device or before iOS 9. |
@Liusunming Yes, EarlGrey 2.0 will only work in the XCUITestCase context. |
@tirodkar thank you so much. I used EarlGrey together with WebDriverAgentLib to confirm system alert dialogs. |
@Liusunming do you mind sharing more info about how you do it? |
Use FBAlert of WebDriverAgentLib with EarlGrey2.0 in XCUITestCase. |
Hi, is there a timeline for Earl Grey 2.0? Will you be able to use XCUITest calls like |
@eder7 We're currently developing 2.0. As soon as we have it vetted internally, we'll have it announced here. We're keeping the current EarlGrey syntax, so instead of Is there any other particular XCUITest api that you need to use? |
To answer @eder7's question: Yes you would be able to because after all it's running within an XCUITest. |
@khandpur but it is not using EarlGrey's property if you are using app.buttons["2"].tap(). |
That's right. The test is run in the same context so user can choose to use xcuitest apis directly but will lose all the features offered by EarlGrey. |
EarlGrey 2 does this! |
Here's something I made this summer. You can look over the tests to understand how to use it, and read the code to understand how it works.
I didn't add any tests using XCUITest API, feel free to add your own.
I also wrote a doc about it, feel free to comment on it:
https://docs.google.com/document/d/1nlJKiPvW4s_4XkeV9fMP-s90FoPAuGRTBoHCyz3F2nE/edit?usp=sharing
It's just a prototype, so expect to find bugs.
Resolves #63.