Home > Mobile >  Unchanged test target added after the fact fails
Unchanged test target added after the fact fails

Time:05-16

In my existing project, I added a Unit Test Target. Running the test of this newly added target fails without me having changed anything. Also, the diamonds next to the funcs remain blank, so I cannot even say where it is failing specifically...

Shouldn't the testing template just work after being added? Changing the default test to XCTAssert(true) won't work neither, also, though I don't think it makes a difference just yet, I did @testable import MyAppName at the top of the default test file as well without any difference in the result.

What am I missing here? Xcode is version 13.3.1.

CodePudding user response:

Turns out that I had to change the Signing Certificate of the target under test from "Sign to run locally" to "Development" and double check that the same value was set in the test target.

After that was in place, everything worked.

  • Related