zalando / SwiftMonkey

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

Monkey test crash on iOS14.0, iOS14.2beta #95

Closed taonhannguyen closed 4 years ago

taonhannguyen commented 4 years ago

Hello. While SwiftMonkey seems to work great on iOS13 simulator, they are crashing in iOS14.0 and 14.2beta simulators, using either Xcode 12.0 and 12.2 beta

Screen Shot 2020-09-30 at 3 48 15 PM

Screen Shot 2020-09-30 at 3 56 13 PM

taonhannguyen commented 4 years ago

let monkey = Monkey(frame: app.frame) monkey.addDefaultUIAutomationActions() monkey.addXCTestTapAlertAction(interval: 100, application: app) monkey.monkeyAround()

wojciechczerski commented 4 years ago

Hey, could you try replacing the monkey.addDefaultUIAutomationActions with monkey.addDefaultXCTestPublicActions(app: application)?

taonhannguyen commented 4 years ago

Hi there First and foremost, thank you for your reply. Indeed, this has solved the trick and it works. That said, I would like to mention for those people using cocoapod that this API change is not available on release 2.1.1. The function you are describing has been implemented 1 month after release 2.1.1, so to get it I had to replace

pod 'SwiftMonkey' by pod 'SwiftMonkey', :git => 'https://github.com/zalando/SwiftMonkey.git'

Thanks again for the help!