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

Posts under Testing tag

106 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

XCode 16 RC and Sequoia 15 RC - Running a XCTest UI test runs the test but does not open the simulator and initiating a record just hangs and never runs
When I run a XCTest test on an IOS Target device, the test runs but the simulator is not opened so I can follow the screens being displayed and the key strokes. And when I initiate a record for a test method, it just hangs and never runs or open a simulator. Is anyone else experiencing these same issues running XCTest? Is this legacy framework not working with XCode 16 by design?
3
1
484
Sep ’24
Testflight issue: "Could not install <app_name>. The requested app is not available or doesn't exist."
I get the message as seen in the attached image. I recently enrolled in the Apple Developer program last month. Initially, I was working for a client and everything was working fine locally. Builds were executing fine and running as well in emulators and physical devices. But when I archive the build and distribute it to TestFlight via AppStore Connect, I always get this error message as shown below. There are no warnings or errors in the console or in Xcode. I already took care of everything and all compliance related issues. I am not sure what even is wrong at this time. I resubmitted the builds at-least 8 times but still getting same message. Moreover, as a test run, I submitted a build containing a simple "Hello World" component as well. It's getting the same error. I have wrote to Apple Support as well but haven't heard back from them yet. If anyone knows how to resolve this please please guide me. This is really annoying and frustrating now since testers are not able to test the application.
1
0
439
Sep ’24
Unable to Launch Tests/UITests in Xcode 16 with iOS 18 Simulator
Hello, I'm unable to run any test cases in Xcode 16 with the iOS 18 simulator. Steps to Reproduce: Create a new iOS project in Xcode 16 using the default iOS app template with the testing option checked. Run any test or UI test case by clicking the "Play" icon in the Test navigator. Xcode gets stuck at the "Testing" state indefinitely. Environment: macOS 15 beta 8 Xcode 16 beta 6 iOS 18 beta 7 simulator
7
2
869
2w
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
1
329
Aug ’24
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
408
Aug ’24
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?
1
0
459
Aug ’24
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
212
Aug ’24
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
592
Aug ’24
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
269
Aug ’24
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
401
Aug ’24
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
353
Jul ’24
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
288
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 &amp; 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
421
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
818
Aug ’24
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
583
Jul ’24