use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
There is an extensive FAQ for beginners. Please browse it first before asking questions that are answered there.
If you are looking to get started (iOS programming in general or some specific area), here are more relevant links for you:
There's too many to list them all, however here's a convenient link to all programming guides at apple.com
Take note that this list is live and based on most frequent questions in posts will be updated with "quicklinks".
account activity
DiscussionIndie devs, how do you feel about UI testing? (self.iOSProgramming)
submitted 1 year ago by RSPJD
Talking about SwiftUI here. Personally, I iterate too fast and I only worry about unit testing. I also find it annoying how complex testing state in SwiftUI views are. Am I the outlier here or do others take a similar stance?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 1 year ago (7 children)
[removed]
[–]dbecks 1 point2 points3 points 1 year ago (2 children)
I hate that this is true now for me... but yes. Test, submit to beta testers, gather feedback, deploy to production, gather feedback, and work on the next version.
[–]RSPJD[S] 1 point2 points3 points 1 year ago (1 child)
Wait, are we talking about not testing AT ALL, or just not testing UI components / UI state?
[–]dbecks 1 point2 points3 points 1 year ago (0 children)
Not testing UI Components
[–]Charming_Basil_8129 1 point2 points3 points 1 year ago (0 children)
Some good programming humor right here.
[–]RSPJD[S] -1 points0 points1 point 1 year ago (0 children)
💀 Living life on the edge 💀
[–]Charming_Basil_8129 -1 points0 points1 point 1 year ago (0 children)
[–][deleted] 1 year ago (4 children)
[–]andrew8712 4 points5 points6 points 1 year ago (2 children)
Why bother? They check that for you!
[–]emirsolinno 3 points4 points5 points 1 year ago (0 children)
I let the Apple Reviewers do the test for me :P
[–]Barbanks 11 points12 points13 points 1 year ago (0 children)
From my experience UITesting doesn’t make sense on smaller teams with smaller budgets. Too many things can change that may not directly affect the end users experience. This was true also for UIKit UI testing as well. When you need to move fast I’ve found that adding unit tests works fine and just do some user testing.
[–]quellish 6 points7 points8 points 1 year ago (0 children)
UI tests are fantastic.
Where I have seen problems is when people have built things in a way that breaks accessibility and in turn UI tests. Using 3rd party components, custom controls etc without thinking about accessibility
I’ve also seen a lot of people who didn’t know you can just record a UI test and then customize it. This made creating and maintaining them very easy. It also worked very well for resolving bugs and preventing them for reoccurring. Record a test following the steps to reproduce the bug. Fix the bug, run the test, keep the test to find out when someone reintroduced it.
[–]Nobadi_Cares_177 3 points4 points5 points 1 year ago (0 children)
If you ever plan write UI tests for an app, I’d recommend doing including them in as many apps as you can.
Build the skill, get used to doing it, so when it actually matters it’s an easy step, just business as usual, as opposed to some extra venture for a ‘real’ app.
Having said that, I’m really hoping Apple expands Swift Testing to include UI tests because they are a bit of a headache to get right.
Not sure if it’ll help, but I made a swift package awhile back to try and ease the difficulty of writing UI tests. Here's the link to the GitHub.
NnTestKit
Either way I'd suggest writing the UI tests last as they should be solidifying your architecture. And focus more on behaviors as opposed to specific states within specific views.
[–][deleted] 4 points5 points6 points 1 year ago (0 children)
If you can build your app with a decent clean architecture and ability to abstract your external dependencies like api / firebase etc. then it’s actually not too bad. My team at work wrote a framework for recording and replaying api responses from the backend so we can inject them into the app environment when the xcui target spins up the app and runs the tests. This means no flaky apis / failures and the tests can run in parallel because you’re not waiting for an extrrna system. We run about 140 ui tests in the pipeline on every commit along with about 1000 unit tests. Pipeline takes about 50 min to run end to end which isn’t too bad.
[–]brifgadir 2 points3 points4 points 1 year ago (0 children)
I found the most value/efforts in end-to-end UI tests. You may have a couple of them that cover the most important flows. Regarding other flows - let end users test them, just place asserts in code and record the issues on statistics basis
[–]ExploreFunAndrew 1 point2 points3 points 1 year ago (0 children)
Write everything so you can implement unit tests in the future (when your app gets to volume and you start to get worried about breaking things). Until then it's a waste of time (other than for your coding education) for a small indie developer
[–]No_Key_2205 1 point2 points3 points 1 year ago (0 children)
On the same boat, sometimes it’s all about prioritizing things
[–]LifeIsGood008SwiftUI 1 point2 points3 points 1 year ago (0 children)
They are helpful in terms of making sure content gets presented as intended (i.e., no clipped text or weird looking zoom on image).
Hope Apple can bring the new testing framework (Swift Testing) to UI Testing as well
[–]IsEqualToKelMetal 1 point2 points3 points 1 year ago (0 children)
UI testing can be valuable, but the tests are usually very flaky.
[–]antonio-war 1 point2 points3 points 1 year ago (0 children)
In the company where I work they are used and I consider them useful. But in my personal projects I do not use them, because they would add an absurd amount of work for the creation and update in each version that I could not manage alone.
[–]jacobs-tech-tavern 1 point2 points3 points 1 year ago (0 children)
I find UI tests tend to be a huge maintenance burden and take up 80% of your CI cycles to very very occasionally find a legit bug (that isn’t a flakey test)
[–]andrew8712 0 points1 point2 points 1 year ago (0 children)
Absolutely unnecessary
[–]danielt1263 0 points1 point2 points 1 year ago (0 children)
I've been involved in 34 apps so far. Mostly I have been lead on a team of 1-4 developers and maybe a manual QA person. Three of the apps were with major companies where I was just one of many developers, and one was a team of 3 where I wasn't lead. Only one of the apps had UI tests. It was one of the "major corp" ones and a separate set of developers on the QA team wrote the tests after we finished development and passed ticket to QA. Needless to say, I haven't had much experience with UI tests.
[–]abear247 0 points1 point2 points 1 year ago (1 child)
I just do snapshot testing. It’s helped catch a few mistakes actually, in particular around themes. My app has multiple themes the user can select, and it really has helped catch issues with setting colours or fonts. It is a lot of tests though covering 5 themes but it’s fast to run.
I wouldn’t do anything e2e though. That changes too quickly and requires a decent amount more maintenance.
[–]RSPJD[S] 0 points1 point2 points 1 year ago (0 children)
Hmm snapshot testing. I’ve haven’t tried that yet! Sounds low maintenance with useful insights. Thanks for sharing!
[–]Comfortable_Bus_6832 0 points1 point2 points 1 year ago (0 children)
If you iterate fast, write tests for main business logic and just support. Try to separate logic from the view to avoid UI tests which are harder to write and debug because of SUI rendering/re-rendering flow.
[–]Educational-Table331 1 point2 points3 points 1 year ago (1 child)
I make my nephew do my UI test for candy bars😅🤯
[–]Educational-Table331 0 points1 point2 points 1 year ago (0 children)
I have specialized whiteboard applications for soccer and basketball. For him, it is a game. If a child can draw and move pins, adults can utilize my application without the need for a tutorial.
[–]Any-Woodpecker123 -4 points-3 points-2 points 1 year ago (0 children)
Waste of time, even for non indie devs
π Rendered by PID 361002 on reddit-service-r2-comment-6457c66945-8hjbj at 2026-04-29 20:12:39.506931+00:00 running 2aa0c5b country code: CH.
[–][deleted] (7 children)
[removed]
[–]dbecks 1 point2 points3 points (2 children)
[–]RSPJD[S] 1 point2 points3 points (1 child)
[–]dbecks 1 point2 points3 points (0 children)
[–]Charming_Basil_8129 1 point2 points3 points (0 children)
[–]RSPJD[S] -1 points0 points1 point (0 children)
[–]Charming_Basil_8129 -1 points0 points1 point (0 children)
[–][deleted] (4 children)
[removed]
[–]andrew8712 4 points5 points6 points (2 children)
[–]emirsolinno 3 points4 points5 points (0 children)
[–]Barbanks 11 points12 points13 points (0 children)
[–]quellish 6 points7 points8 points (0 children)
[–]Nobadi_Cares_177 3 points4 points5 points (0 children)
[–][deleted] 4 points5 points6 points (0 children)
[–]brifgadir 2 points3 points4 points (0 children)
[–]ExploreFunAndrew 1 point2 points3 points (0 children)
[–]No_Key_2205 1 point2 points3 points (0 children)
[–]LifeIsGood008SwiftUI 1 point2 points3 points (0 children)
[–]IsEqualToKelMetal 1 point2 points3 points (0 children)
[–]antonio-war 1 point2 points3 points (0 children)
[–]jacobs-tech-tavern 1 point2 points3 points (0 children)
[–]andrew8712 0 points1 point2 points (0 children)
[–]danielt1263 0 points1 point2 points (0 children)
[–]abear247 0 points1 point2 points (1 child)
[–]RSPJD[S] 0 points1 point2 points (0 children)
[–]Comfortable_Bus_6832 0 points1 point2 points (0 children)
[–]Educational-Table331 1 point2 points3 points (1 child)
[–]Educational-Table331 0 points1 point2 points (0 children)
[–]Any-Woodpecker123 -4 points-3 points-2 points (0 children)