Xcode5: creating a new test goal

I am trying to create my first XCTestCase in my existing iOS + Mac project. I created a new test class, and I see that it created a new test target for me in my project, but in the new scheme there are no linked libraries and source code files from my existing target. He simply shared the circuit with an existing goal, but not one of the details of the project. I do not want to add every source file and frame library to a new test target. Is there a way to simply create a new test goal that is a clone of an existing goal? Or add all the source files to my target without being

0
source share
2 answers

When configured correctly, the test suite is associated with your application. You should not put production code in your test target, only test code.

+3
source

I probably did something wrong in the way I set up the test target. You can create a new test target (from New → Target → Unit Testing Bundle), configure it from an existing target, and it should be built and connected just fine, and you can import any existing files into the test class.

0
source

Source: https://habr.com/ru/post/1534368/


All Articles