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

Xcode Accessibility audit in UI Tests gives less than stellar results
I have added a UI test that uses the newish app.performAccessibilityAudit() on each of the screens in my SwiftUI app. I get a handful of test failures for various accessibility issues. Some of them are related to iOS issues (like the "legal" button in a map view doesn't have a big enough tappable are; and, I think, there is a contrast issue with selected tabs in a tab bar, or maybe it is a false positive). Two of the error type I get are around Text elements that use default font styles (like headline) but that apparently get clipped at times and apparently "Dynamic Type font sizes are unsupported". For some of the errors it supplies a screenshot of the whole screen along with an image of the element that is triggering the error. For these text errors it only provides the overall image. After looking at the video I saw that part of the test runs the text size all the way up and I could see that at the largest size or two the text was getting cut off despite using default settings for the frames on all the Text elements. After a bit of trial and error I managed to get the text to wrap properly even at the largest of sizes and most of the related errors went away running on an iPhone simulator. I switched to an iPad simulator and the errors re-appeared even though the video doesn't show the text getting clipped. Does anyone have any tips for actually fixing these issues? Or am I in false positive land here? Also, is there any way to get more specific info out of the test failures? Looking at the entire screen and trying to guess where the issue is kinda sucks.
0
2
372
3w
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
167
3w
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
182
2w
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
187
2w
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
179
1w
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
177
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
131
1w
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
1
0
109
3d
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
105
5h