Xcode Test No Permission in External Volume
Sometimes we can see errors while running Unit Test bundles from an external hard drive on Mac. We usually use external drive to protect the internal hard drive.
xctest (31980) encountered an error (Failed to create a bundle instance representing '/Volumes/VolumeName/path/to/bundle ...
We can run this command to reset all TCC permissions for SystemPolicyRemovableVolumes:
tccutil reset SystemPolicyRemovableVolumes
After that, there would be a UI to ask for permission again.