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

Posts under Testing tag

110 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Intermittent error on newly purchased app
I have had an app on the apps store for about 4 years. The app uses an API to retrieve some data and displays/manipulates it. The app works for the vast majority of users however, for around 0.01% of users, the first time they open the app after downloading it, the API fails and reports that it cannot retrieve data (it exits elegantly but does not crash). They cannot get the app to work and I have to issue a refund. I cannot repeat the error on simulator or on my test iPhone (13). There is no consistency on IOS or phone model reported. I am guessing that there is some form of configuration that cause the app to fail to retrieve the data. I don't even know where to start to identify the problem. Can anyone point me to some documentation or provide advice as to how I can capture, analyse and fix these rare failures. Thanks
1
0
373
Apr ’24
Xcode Cloud - slow test-without-building step
Hi, I'm currently researching if we are able to migrate to Xcode Cloud in our project. I encountered one issue. I run unit tests on Xcode Cloud and I see that they finish in ~150 seconds, but the whole step takes ~530s and there is no information in logs why. I even run the same command on my local computer and it doesn't take that long. Any ideas? Any way to optimize it? Also one more thing: it looks like Xcode Cloud is not running on M1 machines. Do you know guys if there are plans for Xcode Cloud to take advantage of M1/M2?
2
0
1.4k
Mar ’24
Xcode Loading Test... Stuck
Since couple of weeks ago (probably after I've updated my macbook to Sonoma 14.3.1) my Xcode cannot load unit test. When opening Test Navigator all I see is: Loading Tests... and it stays forever in that state. This is completely new project and this is crazy. Only way I can start testing is if I use CMD+U to run all the tests which is my company's project take a lot of time. Also there's no option to click on test-diamond-shaped button to run individual tests. Also tried checking "Test Plans" but I have infinite progress views: Anyone has any idea how to fix this? I tried to remove Derived Data, to reinstall Xcode (and different versions), did "git clean -fxd" nothing helped. Also some function like: "Rename", "Edit all in scope" stopped working as well.
0
0
392
Mar ’24
Unit testing [XCTest]
Hello world, I'm doing unit testing with Swift. I need to create a test for the registration process of an application. When I register, a confirmation link is sent to the specified email. How can I create a test that allows me to access the email and click on the link to confirm the registration?
0
0
334
Mar ’24
External link or PDF download doesn't work in PWA
Hi, We're currently developing a PWA for our company - with Vue 3 and Quasar - and we have added it into the App Store (but in testing only, for now). We have multiple problems but the worst is the following one: it seems that the app doesn't want to open external links with "window.open()" JS method. Instead it shows a screen with a progress bar and a crossed-out Wi-Fi icon. It shows this for a few seconds then once the progress bar is completly filled it goes back to the previous page where it triggered. Needless to say that the wireless is connected (see the status icons at the top). We have the same behavior when we try to download a PDF created as a BLOB file with some JS code. I don't have an iPhone to test so maybe you have a good idea about this ? Kind regards, V.
0
0
424
Feb ’24
Xcode 15 performance tests ignore baseline
I'm trying to write performance tests with Xcode 15, but it's not working: even though setting a baseline seems to work (baseline data files are created), Xcode seems to ignore that baseline altogether whenever the test is run. As a result, performance tests never fail, no matter how bad performance gets. The source editor persistently displays a “No baseline average for Time” message. Has anyone else encountered this? Figured out how to sidestep the issue? Of note, the issue is easily reproduced: create a new (macOS in my case) app project with tests, add a dummy performance test; run the test once and save its baseline, and despite this subsequent tests will always succeed, even if you significantly slow the dummy test down. (I've filed this as FB13330139)
8
8
1.4k
Feb ’24
Xcode 13.2.1 : alert mishandling on Iphone but working on simulator ???
Hello everyone! I'm just working on my first app in swift, and am out of knowledge about this case. First, the related code : `@IBAction func ajouterNouvelleValeur(_ sender: Any) { // Créer une alerte pour saisir la nouvelle valeur let alert = UIAlertController(title: "Ajouter une nouvelle valeur", message: nil, preferredStyle: .alert) alert.addTextField { (textField) in textField.placeholder = "Entrez la nouvelle valeur" } // Ajouter un bouton "Ajouter" pour ajouter la nouvelle valeur alert.addAction(UIAlertAction(title: "Ajouter", style: .default, handler: { [weak self] action in guard let textField = alert.textFields?.first, let newValue = textField.text else { return } self?.ajouterNouvelleValeur(newValue) })) // Ajouter un bouton "Annuler" alert.addAction(UIAlertAction(title: "Annuler", style: .cancel, handler: nil)) // Afficher l'alerte present(alert, animated: true, completion: nil) } this to present an alert with textField to enter a new value to an array. Works properly on simulator, but when testing on my iPhone12 SE, it appears not to catch any value for the textField. Has anyone encountered the same issue, and knows the solution? Hope my english is not too bad (as a French member, I appologize if not!) Best regards Sébastien
1
0
436
Feb ’24
Crash reports not attached to xcresult when running with xcodebuild
Hi there, I'm trying to figure out an issue I'm seeing where the xcresult bundle isn't including the crash report after building and running with xcodebuild. I have a simple test app that has a single button that intentionally crashes and an XCUI test to run it. The UI Test also passes which can probably be explained by the lack of any asserts after clicking the button, but I assumed the app crashing would fail the test. The app itself is a Mac OS app with a single button called "Crash" that links to a method: - (IBAction)crash:(id)sender { @throw NSInternalInconsistencyException; } and a test method: XCUIApplication *app = [[XCUIApplication alloc] init]; [app launch]; XCUIElement *crashButton = [[XCUIApplication alloc] init].windows[@"Window"].buttons[@"Crash"]; XCTAssert([crashButton exists]); [crashButton click]; There is an ips file corresponding to the crash in ~/Library/Logs/DiagnosticReports so the crash gets written, but the test passes. After using xcresulttool to dump the Diagnostics folder from the xcresult bundle, I see these lines in the session log: 10:59:20.790 xcodebuild[23184:6634391] Handling Crash: MacAppTest (23189) main. libsystem_c.dylib: abort() called 10:59:20.792 MacAppTestUITests-Runner[23188:6635181] Process crashed with pid:23189 path:/Users/USER/Library/Developer/Xcode/DerivedData/MacAppTest-dxrjhasbuvyffhenipmdemzdpdht/Build/Products/Debug/MacAppTest.app/Contents/MacOS/MacAppTest bundleID:com.company.MacAppTest summary:main 10:59:20.792 MacAppTestUITests-Runner[23188:6635181] Ignoring crash for com.company.MacAppTest:23189 because we are not currently tracking it 10:59:21.371 MacAppTestUITests-Runner[23188:6634605] Returning result XCTWaiterResultCompleted for waiter <XCTWaiter: 0x6000025fd4d0> 10:59:21.371 MacAppTestUITests-Runner[23188:6634605] Wait <XCTWaiterWait: 0x600003e1b540> completed after 1.003s 10:59:21.371 MacAppTestUITests-Runner[23188:6634605] cleaning up delay The Ignoring crash for com.company.MacAppTest:23189 because we are not currently tracking it is what I suspect is the issue. How can I get the UITest to track the app so that when it crashes, the test fails? Some other lines from the logarchive file that may be helpful: 2024-02-14 10:59:20.612346 -0800 osanalyticshelper xpc log creation type 309 result success: /Users/<REDACTED>/Library/Logs/DiagnosticReports/MacAppTest-2024-02-14-105920.ips 2024-02-14 10:59:20.613030 -0800 testmanagerd Calling new file handler <__NSMallocBlock__: 0x6000031761f0> for MacAppTest-2024-02-14-105920.ips 2024-02-14 10:59:20.614240 -0800 ReportCrash client log create type 309 result success: /Users/<REDACTED>/Library/Logs/DiagnosticReports/MacAppTest-2024-02-14-105920.ips 2024-02-14 10:59:20.615417 -0800 testmanagerd Read crash report from /Users/<REDACTED>/Library/Logs/DiagnosticReports/MacAppTest-2024-02-14-105920.ips, got 17327 bytes of data Thanks!
0
0
551
Feb ’24
Cannot upload more than one app a day - the rest are rejected.
Hi all, I create apps for Apple and I've been encountering the issue that I cannot upload 4 or 5 apps in a day because they are rejected. It only allows me to upload one a day. Has anyone else encountered this issue/limit? Any advice or ways to resolve this issue? I have multiple apps to complete and upload but this issue has been delaying the process. Thanks in advance.
1
0
392
Feb ’24
App tester having problems loading items from Google API
I have an app that I built using Expo and its' only external internet-based dependency is the Google Places API, which it uses when the app is loaded and when settings are tweaked. The app requests use of location services then proceeds to use it in an axios query to fetch some bars nearby. I am able to run it without issues on my iPhone and on Android emulators using Expo's local deployment options. Any idea what might be going on here on the testers' end?
0
0
360
Feb ’24
Facing loader issue in IOS version 16.3.1
We are facing an issue in IOS version 16.3.1 where the animation based loader is not getting visible, but .svg based loader is working fine and the same animation based loader is working fine in android and windows, and all the remaining versions of IOS as well The html code : <div class="showbox overlayhideclass" id="overlayhideapple" style="display:none;opacity:2.9;"> <div class="loader"> <svg class="circular darkLoader" style="display:none;" viewBox="25 25 50 50"> <!-- Background ring --> <circle class="background-ring" cx="50" cy="50" r="22"></circle> <!-- Loading circle --> <circle class="path" cx="50" cy="50" r="22" fill="none" stroke-width="6" stroke-miterlimit="10"></circle> </svg> <svg class="circular lightLoader" style="" viewBox="25 25 50 50"> <!-- Background ring --> <circle class="background-ring" cx="50" cy="50" r="22"></circle> <!-- Loading circle --> <circle class="path" cx="50" cy="50" r="22" fill="none" stroke-width="6" stroke-miterlimit="10"></circle> </svg> </div> </div> classes: .loader { position: relative; margin: 0 auto; width: 100px; &:before { content: ""; display: block; padding-top: 100%; } } .circular { animation: rotate 1s linear infinite; height: 100%; transform-origin: center center; width: 74.84%; position: absolute; top: 0; bottom: 0; left: 0; right: 0; margin: auto; border-radius: 50%; } .background-ring { fill: none; stroke: rgb(227, 226, 231); stroke-width: 6; } .path { stroke-dasharray: 1, 200; stroke-dashoffset: 0; animation: dash 1.5s ease-in-out infinite, color 6s ease-in-out infinite; stroke-linecap: round; } @keyframes rotate { 100% { transform: rotate(360deg); -webkit-transform: rotate(360deg); } } @keyframes dash { 0% { stroke-dasharray: 100, 200; stroke-dashoffset: -100px; } 30% { stroke-dasharray: 100, 200; stroke-dashoffset: -100px; } 100% { stroke-dasharray: 100, 200; stroke-dashoffset: -100px; } } @keyframes color { 100%, 0% { stroke:var(--loader-icon); } 40% { stroke:var(--loader-icon); } 66% { stroke:var(--loader-icon); } 80%, 90% { stroke:var(--loader-icon); } } body { background-color: var(--white); } .showbox { position: absolute; top: 0; bottom: 0; left: 0; right: 0; width: 100vw; height: 100vh; display: flex; align-items: center; } .overlayhideclass { position: fixed; width: 100%; height: 100%; top: 0; left: 0; text-align: center; opacity: 2.9; background-color: Var(--pg-bg-primary); z-index: 9999; display: flex; justify-content: center; justify-items: center; justify-self: center; overflow:-y:hidden; } .darkLoader { z-index: 100; display: flex; justify-content: center; align-items: center; } .lightLoader{ z-index: 100; display: flex; justify-content: center; align-items: center; }
1
0
410
Feb ’24
How to specify identifiers for HTML elements for hybrid app?
I'm currently developing hybrid MacOS app that display some content in WebKit. I wanted to write some UI tests using Appium for it. For this I'm currently using Mac2 driver https://github.com/appium/appium-mac2-driver The problem that I faced is specifying identifiers for HTML elements to easily find them later in tests. It seems Appium uses Accessibility framework to get list of elements. Also it seems that accessibility framework parses HTML and wrap them to XCUIElements in XML Source (I can see this in Appium inspector, check the screenshot) As you can see Appium tries to get accessibility identifier/label from these elements. While searching in web I found, that if we specify aria-label="something" property on HTML element, it will be parsed by accessibility framework as label. So we can use labels for locating elements. However in ideal scenario we should have some HTML property that will be parsed to identifier, as accessibility label is used for accessibility needs, while identifier is allocated for UI testing. So my question is there HTML tag that can be used to specify identifier, and if not, is there plans to add support for it?
0
0
395
Jan ’24
Simulator not reflecting simctl override --time command as expected
I have a simulator named "iPhone 14 Pro" created and booted. The override --time command doesn't appear to take anymore. This worked months ago, but broke somewhere along the road of Xcode 14.x. It is a drag setting the system time to 9:41 for App Store Connect screenshots which is why I used the command in the first place. I cannot seem to successfully set the status bar time of the simulator via the following command anymore: xcrun simctl status_bar "iPhone 14 Pro" override --time "9:41" Is this working for anyone else lately? Feedbacks; Created these Dec 7, 2022 FB11859751 - Simulator: iOS simulator not responding to simctl set time FB11859744 - Simulator: watchOS simulator not responding to simctl set time
2
0
1.4k
Jan ’24
External Testers and Groups - App review Guidelines
For external testing through testflight, there is app review process. Link: https://developer.apple.com/testflight/ Planning to submit an app for external testing. However, the backend of the App is an test environment. Is that ok for the **external testing app review process **. The test environment is behind IP restriction. a. Can we provide VPN credentials to apple team for app access and complete the **external testing app review process ** OR b. Does apple team have any IP addresses, that can be add it to our testing environment.
1
0
387
Jan ’24
iOS 15 - UI Test keeps asking pin code for "Enable UI Automation"
We got the newly issue that our Test devices keeps us asking for the pin code to "Enable UI Automation". Then it works for some hours or days, but after some time it starts again. "Enable UI Automation" is already enabled in "Settings" - "Developer" menu. The devices are located remotely and we can't access them directly, so this is a big issue for us right now. Is there any way to avoid this?
14
4
5.4k
Jan ’24
2020 Imac kernel panics and Logic X crashes please help!
Hi All, Almost at my wits end. I have owned a 2020 Imac now for 2 years . I bought it refurbed and two months in it blew a logic board which I had replaced under warranty. So after that everything worked fine until I updated to OS Sonoma 14.2 after that crashes and kernel panics. I have gone through Mac diagnosis and it says my hardware is fine. Also, all 3rd part plug ins validate in AUVAL. I never experienced anything so frustrating in 15 years of using Logic X, My old power PC never had issues. It happens on any project large or small. I will paste in some truncated crash reports and attach full ones plus ETRA report. Can anyone get to the bottom of this? I brought Imac to the shop and they said everything checked out. I spent $4000 on this POS and upgraded to 64 GBS memory. I am ready to throw it out the window and start over. ANY HELP IS APPRECIATED
1
0
338
Jan ’24
Profiling UITest case always terminates in the middle of testing, which never occurs during normal testing?
In my iOS project, there is an infrequent crash related to virtual memory problem. Therefore, I plan to use UITest in combination with Product/Perform Action/Profile "TestCaseName" to conduct Game Performance-type testing. This allows the automatic testing to continuously operate until the profile stops recording upon a crash. This enables me to observe the various states of the program at the time of the crash. However, I have found that the UITest using Profile is highly unstable. The UITestCase often terminates unexpectedly during execution, leading to failed tests (Instruments is still working). Sometimes, the app is terminated immediately after startup. It seems that the use of sleep() in the code can easily cause interruption issues, which do not occur during normal UI testing. I am wondering if anyone has experience using Profile for UITest and whether they have encountered the issues I described." Working Environment: XCode14.3.1, iPhone Device iOS17.2
0
0
513
Jan ’24
Interacting with macOS SwiftUI Graphical DatePicker in UI Tests
I am currently working on a SwiftUI project and I am trying to write a UI test for a DatePicker. However, I am having trouble interacting with the DatePicker in the test. Here is the code for the DatePicker in my SwiftUI view: DatePicker("Date", selection: $date, displayedComponents: [.date]) .datePickerStyle(.graphical) .labelsHidden() .frame(width: 150) And here is the code for my UI test: func testSelectingDateChangesMainView() throws { let app = XCUIApplication() app.launch() let dateDatePicker: XCUIElement = app.windows["mainUI-AppWindow-1"].datePickers["Date"] dateDatePicker.click() let col = dateDatePicker.descendants(matching: .any) print("\(dateDatePicker.debugDescription), \(col.debugDescription)") } When I run the test, it seems like the DatePicker does not have any descendants, so I am unable to select a date. Does anyone have any suggestions on how I can interact with a .graphical style DatePicker in a UI test? Any help would be greatly appreciated. Thank you, OnlyForF1
3
1
581
Jan ’24