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

Posts under Testing tag

105 Posts
Sort by:
Post not yet marked as solved
1 Replies
2.7k Views
All Developers :Did anyone found out a way easy way to manage iOS app in three different environments Dev/Stage/Prod?Considering the following pain points, looking for better options available -Code Signing using Distribution Profiles (having UDID's) for test devices from testers Retrictions of 100 iPhones can be registered and Apple not allowing reseting the device list on need basis.Even Apple allowed to Reset the device list, there could be organization running different development teams which easily have 100+ iPhone test devicesTesters, Product Owners require all three environments installed at the same time Yes, its too much work to have individual bundle identifier for each environment. Just imagin when you have Siri Kit and Apple Watch appSome times there is need that you have to invite some organizational person to review/test your appCrashlytics being going away starting April 01 and iOS users may not have gmail id to happily migrate to Firebase CrashlyticsAny many more......Please let me know in case any one found the so far a way to achieve deployment of the apps.One possibility I could think of is extending Test Flight features where is looking for some help from Apple. Have filed the Feedback ticket - •Test Flight Feature RequestFeedback - FB7552354Developer Tools1/26/20Open
Posted
by
Post not yet marked as solved
5 Replies
2.6k Views
Sometimes when running UI tests, the tests fail on keyboard input because the "Speed up your typing" keyboard tutorial overlay obscures the keys. This happens randomly, but sometimes repeatedly. Is there a way to turn this off? Checking for this tutorial before any keyboard input would significantly complicate tests just to check for one edge case...
Posted
by
Post not yet marked as solved
15 Replies
40k Views
Anyone able to get an Android Emulator up and running on Silicon? I've tried the AVD of Android Studio as well as Genymotion; neither work.
Posted
by
Post marked as solved
2 Replies
3.9k Views
I have recently started Beta Testing my SwiftUI App on my iPhone 6s, previously I was testing it on the iPhone 12 Simulator. While Testing on the Real Device I encountered issues like: CPU going past 98% Really Laggy ScrollView Tab Bar Freezes Randomly Since My app is going to go in Production State in a few days, Since this is my first iOS App as well, I am not too sure if these issues are because of SwiftUI, my Phone or what, I have asked Apple Support but, haven't received a response so far. My App Stats: Lines of Code: ~1,500 CPU Usage on Simulator: Max. 10% Bundle Size: 2MB RAM Max. on Simulator: 32.3mb
Posted
by
Post not yet marked as solved
9 Replies
4.9k Views
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?
Posted
by
Post marked as solved
2 Replies
892 Views
I can't execute individual tests or test suits on XCode 13.1, I get this message: Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds I can only execute the complete set of tests, is this a bug or am I missing something ?
Posted
by
Post not yet marked as solved
7 Replies
2.7k Views
We are having an issue when trying to view the the coveage report in our "merged result bundle" Running xccov view --report --only-targets merged.xcresult results in: 09:52:54 Error: Error Domain=XCCovErrorDomain Code=0 "Failed to load coverage archive in scheme action '(null)' in result bundle" UserInfo={NSLocalizedDescription=Failed to load coverage archive in scheme action '(null)' in result bundle, NSUnderlyingError=0x7f8ff8714f30 {Error Domain=NSCocoaErrorDomain Code=260 "The file “Metadata.plist” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/tmp/action.xccovarchive/Metadata.plist, NSUnderlyingError=0x7f8ff8714930 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}}} Checking the man page for xccov I was inspired by the idea of extracting the coverage report from the result bundle to try to understand or work around our error. The man xccov page states that If xccov is passed a result bundle directly, it will extract the report or archive implicitly, as part of the action being requested. Alternatively, the raw report/archive files can be extracted from the result bundle using xcresulttool(1) and subsequently passed to xccov. Checking man xcresulttool and trying out some stuff randomly I was not able to learn how a person might: Given an xcresult bundle use xcresulttool to create/extract an xccovreport bundle.
Posted
by
Post not yet marked as solved
24 Replies
18k Views
I try adding people as Sandbox Testers to my App, but Apple keeps saying that they already exist on the team, even though they're not. It always show "A user with this email address already exists on the team" It keeps happening with every address I try.
Posted
by
Post not yet marked as solved
6 Replies
2.8k Views
On an intel mac, my XCUITest test cases which is included swipe actions works perfectly but it doesn't work on my m1 mac. I tried running simulator with Rosetta but it doesnt work out it still gives an error when I run my cases because it clicks instead of swipe. Does anyone have a solution for swiping problem on the m1?
Posted
by
Post not yet marked as solved
2 Replies
1.1k Views
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?
Posted
by
Post not yet marked as solved
2 Replies
1.3k Views
Hello, I'm trying to visualize code coverage data in our project but I've faced issues getting the coverage data from the .xcresult bundle produced by xCode Cloud. On my local machine, I'm using xccov view to preview coverage data and everything looks fine: /Users/d.kuznetsov/Git/***/***.swift:     1: *     2: *     3: *     4: *     5: *     6: *     7: *     8: *     9: *    10: *    11: *    12: *    13: *    14: *    15: *    16: 4    17: *    18: *    19: *    20: *    21: *    22: *    23: *    24: *    25: *    26: *    27: *    28: *    29: *    30: *    31: 3    32: 3    33: 3    34: 3    35: *    36: 3    37: 3 [ (56, 0, 0) ]    38: 0    39: 0    40: 3 [ (1, 9, 0) ]    41: 3    42: 3    43: 3    44: 3    45: *    46: 3    47: 3    48: 3    49: 3    50: * But when I tried to use the same approach in ci_post_xcodebuild.sh I couldn't see the coverage data: #!/bin/sh xcrun xccov view --archive $CI_RESULT_BUNDLE_PATH Am I missing something? The schema settings are the same for both Cloud and local machine and code coverage gathering setting is enabled.
Posted
by
Post not yet marked as solved
2 Replies
2.0k Views
I've been reading through the documents and I feel like each particular doc jumps over the piece of info that I need. It explains how to create a Sandbox Test User and I've done that. I did plenty of IAP work many years ago, but things have changed enough that it's not working as I expect. When I read the docs, I feel like I can't find the missing piece. When I test in a simulator with Xcode, it does my IAP transactions in the Xcode environment. That makes sense. https://developer.apple.com/documentation/storekit/in-app_purchase/testing_in-app_purchases_with_sandbox This page says: To run your app using your Sandbox Apple ID, build and run your app from Xcode. But when I test on a physical device installing directly from Xcode, it also does my IAP transactions in the Xcode environment. I thought this would put me in the Sandbox environment, but it didn't. The initial purchase view controller didn't reference the Sandbox at all and the "You're All Set" alert shows Environment: Xcode. When I put a test build into TestFlight and test using that version, my IAP transactions are happening in production using my real Apple Id (but I'm not actually charged for any transactions). I assumed that testing in TestFlight would give me the Sandbox environment, but it happens in the Production environment. (The purchase view controller doesn't show Sandbox and the "You're All Set" alert doesn't show Sandbox.) So, how do I test in the Sandbox? Every way I try to test either puts me in the Xcode environment or the Production Environment. What am I missing? I've logged out of my real Apple id on my phone and then logged in with the Sandbox User credentials I created in AppStore Connect. But when I tried to test the app, by installing from Xcode it still says I'm in the Xcode test environment. When I create transactions, those transactions show up in the Xcode Transaction Manager. How do I test in the Sandbox environment?
Posted
by
Post not yet marked as solved
2 Replies
1.8k Views
Hello, I'm trying to upload my code coverage to an external service. I've created a workflow on Xcode Cloud that build and run my test + a ci_post_xcodebuild script that uploads my Project.xcresult to an external service My problem here is that I need the repository source code the moment I upload my coverage file. I have two steps in my workflow: Build tests (Which contain the sources but not the coverage results) Run tests (Which contain the coverage result but not the sources) I found this in the Apple documentation: Lastly, it should be noted that in a test action, multiple environments are used to build and run your tests. Only the environment that is used for building your tests will have your source code cloned into it by default. The environments that run your tests won't have source code cloned into them. They'll only have the ci_scripts folder made available on them. As a result, the post-clone script won't run in these environments and your custom scripts and any of their dependencies, such as other shell scripts and small tools, must be entirely contained within the ci_scripts folder. Source: https://developer.apple.com/videos/play/wwdc2021/10269/ I feel a bit stuck here maybe Xcode cloud is not the way to go for this but I was wondering if by any way I could still check out my project sources after the test execution.
Posted
by
Post not yet marked as solved
1 Replies
682 Views
This seems kind of odd. I am preparing a quick review of TestFlight setups for a testing group using my second apple ID. Everything works as expected on an iPhone. However, when I download TestFlight on an iPad with the same Apple ID, it only shows me macOS Only Apps and not iOS Apps. I must have some setting wrong somewhere but for the life of me I can't find it. Any ideas?
Posted
by
Post marked as solved
3 Replies
1.5k Views
Hi, My team is in the process of upgrading from Xcode 13 to Xcode 14 for our development. Today I noticed that our code coverage reporting in Xcode is showing a clearly incorrect result: 0.0% when it should be saying a significantly higher number based on Xcode 13's calculations also run today. We have now reproduced the 0.0% issue on two different computers. Has anyone else noticed something like this? It looks like coverage is being reported just fine for our CocoaPods, but not for our internal targets. This is a predominantly-Swift codebase. In the Build Settings, I've tried setting "Enable Code Coverage Support" to true and "Generate Legacy Test Coverage" to false for our main target even though previously "Enable Code Coverage Support" was only true for the test target; however that does not make a difference. xcodebuild yields the same results when I attempt to generate a .xcresult from the command line. Thank you in advance for any guidance you might be able to provide me on this.
Posted
by
Post not yet marked as solved
2 Replies
1.2k Views
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
Posted
by
Post not yet marked as solved
0 Replies
560 Views
Hello everyone! Ever since last week, when running UI tests on the Xcode cloud for my app, the responses are very slow causing unusual and long timeouts which cause the tests to fail. Also by looking at screenshots I'm receiving in the logs, it seems like there's some lagging as well. Additionally, today I have been receiving these errors (pic attached) constantly which are causing my test runs to completely fail as well: Is anyone facing the same issue? Or knows what's going on exactly?
Posted
by
Post not yet marked as solved
0 Replies
899 Views
I have a universal app that runs on iPhone, iPad, and Mac. And I offer auto-renewing subscriptions that are universal purchases. So subscribing on the iPhone should also activate the subscription on the Mac app. I noticed that this purchase syncing does not work in TestFlight. I've read that Family Sharing does not work for TestFlight sandbox purchases. Are purchases made on TestFlight generally not synced across devices? Or am I maybe doing something wrong with handling or setting up the subscriptions? If TestFlight does not support syncing of purchases, what is the recommended way to test the cross-platform activation of Universal Purchases?
Posted
by
Post not yet marked as solved
4 Replies
1.3k Views
Hello, we have a bunch of macs which we use for running automated UI test and we need to allow services kTCCServiceScreenCapture and kTCCServiceAccessibility to our application bundles (it's a kind of a screen sharing application). We tried to do a direct change in: User's ~/Library/Application Support/com.apple.TCC/TCC.db but it doesn't take effect as it looks like these permissions need to be granted in system TCC database The system database at /Library/Application Support/com.apple.TCC/TCC.db is write-only due to rootless. Is there any other way than completely disable SIP to grant these TCC permissions to our bundles? Also we would be just fine to grant permissions manually when we're setting up the machine, but it seems these get reset from time to time. And that's my other question: How the TCC validation works? We're testing ad-hoc signed bundles as well as DeveloperID signed ones with the same Application ID and it seems that TCC gets confused over time and simply treats the permissions as not granted. Would modifying csreq in TCC.db record to contain only requirement identifier=my.bundle.app.id prevent this behavior or there is some other heuristics TCC uses for permission validation? Thank you, o/
Posted
by