We've been building a project using TCA and then IsoWords structure of modularisation.
Last week the project suddenly stopped rendering any of the test diamonds (on the left of each test function) in the test files inside any of the packages that we have.
This has happened to everyone on the team. We've all been using Xcode 14.2 and I can't find any way to fix it.
I presume that there is something that we have done to cause this in the app. But I'm not sure what it might be?
Sorry this is light on information but I wondered if there is anyone that might be able to point me in the right direction to further debug this?
I've tried the usual stuff of deleting derived data, clean build folder, restart Xcode/laptop. I haven't tried re-cloning the project but a colleague has.
I'm not sure what to check now?
Hi! Can you please illustrate better the error that you’re getting when trying to run the tests?
Did you check if your test targets are included in active scheme? You can try add new scheme with only test target and check if it helps.
Hey, it's not an error. It just doesn't show any of the test feedback in the file. Like the diamonds in the left hand gutter with the test status.
Or any test failure messages.
However, I've deleted our
.swiftpm folder and recreated all the schemes from scratch and they're all back now.
It's really odd. Just so inconsistent.
Sadly this is an Xcode bug that started in 14.0. It's gotten a little better in 14.1 and 14.2, but it's still there. It also affects non-TCA applications. For example, here's the test suite for the Standups app in our swiftui-navigation library:
We usually have to clean+rebuild or restart Xcode to get the diamonds back.
We filed a Feedback in July 2022. Here's the # in case you want to duplicate it: FB10910099
Great thanks for the info.
I've noticed that other people online seem to be reporting it too.
Xcode does seem to be particularly inconsistent around managing schemes in project.
Incidentally, I completed nuked our schemes and recreated them and it seems to have solved it for now. So will remember that and keep it in mind for if/when it happens again.
Yes, this is an Xcode bug and it’s incredibly annoying. Even more so is test errors not showing inline. It’s a massive productivity drain. Amazed it hasn’t been fixed by then, Xcode releases seem to be few and far between these days.
This happens to me if I add the test targets of my packages in Test Plain for the app target.
Just wondering if there is any other workarounds to this that anyone have found apart from what Brandon mentioned.
Looks like this bug is back in Xcode 15, at least for tests in a local SPM package test target. Still not fixed in 15.1.
I faced missing test diamonds for a file that had previously worked. I tried the deleting and recreating schemes, and rebooting etc etc - no luck.
In my case the fix was the file had been taken out of our test target. It looks like the cause was due to fixing a merge conflict inside the pbx.proj file. Ticking the checkbox to add it back fixed the problem.
I have a mac only app and no chance to see the diamonds or any test in the test tab...