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

How to check no network cases in iOS simulator in UI testing automation
In my iOS app, When the API calls failed due to poor network, the app will display 'No network error screen'. I have to check if this error screen is displayed correctly or not in case of poor network, in automation testing using simulator. But I couldn't find any possibility to turn off internet manually in simulator and check whether the 'No network' screen displays. I installed 'Network Link Conditioner' in macOS and tried using it on simulator. But, in simulator settings -> developer , there is no section called "Network Link Conditioner" to handle this in simulator. So, is there any other solution to handle this network case in simulator ?
1
0
635
Oct ’23
Data Migration from Development to Production in CloudKit for TestFlight Testing
I've developed an app utilizing substantial data uploaded to a CloudKit record in the development environment. Having deployed the Record Type schema to production and released a TestFlight version for testing, how can I transfer the data from the development to the production environment, or upload the data directly to the production environment? This is crucial as TestFlight testers can only access data from the production environment.
0
0
384
Oct ’23
Cannot Run Test Plan on CI tool
Hello, I am looking for help with using TestPlans in my ci tool. My workspace consists of my main project and 2 frameworks, that are linked to my main project. I am using fastlane to run the test plan associated with my main app's scheme, which has my main project's test suite and my 2 frameworks' test suites. When using fastlane locally, it seems to build every test suite and run tests accordingly, but on my CI tool (I am using CircleCI), it just runs my main project's test suite. Can I get some help on this? I have tried to add a failing test to my CI tool and the tests still pass. Any help is much appreciated!
0
0
603
Oct ’23
Transitioning Data from Development to Production Environment in CloudKit
In order to load your data into the production environment in Apple CloudKit, follow the steps below: Deploy Your Schema: Initially, deploy your schema to the production environment using the recommended approach provided by Apple. Prepare for TestFlight: Retain all the codes and views utilized previously for uploading data to the development environment. Deploy your app to TestFlight. TestFlight Approval and Data Transition: Upon receiving approval and ensuring the functionality on TestFlight, the same codes and views that were used to upload data to the CloudKit records in the development environment will now point to the production environment. Consequently, all the data will be uploaded to the production environment, facilitating a smooth transition. Post this process, your app on TestFlight will interact with the data in the production environment of CloudKit, ensuring consistency and enabling effective testing. This method ensures a seamless transition of data from the development environment to the production environment, aligning with the operational flow of CloudKit and TestFlight.
1
0
455
Oct ’23
Intermittent "Operation not permitted", "Unable to start the server" error while running 'safaridriver'
I'm encountering an intermittent issue while trying to run safaridriver on macOS Sonoma. Here are the details of the problem: I ran sudo /usr/bin/safaridriver -p0 --enable in the beginning. After that when I run this multiple times /usr/bin/safaridriver -p0, I sometimes receive an "Operation not permitted" error, but not consistently. This issue seems to occur intermittently. I've checked the sudo logs, and I see the following error message: kernel: (Sandbox) Sandbox: com.apple.WebDriver.HTTPService(2049) deny(1) user-preference-write com.apple.WebDriver.HTTPService cfprefsd: (CoreFoundation) [com.apple.defaults:cfprefsd] rejecting write of key(s) MobileDeviceRemoteXPCEnabled in { com.apple.WebDriver.HTTPService, nimish, kCFPreferencesAnyHost, /Users/nimish/Library/Preferences/com.apple.WebDriver.HTTPService.plist, managed: 0 } from process 2049 (com.apple.WebDriver.HTTPService) because setting these preferences requires user-preference-write or file-write-data sandbox access cfprefsd: (CoreFoundation) [com.apple.defaults:cfprefsd] Couldn't open parent path due to [2: No such file or directory kernel: (Sandbox) Sandbox: com.apple.WebDriver.HTTPService(2049) deny(1) network-bind local:*:7055 com.apple.WebDriver.HTTPService: (WebDriver) [com.apple.WebDriver:WebService] Error starting HTTP server listening on localhost:0: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted" UserInfo={NSLocalizedDescription=Operation not permitted, NSLocalizedFailureReason=Error in bind() function} com.apple.WebDriver.HTTPService: (WebDriver) [com.apple.WebDriver:XPCService] Client connection invalidated for some reason I am getting this on Mac Os Sonoma Can anybody please help on this?
0
2
677
Nov ’23
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
xcresult diagnostic content not visible in Xcode 15
Our CI pipeline produces .xcresult bundles that allow developers to diagnose failures by opening them in Xcode. If the test crashes, we used to be able to open the diagnostic folders and inspect the raw test logs. As of Xcode 15, that option is no longer available. I know the Diagnostic data is there because I can view it with Xcode 14. Am I just missing something in the Xcode 15 UI? Or has the capability to browse the Diagnostics actually been removed?
3
2
1.2k
Apr ’24
iOS Simulator Performance Issues
I have noticed that, as of late, the iOS simulator has been incredibly slow. Even simple (and perhaps silly) actions like changing the wallpaper take an unreasonably long time, to the point where it is no longer clear whether the process has hanged. I tried to change the wallpaper to a photo of mine, but it simply would not appear. Even booting up takes several seconds, and home screen animations are laggy. I've given up on testing my build for now. I have tried with an iPhone Xr and an iPhone 15 Pro simulator - both running iOS 17.0. Both are extremely laggy. This is on an M1 MacBook Air running the stable version of macOS Sonoma 14.0. with Xcode version 15.0.1 and Simulator version 15.0.1. I have checked the Activity Monitor for CPU and RAM. There is nothing abnormal. I would appreciate any suggestions.
1
0
583
Nov ’23
macOS installers from Mac App Store for testing purposes
I'm starting to set up a testing environment for macOS applications, and I want to be able to rollback to different versions of the OS (all machines can be scrubbed, so I don't worry about preserving user data). I noticed that I can download the latest versions of Ventura and Sonoma from the Mac App Store, but not past versions of Ventura and Sonoma Is there a way to download earlier versions of these macOSes (or maybe even earlier ones like Monterey)? Alternatively, if I regularly start downloading macOS installers from the Mac App Store and maintain my own local copies so I can use these to rollback to these versions, do I need to download a version for each hardware? For example, I currently have an M1 Mac mini, an M2 Mac mini, and an M1 Mac Studio. Do I need to download different installers for each of these hardware platforms?
0
0
392
Dec ’23
Creating a Dummy Apple ID for App Testing: Best Practices and Developer Strategies
Hello everyone! I have a question (issue). I need to write a test for an app, and everything is okay with my tests, but I need to test login with an Apple ID, and I don't want to use my private Apple ID because I plan to post this test on GitHub. Is there any possibility to create, for example, a dummy Apple ID account? Or how do developers typically handle this situation?
0
0
538
Dec ’23
Installing Sonoma 14.1.2 fails
I have an installer downloaded from the App Store a few weeks ago for macOS Sonoma 14.1.2 (I've made copies for testing purposes), but today I have been unable to install it on a volume - an experiment I had been conducting repeatedly last week. Is Apple blocking 14.1.2 from being installed now? (Sonoma 14.2 is the version currently available from the App Store) Have I reached some kind of limit on the number of times I can install it? Any other ideas? Here is the alert: Note: the problem I am testing is an issue with an app installed from TestFlight (that contained a network system extension) that killed networking when the OS was updated from Sonoma 14.1.2 to Sonoma 14.2. (related post)
0
0
476
Dec ’23
"Cycle inside Runner; building could produce unreliable results." Xcode Error
Hi! I'm trying to run my Flutter code natively on my iPhone, but whenever I try to run it, I keep get the following error message: Error (Xcode): Cycle inside Runner; building could produce unreliable results. Cycle details: → Target 'Runner': ExtractAppIntentsMetadata ○ Target 'Runner' has copy command from '/Users/matthewlee/flutterflow/AppName/build/ios/Debug-iphoneos/ImageNotification.appex' to '/Users/matthewlee/flutterflow/AppName/build/ios/Debug-iphoneos/Runner.app/PlugIns/ImageNotification.appex' ○ Target 'Runner' has compile command with input '/Users/matthewlee/flutterflow/AppName/ios/Runner/Base.lproj/LaunchScreen.storyboard' ○ That command depends on command in Target 'Runner': script phase “Thin Binary” ○ Target 'Runner' has process command with output '/Users/matthewlee/flutterflow/AppName/build/ios/Debug-iphoneos/Runner.app/Info.plist' I've been trying to rearrange my Build Phases in Xcode, but nothing has seemed to work yet. How do I fix this issue preventing my app from running?
1
0
764
Dec ’23
XCode Cloud ignores maximumTestExecutionTimeAllowance specified in test plan
I've created a test plan that includes the below configurations. {"configurations": [{ ... "options": { "defaultTestExecutionTimeAllowance" : 60, "maximumTestExecutionTimeAllowance" : 60, "testTimeoutsEnabled" : true }], "defaultOptions": { "defaultTestExecutionTimeAllowance" : 60, "maximumTestExecutionTimeAllowance" : 60, "testTimeoutsEnabled" : true, .... } ... } If I write a test that intentionally will take longer than 60 seconds, executing the test locally fails as expected with the error message Test exceeded execution time allowance of 1 minute let app = XCUIApplication() app.launch() let missingButton = app.buttons.firstMatch XCTAssertTrue(missingButton.waitForExistence(timeout: 120), "When a timeout is > 60 seconds, the default max setting of 60 seconds is still enforced") However, when this test is run using this test plan in XCode Cloud, it reports that it took 124 seconds to run and there is no message about exceeding execution time allowance. How can the test step be configured in XCode Cloud to ensure that the execution time allowances are respected?
1
0
2.2k
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
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
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
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