r/macosprogramming • u/apex-lucis • Oct 14 '26
Xcode not showing the right number of tests?
Anyone else seeing that Xcode in the test panel doens't show the right number of tests. I've been adding tests today and the number hasn't increased.
2
Upvotes
1
u/navigator_93 Oct 15 '26
What version of Xcode are you running?
2
u/Economy-Department47 Oct 16 '26
You have to quit xcode and reopen it. At least that worked for me.
1
u/lensmithdev 16d ago
Restarting Xcode clears the flaky case, but when the count stays wrong after that, check three things. First, whether the new tests are in the active test plan and their target membership is set. Second, Product > Clean Build Folder, then delete the DerivedData folder for that project and reopen. Third, run xcodebuild test from the project root and look for the Executed line in the output. If the CLI shows the right number and the sidebar does not, it is a UI indexing glitch. If both are short, a test file is not in the scheme or the test plan.
1
u/Far_Ad5760 Oct 18 '26
Do you have your new tests added to a test plan, or scheme? Sometimes a setting might get inadvertently switched causing new tests to not be part of a scheme, which causes them to not run