zalando / SwiftMonkey

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

eventGenerator.sendPinchCloseWithStartPoint(start, endPoint: end, duration: 0.5) results in crash on iOS 14 #97

Closed ApplebaumIan closed 3 years ago

ApplebaumIan commented 3 years ago

When running Monkey Tests on iPadOS 14 targets eventGenerator.sendPinchCloseWithStartPoint results in a Thread 1: EXC_BAD_ACCESS (code=1, address=0x0)

Screen Shot 2020-12-20 at 8 44 07 PM
ApplebaumIan commented 3 years ago

What's super strange about this bug is that it doesn't appear on the example App...

tijme commented 3 years ago

@ApplebaumIan Did you find out what the issue was? I'm currently experiencing the same error.

ApplebaumIan commented 3 years ago

@tijme Unfortunately no, I've had to work on other things. I've been just monkey testing my app in iOS 13 for now. 😪

ApplebaumIan commented 3 years ago

@ApplebaumIan Did you find out what the issue was? I'm currently experiencing the same error.

@tijme Can I ask you a few question since it seems like this is a dead or dying project? Are you using parallel testing, XCTest Plans, or testing an iPad App in landscape?

ApplebaumIan commented 3 years ago

@tijme I FINALLY GOT THE EXAMPLE TO BREAK. The issue is that the example is on the latest version of swift monkey on master. So I switched it to using pods and installed version pod 'SwiftMonkeyPaws','~> 2.1.0' and the example app breaks. @zalando please add a new version tag as 2.1.1 is 11 commits behind master.

wojciechczerski commented 3 years ago

Thank you very much for finding the cause of this issue! I have drafted a new release (2.2.0). I also left a comment in your PR @ApplebaumIan. After we merge it, I will push the new Podspec to CocoaPods.

ApplebaumIan commented 3 years ago

@wojciechczerski Glad to hear it and happy to help! Swift Monkey is a really great tool! Glad I can keep it in my test suite🕺

wojciechczerski commented 3 years ago

@ApplebaumIan @tijme I have pushed SwiftMonkey 2.2.0 to CocoaPods trunk.

tijme commented 3 years ago

Thank you for the time and effort you spent on this issue @wojciechczerski & @ApplebaumIan. I am sure you have helped many developers with this fix!

manghwanitin commented 3 years ago

I am still facing this issue on Xcode 12 iOS 14.4 even after pointing to 2.2.0. @ApplebaumIan @zalando

tijme commented 3 years ago

I am still facing this issue on Xcode 12 iOS 14.4 even after pointing to 2.2.0. @ApplebaumIan @zalando

Does it work if you replace this monkey.addDefaultUIAutomationActions() by monkey.addDefaultXCTestPublicActions(app: ...)?

manghwanitin commented 3 years ago

That will work. But that is not expected requirements @tijme