
Add a test class to expand the scope of testing in a project with new methods.
Click the Add button (+) at the bottom of the Test navigator.
Choose New Unit Test Class or New UI Test Class from the pop-up menu.
Enter a name for the class in the Class field.
Choose a superclass from the “Subclass of” pop-up menu. By default, classes are subclasses of XCTestCase.
Choose a programming language from the Language pop-up menu.

Click the Next button.
Select a destination, group, and test target.

Click the Create button.
A new class is added to the target and appears in the Test navigator. The new class contains templates for setUp, tearDown, testExample, and testPerformanceExample methods.

Select the new class in the navigator and enter the test code in the source editor.