zalando / SwiftMonkey

A framework for doing randomised UI testing of iOS apps
MIT License
1.95k stars 174 forks source link

EXC_BAD_ACCESS on addXCTestTapAction #92

Closed val0904 closed 4 years ago

val0904 commented 4 years ago

I'm getting a strange issue let multiTouchMonkey = Monkey(frame: app.frame) multiTouchMonkey.addXCTestTapAction(weight: 1, multipleTapProbability: 0.5, multipleTouchProbability: 0.5) multiTouchMonkey.monkeyAround(forDuration: 60)

Снимок экрана 2020-05-27 в 16 13 24

Monkey works properly in other tests but here it always fails on the start.

Xcode 11.4.1, simulator iPhone SE 2nd generation

wojciechczerski commented 4 years ago

Thank you very much for the report @val0904. I have tested it locally and I can reproduce the error. I will try to fix it and will give you an update on the progress.

wojciechczerski commented 4 years ago

The source of this issue is the same as mentioned here. Apple removed the XCEventGenerator class that SwiftMonkey was using for event generation. For now, what should work is to use the addXCTestPublic* methods. Would it work for you to use the addXCTestPublicTapAction method instead?

val0904 commented 4 years ago

Yes, it does. Thank you!