I recently added a XCTest target to my existing project in Xcode to improve my code quality. But when I run the test, Xcode went stuck and keeps showing testing on the toolbar. I wait for about 10 minutes and nothing changed. After about half an hour of searching on the web I got the solution.
Here are the steps:
- In the Xcode menu, go to Product -> Schema -> EditSchema -> Test
- Under the Test Plans section, you can find your project.
- There's a small
right arrow
icon after the projects name. Click it. - There's an Options button at the right side of the new page. Click it.
- A popup is shown, and have a select called
Parallelization
- Select
Swift Testing Only
- The editor may ask you to save the configuration, just save it.
- Run your test again, and it should work now.
Why this happened?
I've no idea...
But just do it, stop wasting time on the bug.
本文由博客一文多发平台 OpenWrite 发布!