Reputation: 3079
I've created my project without XCTest
support.
But now after long time development i want to cover my project with unit tests. And i want do it with XCTest
.
How to import XCTest suite into existing project previously created without XCTest support ?
Upvotes: 0
Views: 1442
Reputation: 2149
Adding XCTest target to an existing project is simple you can refer
or follow the steps 1. Click on project 2. Add the target choose the one which you want. Follow this image
Upvotes: 0
Reputation: 239
You can add new Unit/UI test case classes through "file-> new-> file -> UI test case class or Unit test class". Make sure that the target membership is set for only the test target and not the regular targets (you can see that in the file inspector). If you currently have no test target, you can add that through "file -> new -> target -> iOS UI testing bundle or iOS Unit Testing Bundle" and add relevant files to the this target.
Upvotes: 3