I am trying to do an XCTest, but neither setUp
nor testExample
are called in the code below.
import XCTest
class HogeTests:XCTestCase{
override funcsetUp(){
// Put setup code here. This method is called before the invocation of each test method in the class.
super.setUp()
}
override functearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
super.tearDown()
}
func testExample(){
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct results.
XCTAssert(true)
}
functestPerformanceExample(){
// This is an example of a performance test case.
measure{
// Put the code you want to measure the time of here.
}
}
}
If you press the diamond play button, it will be built and the application will start on the actual machine.
Xcode will continue to be in the following state for a while, then Test Failed, and the app will drop.
Please let me know if you have any questions.
swift ios xcode objective-c test
I solved myself!Thank you very much for your reply!
The reason was that ProvisioningProfile was not configured on the test target.
The following was helpful!!
https://stackoverflow.com/questions/31381291/unable-to-run-xctests-on-ios-device
610 GDB gets version error when attempting to debug with the Presense SDK (IDE)
574 Who developed the "avformat-59.dll" that comes with FFmpeg?
617 Uncaught (inpromise) Error on Electron: An object could not be cloned
911 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
© 2024 OneMinuteCode. All rights reserved.