Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode/iOS xctest - Build input file cannot be found

I created the first unit test target in our iOS application by simply clicking through the plus icon inside the test tab on the left navigator. (The target to be tested is set to the main application)

Creating a new unit test target

The unit test target created itself successfully but when I try to run the pre-generated tests, it outputs an error message. The error message displays that the build input file cannot be found. More specifically, the file /Plugins/XXXTests.xctest/XXXTests cannot be found. I double checked and in fact that file is not in that directory.

Error message when trying to run tests

While I could not find anything similar to this problem, I tried everything that was close to it but nothing seemed to fix problem.

Any help would be greatly appreciated!

like image 335
Mansoor Shah Said Avatar asked Nov 08 '18 18:11

Mansoor Shah Said


1 Answers

For me, it was because the test source files are not included in the test target.

Including those test files in the test target solved it.

like image 119
Hlung Avatar answered Sep 17 '22 21:09

Hlung