Skip to main content
0 votes
2 answers
85 views

I'm doing some UI Tests for my iOS app using the XCTest framework. I have a test that launches my app, taps a button, fills in the login info, and taps Login. The app then sends a request to a server ...
Kenny Wyland's user avatar
-1 votes
1 answer
109 views

I have following case. NotMyProtocol is from external library. It is not suitable to work with Swift Concurrency so I though some way to implement it and I will pass some proxy into it to forward ...
Marcin Kapusta's user avatar
1 vote
1 answer
129 views

I'm trying to stabilize a flaky UI test that deals with the "Allow Paste" system alert in iOS (see screenshot below). Sometimes it works, sometimes the test hangs or fails. I'd appreciate ...
Asi Givati's user avatar
  • 1,485
-1 votes
1 answer
163 views

In trying to run tests on my app in Swift, I am encountering a problem. I do not have any breakpoints set, and yet, the execution of the tests is being interrupted on the line containing "throw ...
ratbum's user avatar
  • 1,035
6 votes
1 answer
106 views

I've created the following class that's a custom formatter supporting formatting both attributed and standard strings: import Foundation import SwiftUI /// A formatter that converts a distance value (...
Richard Topchii's user avatar
0 votes
0 answers
143 views

I am trying to write a UITest for SwiftUI link that I have set up in the following way: var body: some View { privacyPolicyLink } private func privacyPolicyLink(with url: URL) -> Text { ...
Shawn Frank's user avatar
  • 5,303
1 vote
1 answer
197 views

I'm trying to run unit XCTest on the simulator and I'm getting a signature error. At the same time, the tests on your iPhone device are running correctly. I use the Personal Team for the signature. In ...
monteg's user avatar
  • 23
0 votes
3 answers
1k views

For my new SwiftUI app I'm looking to add tests. Using Swift Testing I've started to write some unit tests. I'm looking to add UI tests as well. The app relies heavily on network calls to fetch data ...
Pieter's user avatar
  • 295
-1 votes
1 answer
97 views

Started on some unit tests today in Xcode and decided to test my test. Turns out they always pass but not sure why. The following should fail: struct MyUnitTest { @Test func example() throws { ...
Rob Bonner's user avatar
  • 9,420
0 votes
1 answer
89 views

I have a bunch of tests for my macOS app. It is XCTest. Being run the last test turning on whole OS theme to dark, so I need every time to go to the System settings changing it back manually. I did ...
user185929's user avatar
0 votes
0 answers
61 views

I have several tests written for a series of static properties within an extension in Swift, but I can't get SonarQube to mark them as covered. I've tried everything, but even with the following code,...
mhergon's user avatar
  • 1,668
0 votes
0 answers
83 views

I'm building the unit tests for my project and I encountered a problem about a mock I use for UNUserNotificationCenter. I oversimplified my code as an example: I use a protocol to Mock the add() ...
Jintae's user avatar
  • 53
1 vote
1 answer
326 views

Sometimes, I have to write tests that validate that some value changes eventually. It happens, for example, if I need to deal with unstructured concurrency. Here's an example of such kind of tests in ...
lazarevzubov's user avatar
  • 2,513
3 votes
1 answer
405 views

Hello, I'm trying to unit test a SwiftData Model, but I'm facing a weird situation and couldn't find an answer to the problem. The first solution I'll show you does not work, the second one does. ...
Jintae's user avatar
  • 53
1 vote
0 answers
50 views

In my code below, the TextField is seen by the framework as a .textView elementType. When I write to it, I get the following error Failed to synthesize event: Neither element nor any descendant has ...
Pabtuz's user avatar
  • 43

15 30 50 per page
1
2 3 4 5
135