Monday, July 18, 2016

iOS Using Unit Tests

Xcode supports three main types of testing. Functional tests focus on code functionality. Performance tests focus on measuring execution time. User Interface tests focus on flows through the user interface. Functional and performances tests are functions that you write. Each function sets up an environment for the test, executes the targeted parts of the app, and tears down the test environment. User interface tests are recordings you make as you use your app.

A test case exercises a unit of code in a specific way or measures a specific part of your app’s performance; if the result of the test is different from the expected result, the test case fails. A test suite is made up of a set of test cases

When you create a project or a target, Xcode includes a unit test target in the scheme that builds the app. The implementation file for the target includes stubs for the setUp, tearDown, and testExample methods. Complete these stub implementations and add other code as necessary to perform unit tests on your app.

references:

No comments:

Post a Comment