Skip to content
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

Restore on-device testing in iOS 7 #17

Open
wants to merge 31 commits into
base: master
Choose a base branch
from

Conversation

MichaelBuckley
Copy link
Contributor

This is, unfortunately, not a clear win, so I'm sending it out for feedback.

I came to the conclusion that there was no way to use the UIAutomation APIs which Pete figured out how to wrap ( http://blog.thepete.net/blog/2012/08/20/introducing-publicautomation/ ). The core issue here is that Apple has locked it off, and you need a special entitlement to use it. You cannot generate this entitlement yourself when signing your app. Only Apple-approved apps can use UIAutomation.

So I switched Frank to simulate UIEvents, which is what KIF does. In fact, most of this change pulls in some more code from KIF. I don't think there's a licensing problem here, since we're already using some KIF code, but please feel free to correct me. I used KIF because I wanted to get this done as quickly as possible. As a result, the code is not as clean as it could be, but we can fix that in the future.

As part of this change, I updated the Controls example for iOS 7. I was able to run all of its tests on my iPhone 5 running iOS 7, as well as in the simulator.

@moredip
Copy link
Member

moredip commented Jan 22, 2014

I posted my thought on this to the Frank mailing list: https://groups.google.com/forum/#!topic/frank-discuss/9Da9wT66kJI

@MichaelBuckley
Copy link
Contributor Author

Hey all,

I have run into a bit of a road-bump with PublicAutomation and
swipe-to-delete. In UIAutomationBridge.h in the PublicAutomation project,
there's a constant, BIG_RATIO, which defines how far to slide the table row
to make the delete button appear. Using KIF, I was able to increase this
value from 0.3 to 0.4 to get swipe-to-delete working. With
PublicAutomation, I have had to increase this value to 0.55, but I'm having
a problem.

Any less than 0.55, and the row will slide back closed. Any further, and
the row will also slide back closed. This is what I would expect.

However, I never see the delete button. Even during the start of the slide,
the delete button never appears. In KIF, when this value is too low, the
row starts to show the delete button, slides away to show almost half of
it, but then slides back to hide the button. With PublicAutomation, I never
see any part of the delete button, but the "Edit" button changes to "Done".
More frustratingly, hitting the "Done" button puts the table into edit
mode, and the button remains "Done".

So my question is this: Is anyone familiar with UIAutomation (the
Javascript testing framework in Instruments) to check to see if they can
make a Javascript slide-to-delete using UIAutomation in iOS 7? I'm curious
to see whether it's not possible with UIAutomation. If it is possible, I
may be able to model PublicAutomation after the Javascript code.

Thanks!

On Wed, Jan 22, 2014 at 11:54 AM, Pete Hodgson [email protected]:

I posted my thought on this to the Frank mailing list:
https://groups.google.com/forum/#!topic/frank-discuss/9Da9wT66kJI

Reply to this email directly or view it on GitHubhttps://github.com//pull/17#issuecomment-33060649
.

@moredip
Copy link
Member

moredip commented Feb 4, 2014

Might be worth posting this question on the Frank mailing list.

Cheers,

Pete

Typed on a little bitty keyboard

On Feb 3, 2014, at 5:22 PM, Michael Buckley [email protected] wrote:

Hey all,

I have run into a bit of a road-bump with PublicAutomation and
swipe-to-delete. In UIAutomationBridge.h in the PublicAutomation project,
there's a constant, BIG_RATIO, which defines how far to slide the table row
to make the delete button appear. Using KIF, I was able to increase this
value from 0.3 to 0.4 to get swipe-to-delete working. With
PublicAutomation, I have had to increase this value to 0.55, but I'm having
a problem.

Any less than 0.55, and the row will slide back closed. Any further, and
the row will also slide back closed. This is what I would expect.

However, I never see the delete button. Even during the start of the slide,
the delete button never appears. In KIF, when this value is too low, the
row starts to show the delete button, slides away to show almost half of
it, but then slides back to hide the button. With PublicAutomation, I never
see any part of the delete button, but the "Edit" button changes to "Done".
More frustratingly, hitting the "Done" button puts the table into edit
mode, and the button remains "Done".

So my question is this: Is anyone familiar with UIAutomation (the
Javascript testing framework in Instruments) to check to see if they can
make a Javascript slide-to-delete using UIAutomation in iOS 7? I'm curious
to see whether it's not possible with UIAutomation. If it is possible, I
may be able to model PublicAutomation after the Javascript code.

Thanks!

On Wed, Jan 22, 2014 at 11:54 AM, Pete Hodgson [email protected]:

I posted my thought on this to the Frank mailing list:
https://groups.google.com/forum/#!topic/frank-discuss/9Da9wT66kJI

Reply to this email directly or view it on GitHubhttps://github.com//pull/17#issuecomment-33060649
.


Reply to this email directly or view it on GitHub.

@MichaelBuckley
Copy link
Contributor Author

Quite right. I thought this would go to the mailing list. Sorry!

On Tue, Feb 4, 2014 at 11:13 AM, Pete Hodgson [email protected]:

Might be worth posting this question on the Frank mailing list.

Cheers,

Pete

Typed on a little bitty keyboard

On Feb 3, 2014, at 5:22 PM, Michael Buckley [email protected]
wrote:

Hey all,

I have run into a bit of a road-bump with PublicAutomation and
swipe-to-delete. In UIAutomationBridge.h in the PublicAutomation
project,
there's a constant, BIG_RATIO, which defines how far to slide the table
row
to make the delete button appear. Using KIF, I was able to increase this
value from 0.3 to 0.4 to get swipe-to-delete working. With
PublicAutomation, I have had to increase this value to 0.55, but I'm
having
a problem.

Any less than 0.55, and the row will slide back closed. Any further, and
the row will also slide back closed. This is what I would expect.

However, I never see the delete button. Even during the start of the
slide,
the delete button never appears. In KIF, when this value is too low, the
row starts to show the delete button, slides away to show almost half of
it, but then slides back to hide the button. With PublicAutomation, I
never
see any part of the delete button, but the "Edit" button changes to
"Done".
More frustratingly, hitting the "Done" button puts the table into edit
mode, and the button remains "Done".

So my question is this: Is anyone familiar with UIAutomation (the
Javascript testing framework in Instruments) to check to see if they can
make a Javascript slide-to-delete using UIAutomation in iOS 7? I'm
curious
to see whether it's not possible with UIAutomation. If it is possible, I
may be able to model PublicAutomation after the Javascript code.

Thanks!

On Wed, Jan 22, 2014 at 11:54 AM, Pete Hodgson [email protected]:

I posted my thought on this to the Frank mailing list:
https://groups.google.com/forum/#!topic/frank-discuss/9Da9wT66kJI

Reply to this email directly or view it on GitHub<
https://github.com/TestingWithFrank/Frank/pull/17#issuecomment-33060649>
.

Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHubhttps://github.com//pull/17#issuecomment-34095474
.

Conflicts:
	Frank.xcodeproj/project.pbxproj
	lib/PublicAutomation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants