Detect issues like logic failures, UI problems, and performance regressions by running tests on your app.

Posts under Testing tag

113 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

VisionOS App Runs Poorly And Crashes First Time It Launches
Here's a video clearly demonstrating the problem: https://youtu.be/-IbyaaIzh0I This is a major issue for my game, because it's not meant to be played multiple times. My game is designed to only play once, so it really ruins the experience if it runs poorly until someone force quits or crashes the game. Does anyone have a solution to this, or has encountered this issue of poor initial launch performance? I made this game in Unity and I'm not sure if this is an Apple issue or a Unity issue.
0
0
112
2d
XCTest stuck and has error when take snapshot element on screen has much elements
Dear Apple Developer [Background] We are developing a service running on test mode based on XCTest Framework to support streaming, remote and automation testing with iOS devices. After we upgrade macOS Sonama and Xcode 15 version for upgrade XCTest for support iOS 17 around Jan-2024, we saw We noticed that our running on test mode services stuck and hanging frequently after a period of time. We have investigate and tried debug code and we found that main thread stuck and hanging when it call requesting snapshot of accessibility hierarchy for app. At the same time, we noticed that the application we were testing stuck and hanging too. [Environment] Application testing: Tiktok MacOS: Sonoma 14.5 Xcode: Version 15.4 (15F31d) Device test: iPhone 12 (iOS 14.8.1) Log detail: t = 1524.15s Wait for com.ss.iphone.ugc.Ame to idle t = 1536.54s Find the Application 'com.ss.iphone.ugc.Ame' t = 1536.54s Requesting snapshot of accessibility hierarchy for app with pid 509 t = 1597.56s Find the Application 'com.ss.iphone.ugc.Ame' (retry 1) t = 1597.56s Requesting snapshot of accessibility hierarchy for app with pid 509 t = 1658.58s Find the Application 'com.ss.iphone.ugc.Ame' (retry 2) t = 1658.58s Requesting snapshot of accessibility hierarchy for app with pid 509 t = 1718.58s Collecting extra data to assist test failure triage t = 1718.58s Requesting snapshot of accessibility hierarchy for app with pid 509 t = 1778.59s Requesting snapshot of accessibility hierarchy for app with pid 509 2024-08-19 14:16:44.990260+0700 WebDriverAgentRunner-Runner[489:97809] Issue type: 0 2024-08-19 14:16:44.990428+0700 WebDriverAgentRunner-Runner[489:97809] Enqueue Failure: Failed to get matching snapshot: XCTPerformOnMainRunLoop work timed out after 60.0s ((null)) (null) 0 0 t = 1843.71s Find the Application 'com.ss.iphone.ugc.Ame' t = 1843.71s Requesting snapshot of accessibility hierarchy for app with pid 509 t = 1874.72s Find the Application 'com.ss.iphone.ugc.Ame' (retry 1) t = 1874.72s Requesting snapshot of accessibility hierarchy for app with pid 509 t = 1940.76s Find the Application 'com.ss.iphone.ugc.Ame' (retry 2) t = 1940.77s Requesting snapshot of accessibility hierarchy for app with pid 509 t = 2005.80s Collecting extra data to assist test failure triage t = 2005.80s Requesting snapshot of accessibility hierarchy for app with pid 509 t = 2066.58s Requesting snapshot of accessibility hierarchy for app with pid 509 2024-08-19 14:21:33.019582+0700 WebDriverAgentRunner-Runner[489:97809] Issue type: 0 2024-08-19 14:21:33.019687+0700 WebDriverAgentRunner-Runner[489:97809] Enqueue Failure: Failed to get matching snapshot: Unable to perform work on main run loop, process main thread busy for 30.0s ((null)) (null) 0 0 2024-08-19 14:21:33.020647+0700 WebDriverAgentRunner-Runner[489:97809] Issue type: 0 2024-08-19 14:21:33.020722+0700 WebDriverAgentRunner-Runner[489:97809] Enqueue Failure: No element snapshot found for Application 'com.ss.iphone.ugc.Ame'[0.00, 0.00] -> (200.0, 259.0) ((null)) (null) 0 0 2024-08-19 14:21:33.020801+0700 WebDriverAgentRunner-Runner[489:97809] *** Assertion failure in -[XCPointerEventPath initForTouchAtPoint:offset:], XCSynthesizedEventRecord.m:263 t = 2291.08s Find the Application 'com.ss.iphone.ugc.Ame' t = 2291.08s Requesting snapshot of accessibility hierarchy for app with pid 509 t = 2352.10s Find the Application 'com.ss.iphone.ugc.Ame' (retry 1) t = 2352.10s Requesting snapshot of accessibility hierarchy for app with pid 509 t = 2413.11s Find the Application 'com.ss.iphone.ugc.Ame' (retry 2) t = 2413.11s Requesting snapshot of accessibility hierarchy for app with pid 509 t = 2473.12s Collecting extra data to assist test failure triage t = 2473.12s Requesting snapshot of accessibility hierarchy for app with pid 509 t = 2533.13s Requesting snapshot of accessibility hierarchy for app with pid 509 2024-08-19 14:29:19.552744+0700 WebDriverAgentRunner-Runner[489:97809] Issue type: 0 2024-08-19 14:29:19.553054+0700 WebDriverAgentRunner-Runner[489:97809] Enqueue Failure: Failed to get matching snapshot: XCTPerformOnMainRunLoop work timed out after 60.0s ((null)) (null) 0 0 t = 2598.27s Find the Application 'com.ss.iphone.ugc.Ame' t = 2598.28s Requesting snapshot of accessibility hierarchy for app with pid 509 t = 2659.29s Find the Application 'com.ss.iphone.ugc.Ame' (retry 1) t = 2659.29s Requesting snapshot of accessibility hierarchy for app with pid 509 t = 2720.31s Find the Application 'com.ss.iphone.ugc.Ame' (retry 2) t = 2720.32s Requesting snapshot of accessibility hierarchy for app with pid 509 t = 2780.33s Collecting extra data to assist test failure triage t = 2780.33s Requesting snapshot of accessibility hierarchy for app with pid 509 t = 2840.34s Requesting snapshot of accessibility hierarchy for app with pid 509 2024-08-19 14:34:26.806686+0700 WebDriverAgentRunner-Runner[489:97809] Issue type: 0 2024-08-19 14:34:26.806828+0700 WebDriverAgentRunner-Runner[489:97809] Enqueue Failure: Failed to get matching snapshot: XCTPerformOnMainRunLoop work timed out after 60.0s ((null)) (null) 0 0 2024-08-19 14:34:26.808114+0700 WebDriverAgentRunner-Runner[489:97809] Issue type: 0 2024-08-19 14:34:26.808205+0700 WebDriverAgentRunner-Runner[489:97809] Enqueue Failure: No element snapshot found for Application 'com.ss.iphone.ugc.Ame'[0.00, 0.00] -> (200.0, 259.0) ((null)) (null) 0 0 2024-08-19 14:34:26.809241+0700 WebDriverAgentRunner-Runner[489:97809] *** Assertion failure in -[XCPointerEventPath initForTouchAtPoint:offset:], XCSynthesizedEventRecord.m:263
1
0
117
5d
Await expectations with Swift Testing?
I'm used to wait for expectations when using XCTest, but I'm completely stumped by the seemingly-absent option for expecting some parts of my code to be called in Swift Testing 🤔 Consider the following: protocol MyAPI { func getData() async throws -> String } class MockAPI: MyAPI { let stub: () async throws -> String init(stub: @escaping () async throws -> String = { "hello" }) { self.stub = stub } func getData() async throws -> String { try await stub() } } Which is being used in my view model: class MyViewModel: ObservableObject { private let api: MyAPI @Published var data: String init(api: MyAPI) { self.api = api } func refresh() async throws { self.data = try await api.getData() } } When I wrote tests in the past, I would simply override the stub of the MockAPI implementation and fulfill an expectation in there: class MyViewModelTests: XCTestCase { func testModelCallsAPIOnRefresh() async throws { let expectCallsAPI = expectation("Model should call API") let api = MockAPI { expectCallsAPI.fulfill() return "hello" } let model = MyViewModel(api: api) try await model.refresh() await fulfillment(of: [expectCallsAPI], timeout: 1) } } How would I go about checking that my model does indeed call the API when using Swift Testing?
0
0
96
1w
Unable to install app on physical device
Hi, I have an app developed with Go and Fyne and would like to test that on a few physical iOS devices. It runs fine with the simulator. I have created a Certificate and Identifier, registered a couple of devices and create a Provisioning Profile. I somehow ended up with two teams in Xcode, a Personal Team (whatever that means) and a "company" team. I think the company team is being used with the associated certificate but that is not obviously trivial (to me). No matter what I try, I can't get that Provisioning Profile installed (in Xcode I presume). It fails with "Failed to install one or more provisioning profiles on the device. Please ensure the provisioning profile is configured for this device. If not, please try to generate a new profile". I am absolutely sure that I generated that Provisioning Profile for the couple of devices I registered. I assume that "device" is the device currently selected in the Devices and Simulators window of Xcode. I have tried it so many times now getting the exact same result that I am getting concerned that I'm now qualify for Einstein's description of insanity. I don't have a "native" Xcode project as the app is generated with/by Fyne so I used codesign to sign the app. Any suggestions how I can keep my sanity are most welcome :-)
0
0
80
1w
Error validating app to distribute on TestFlight
Helo, I'm trying to upload my React Native App to test with TestFlight but in the archives when I validate the app I received the following error: Missing signing identifier at "/var/folders/72/pp85df852gxbzn51b2b34blw0000gn/T/XcodeDistPipeline.~~~PCbJ98/Root/Payload/ Failed to cloud sign "/var/folders/72/pp85df852gxbzn51b2b34blw0000gn/T/XcodeDistPipeline.~~~PCbJ98/Root/Payload/Click+". Please file a bug report at https://feedbackassistant.apple.com.
1
0
338
1w
NO_CRASH_STACK
Yesterday 08/07/2024 we started to have a lot of NO_CRASH_STACK on our app released trough testflight, the release was created and released on the 07/30/2024 and is widely used by the beta testers. But for some reason this crash started to happen yesterday and we are not sure what the root cause is, we haven't made available any new builds under the same version or something, the only thing we did was to release a new version so the users can update from but it doesn't seem that the crash is happening on this new version only on the one from the 30th. Any idea what could be happening??
1
0
118
2w
XCode Cloud Aborting after 2 hours
Hi all, I have a UI Automation Test suite with a large number of test cases, that typically takes me 7 hours to run. When I setup the workflow on XCode cloud, I received the following error - "Build has exceeded the maximum allotted time. Each build can run for up to 120 minutes. If a build has not yet finished at this time, all incomplete actions will be cancelled." Is there any way to extend the build time? What is a build? I have two actions in my workflow. Build Action (that took 3 minutes) and the test step that took 2 hour 4 minutes. Am not clear how the 120 minute window is calculated.
1
0
153
2w
My app crashes in testflight.
This is an ue5 generated xcode project that I have released to test flight. However the app isnt operating as it should. The app closes out when I try to open the main level. The tutorial opens with ease and my store to buy characters opens sometimes. I havent been able to get the main level to open without crashing but I have heard the sound of the main level opening sometimes before it crashes. The crashes aren't consistent and happen when trying to open levels in my game such as the store, tutorial, etc. This is what the crash log said on the right. Is it a shader issue?
0
0
197
3w
App Crash
so im testing my app on testflight and i have this update button that will redirect me to the appstore, so i click that then i'll be redirected to appstore and my app on appstore will show this install icon that will let me install the current app on my appstore so then ill install it then when i open it, it crashes and upon checking my console on my mac these are the errors im getting: Error: Cannot make a deep link into a standalone app with no custom scheme defined, js engine: hermes Unhandled JS Exception: Error: Cannot make a deep link into a standalone app with no custom scheme defined, js engine: hermes I tried to debug it on my npx expo start -c, at first im getting the same error but then ive managed to removed it so im confident that it will work, but then it still crashes
1
0
159
Jul ’24
IOS18 Beta - Public (is it just me?)
From downloading Beta 18 (public) I have the following sever issues: Cellar Network dips and has weakened (wife & kids on same network with no issues.) Wi-Fi stability has become horrendous AirDrop is a nightmare zooming in on emails or other document documents cuts the page off and it becomes unmovable battery drains significantly quicker than ever before please tell me I’m not alone! @Apple - would be great if uninstalling beta was easier with out the risk and time the current process is annotated!
1
1
273
Jul ’24
Universal links & redirect not working on certain devices
We are currently doing our beta testing for our application and we are having some issues with universal links. The issues can be seen below: we are using auth0 for authentication. In this process, after users verify their email addresses they should be redirected back to the application. For some users, they are directed back to a page that shows error 404. For other users where it works, they are directed back to the application. What could be my issue? Our app-site- association file is hosted in the link below for reference. https://yourmomentshub.com/.well-known/apple-app-site-association
6
0
438
2w
How to access Test Plans launch arguments and environment in the app target during UI tests
I am able to reproduce this also in a minimal example. Here is my setup: a Hello World app and a UI test target. a Test Plan which executes the UI test target test plan configures application language as German for sanity testing whether changing the test configuration via the test plan in general works -> this works perfectly test plan configures launch arguments and Environment variables in the shared settings "Arguments passed on launch" In the ContentView of the app I try to access these values via ProcessInfo: print(ProcessInfo.processInfo.arguments) print(ProcessInfo.processInfo.environment) Now I run the test plan Expected: my custom launch arguments appear in arguments my custom env vars appear in environment Actual: none of them appear. What am I doing wrong here?
2
1
281
Jul ’24
Inconsistent User Reviews in Admin Panel: Same Content, Different IDs and Dates Issue
Issue: I am facing a situation where multiple reviews from some users display the same titles, body, and author names in my admin panel, but they have different review IDs and review submission dates. For example, User A might have a review titled "Great App!" with the same content and author name, but different review IDs (123 and 456) and submission dates (June 1st and June 15th). This inconsistency appears when users update their reviews in the app or when reviews are deleted and then resubmitted through the App Store. Reason: When users update their feedback or delete and resubmit their reviews in the app or through the App Store, each action creates a new review entry in our database due to the different review IDs assigned by the platform, leading to these discrepancies. Technical Details: Fetching Reviews: I fetch the latest reviews from the App Store using a scheduled task that retrieves up to 200 reviews per hour. These reviews are retrieved using the App Store Connect API: https://api.appstoreconnect.apple.com/v1/apps/{id}/customerReviews?include=response&sort=-createdDate&limit=200. Admin Panel Technology: My admin panel is developed using the Laravel framework (PHP). Our Concern: I want to ensure that our database stores only unique reviews and that our admin panel displays only unique reviews to avoid confusion and maintain data integrity. I'm seeking guidance on how to handle this scenario correctly within my admin panel to ensure accurate representation of user reviews. Any insights or best practices on how to manage and display user reviews under these circumstances would be greatly appreciated. Thank you.
0
0
294
Jul ’24
TimeLimitTrait: minimal time limit way to huge
From the Documentation of .timeLimit(_:): Test timeouts do not support high-precision, arbitrarily short durations due to variability in testing environments. The time limit must be at least one minute, and can only be expressed in increments of one minute. Unit Tests are usually considered too long when they take more than 0.1 seconds. So a minimal time limit of on minute is completely useless for unit tests. Is there a similar trait in Swift Testing to handle millisecond time limits?
1
0
306
Jul ’24
My app is aimed only at iPhone, but when I upload it to TestFlight, it tells me that it is for iPad, and I don't know how to remove it
Hello colleagues, this is the first time this has happened to me, and I don't know what to do, I have done research and I have not found a solution for this, I am compiling my application only for iPhone, and when it is up to send it for review, it tells me that it is also for iPhone/iPad, and I'm frustrated, because my application has never been uploaded for iPad. In my xcode, I put in the Target Device, iPhone only, and it uploads as if it were compatible with iPad. Did it happen to someone else?
0
0
285
Jul ’24
Failed to install the app on the device
We currently try to run tests on 4 physically attached iPhones all on ios 17. When tests are concurrently running we occasionally get failures that look like this: Testing failed: Failed to install the app on the device. SwiftUITests-Runner encountered an error (Failed to install or launch the test runner. (Underlying Error: Failed to install the app on the device. (Underlying Error: Connection with the remote side was unexpectedly closed : { count = 1, transaction: 0, voucher = 0x0, contents = "XPCErrorDescription" => { length = 22, contents = "Connection interrupted" } }. Unhandled error domain IXRemoteErrorDomain, code 6)) I noticed that when relying on xcodebuild to install the target app and test runner it cannot install concurrently/parallel on all 4 devices but instead does each device sequentially causing the test to hang. The same behavior can be exhibited when trying to install an app concurrently on 4 different phones with xcrun devicectl as well. STEPS TO REPRODUCE Trigger a test with xcodebuild on 4 different phones at the same time where xcodebuild also needs to install the target apps. Currently using Xcode15.2 and iOS 17.5.1
1
0
327
Jul ’24
Need Apple Pay test cards for failed cases (insufficient balance, etc.) on sandbox environment
I am currently testing Apple Pay integration on my sandbox environment and I am in need of test cards for failed cases such as insufficient balance. Does anyone have access to or know where I can find Apple Pay test cards specifically for scenarios where transactions fail due to reasons like insufficient balance? Any help or guidance on this matter would be greatly appreciated. Thank you.
0
0
306
Jul ’24