Post not yet marked as solved
Desciption:
The UI tests work on the local machine (Mac mini), but not on the Xcode server. The Mac mini is also used for the Xcode server. For some integrations on the server, some UI tests work, but often they fail again for the next integrations.
iOS simulators and devices were used when running the UI tests. The error usually happens when typing into a textfield.
Some people suggested to modify the "setUp" and "tearDown" functions to this:
override func setUp() {
XCUIApplication().terminate()
super.setUp()
XCUIApplication().launch()
}
override func tearDown() {
super.tearDown()
XCUIApplication().terminate()
}
But that also didn't work.
I don't understand why the UITests don't work on the server, but do work on the local machine without the server.
Error:
Bot Issue for ProjectXYZ (test assertion in MovieTests.testXYZ())
Integration #1 of Bot on Mac mini
Test Failure: Failed to synthesize event: Timed out while synthesizing event.
Server-Environment:
Mac mini (2018)
Server API v19
Xcode 12.4
macOS 11.2.3
Server 5.11
Post not yet marked as solved
I have a few projects in an xcode workspace and their test suite runs successfully from xcode UI.
When running from terminal, tests also pass,
but all test runs show the error below.
While searching for an answer, I can't seem to find this error anywhere except on this github issue - exact same error.
They seem to think it's related to timezones.
Any ideas?
2021-06-15 10:43:34.169 xcodebuild[23016:11700744] [MT] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-18205/IDEFoundation/Testing/IDETestRunSpecificationBuilder.m:678
Details: Failed to compute path to baseline file during test run spec construction: <XCTHTestRunSpecification: 0x7fc0f2135d10>
Object: <IDETestRunSpecificationBuilder>
Method: +testRunSpecificationsForTestingSpecifiers:scheme:buildables:withBuildParameters:additionalEnvironmentVariables:additionalCommandLineArguments:testRerunPolicy:includeClangProfileParameters:shouldDebugAppExtensions:error:
Thread: <NSThread: 0x7fc0ea41a760>{number = 1, name = main}
Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide.
... <REDACTED> ...
Executed 9 tests, with 0 failures (0 unexpected) in 0.008 (0.013) seconds
2021-06-15 10:43:36.413 xcodebuild[23016:11700744] [MT] IDETestOperationsObserverDebug: 0.985 elapsed -- Testing started completed.
2021-06-15 10:43:36.413 xcodebuild[23016:11700744] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
2021-06-15 10:43:36.413 xcodebuild[23016:11700744] [MT] IDETestOperationsObserverDebug: 0.985 sec, +0.985 sec -- end
Test session results, code coverage, and logs:
/Users/REDACTED/Library/Developer/Xcode/DerivedData/abbi-gmmaphqilqlepberuzixuqprsano/Logs/Test/Test-AbbiResidentSimulator-2021.06.15_10-43-34--0700.xcresult
** TEST SUCCEEDED **
macos 11.4
xcode 12.5 (12E262)
Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55)
Target: x86_64-apple-darwin20.5.0
Post not yet marked as solved
I get this error when I try to run unit tests (yes, it says "UI testing", but I don't have any UI tests). On both simulator and device, whether I run/build the app before or not. How do I solve this?
Post not yet marked as solved
I have issue of crackling sound from the right speaker of MacBook Pro 13 inches 2020. I started getting this problem after downloading macOS Big Sur 11.4. I am considering this is an issue. Any suggestions or solution for it?
Post not yet marked as solved
Hi
I have installed IOS 15 beta and have problem with safari.
The problem occurred when I closed one of the browser tabs, but when I turned on safari again, this tab came back.
after I closed this tab a few times, the safari stopped working and I couldn't even turn on safari.
When i click on the safari icon it won't turn on, it looks like i was opening and closing applications immediately safari before it loads.
Post not yet marked as solved
On a device, If I have a string, say "04:00 PM" and convert it to a date using a dateformatter:
let dateFormatter = DateFormatter()
dateFormatter.format = "h:mm a"
let d = dateFormatter.date(from: "04:00 PM")
If the device is set to a 24 hour time format, then d is nil. On a simulator, the result is a date. What I want to do is to somehow set up the simulator to return a nil under this circumstance. How do I do that?
Things I have tried: setting 24-hour format on the Mac, setting the region on the Mac, setting the region on the simulator, setting the locale in the simulator (maybe there's a locale setting I missed). For the Mac update settings, I reset the simulator afterward for the change to take effect.
So far nothing I've tried works.
The purpose of this is to allow automated tests to be able to detect these nils that will happen on actual devices.
Post not yet marked as solved
After updating latest MacOS monterey public beta, Logic is getting crush all the time while opening the app.
I have macbook pro M1.
Post not yet marked as solved
We use iPads extensively in our corporate setting. We are bound by federal regulations concerning iPad application use. One regulation requires testing of new or changed applications to verify conformance and that no erroneous output is allowed.
My questions is how can I test a third party purchased app? I need to have automation take a file of inputs (hundreds) and log all outputs, pass / fail.
Is there such a program available. The app creator cannot/will not do this requirement for us.
Post not yet marked as solved
Is there any mechanism to disable this user prompt during development? This completely breaks automated testing setups.
Post not yet marked as solved
I installed the Airpods Pro Beta and it updated the firmware on the Airpods ok (4A362b) But I cannot get the interface to show the Conversation Boost selections. Any suggestions? I've tried deleting and re-installing profile etc.
Post not yet marked as solved
I've recently updated my mac mini 2018 to big sur and I use wired apple keyboard with it but after updating to big sur my keyboard 2 key and the at sign key stopped working now I know my keyboard is fine because I tested it over my older mac mini late 2012 but its not working in big sur.
My keyboard input source is U.S and language of mac mini is also U.S still the issue is coming.
Post not yet marked as solved
I wrote a few unit test cases using XCTest by mocking the data? Is there any best practice to have multiple test profiles with different data sets? Sometime mock should return nil, sometimes an array with 2 elements and sometimes an array with 10 elements. How to have multiple test profiles?
Post not yet marked as solved
I am trying to test my app on my own device and i need to enable push notification.
for that i need to enable it on APNs on my developer account profile.
my question here is , do i need to have a paid membership to test on my own device ?
Post not yet marked as solved
I was having issues with the new BEta 15.0 in which I could not use my internet without resetting network settings. I removed the beta profile but now my phone barely works with US cellular data, and cannot use my phone if it is connected to any kind of wifi, whether its home or work. As soon as wifi is on, nothing works data related on my phone. So I have to turn it off. Very frusrating since the building I live in, I need wifi calling to use my phone and my wifi to use internet
Post not yet marked as solved
I'm using WKWebView to load content. That part of the code works fine. Now I want to add a toolbar: went to storyboard, added toolbar, added button in the toolbar. Hit run just to see the toolbar in the simulator and nothing!!
Code is below:
// Created by Matthew on 8/31/21.
import UIKit
import WebKit
class ViewController: UIViewController, WKUIDelegate, WKNavigationDelegate {
@IBOutlet weak var webView: WKWebView!
override func viewDidLoad() {
super.viewDidLoad()
//start code
let webView = WKWebView()
webView.uiDelegate = self
webView.navigationDelegate = self
let htmlURL = Bundle.main.url(forResource: "index", withExtension: "html", subdirectory: "FILES")!
webView.loadFileURL(htmlURL, allowingReadAccessTo: htmlURL.deletingLastPathComponent())
view = webView
}
//Can't get toolbar to show on simulator. Can not test print button
@IBOutlet weak var Toolbar: UIToolbar!
@IBAction func BBI(_ sender: Any) { }
@IBAction func PrintPDF(_ sender: Any) {
let printController = UIPrintInteractionController.shared
let printInfo = UIPrintInfo(dictionary:nil)
printInfo.outputType = UIPrintInfo.OutputType.general
printInfo.jobName = (webView.url?.absoluteString)!
printInfo.duplex = UIPrintInfo.Duplex.none
printInfo.orientation = UIPrintInfo.Orientation.portrait
printController.printPageRenderer = nil
printController.printingItems = nil
printController.printingItem = webView.url!
printController.printInfo = printInfo
printController.showsNumberOfCopies = true
//printController.printFormatter = webView.viewPrintFormatter()
//printController.presentFromBarButtonItem(PrintPDF, animated: true, completionHandler: nil)
printController.present(animated: true, completionHandler: nil)
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// dispose of any resources that can be recreated
}
}
Post not yet marked as solved
Test UI and unit tests are working fine on 14.3 with XCode 13.0 beta4 but it gets stuck on 15.0 and doesn't execute any test case with no error.
Post not yet marked as solved
I successfully submitted and updated the application in AppStore.
Here I am facing one issue while updating the app from the app store app is getting crash(after launch Screen).
While the fresh installation application is working without a crash.
No crash while testing and in TestFlight.
No crash reports were available from the store.
Here I am using firebase DB.
my DB is different from previous version(fbdb_1) to present version(fbdb_2).
The whole data is the same for the two DB's.
Any suggestion would be helpful.
Thank you.
Post not yet marked as solved
I have this performance test to check Memory usage during scrolling.
func testMemotyUsage() {
let app = XCUIApplication()
let measureOptions = XCTMeasureOptions()
measureOptions.invocationOptions = [.manuallyStop]
measure(
metrics: [XCTMemoryMetric(application: app)],
options: measureOptions
) {
app.buttons["Listing Page"].tap()
swipeUp()
stopMeasuring()
tapBack()
}
}
func tapBack() {
app.navigationBars.buttons.element(boundBy: 0).tap()
}
func swipeUp() {
collectionView.swipeUp(velocity: .fast)
}
func swipeDown() {
collectionView.swipeDown(velocity: .fast)
}
var collectionView: XCUIElement {
app.collectionViews["collectionViewId"]
}
But when I run the test, it doesn't display any metrics at all.
I tried to update
XCTMemoryMetric(application: app) -> to XCTMemoryMetric()
In this case it at least shows some result, but the result is incorrect, because as it's seen on the screenshot below, the app consumes around 130 MB of memory, but the test shows 9 KB only. BTW the real memory consumption is around 130-150 MB, because there are a lot of images in the collection view.
My guess that it doesn't show the correct result, because the app is not passed as a parameter. Although when I pass the app, it doesn't show any results at all 🙃
Same issue happens when I write the test to check CPU usage with XCTCPUMetric.
Questions:
How to write a performance test that will show memory and CPU usage of some UI tests?
(Optional) Why when I run the test in Debug mode, it shows that 2 processes are running (ExampleUITests - the target for UI tests, and Example - the main target). Is it normal and when I measure the memory consumption, am I supposed to get the consumption of the main target Example, right?
Post not yet marked as solved
Hi, i have updated iOS from 14.8 to 15. After that i am facing issues like so many apps are lagging. Those were working perfectly fine on the same day prior to update. IPhone storage is taking 3+ mins to load completely. Apple store is taking couple of secs to load. Iphone is getting extremely heat while using. Charging is also taking longer time.
Chat with apple support team, as per their suggestion, updated iOS again using my pc. Still getting the same issue. They are also suggesting to do factory reset as well.
Why would i do factory reset and restore again. Just downgrade it to iOS 14.8 again.
Post not yet marked as solved
Following moving to Xcode 13 from 12.5, we are seeing our test coverage reported at ~1%, with only a small number of tests being reported in line with previous xcode builds.
Is this a know issue? Are there steps we can take to debug or mitigate this?
Nothing of note identified within the build log.
Xcode 13 Coverage:
Xcode 12 Coverage: