Skip to content

This project demonstrates the use of unit and UI tests with code coverage on Xcode 7 using Swift 2.0

License

Notifications You must be signed in to change notification settings

ugocastro/demo-xcode7-coverage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub license Platform Language Build Status codecov.io

Description

This is a basic project that demonstrates the use of unit and UI tests with code coverage on XCode 7 using Swift 2. It consists in a calculator application that performs basic operations, such as sum, subtraction, multiplication and division.

Development environment

To build and execute this project, the following requirements are needed:

  • Mac OS X 10.10.4 (or higher)
  • Xcode 7

How to build and execute the tests

Open the Calculator/Calculator.xcodeproj file on Xcode and press ⌘ + B to build and ⌘ + U to execute the tests and generate the code coverage.

##User Interface tests Xcode 7 comes with UI tests functionality. It records the user actions on application and generate the code to be used on test scenario (it's very similar to the Selenium IDE plugin for Firefox).

Click on `Record UI Test` button to launch the application and start recording the steps

Record UI tests

##Code coverage In addition to UI tests, the new version of Xcode comes with code coverage. To enable this functionality, act as follows

Enable code coverage

To see the code coverage, run the tests and execute the following steps

See code coverage

More info

For more info about how to create tests and visualize code coverage, look at this Speaker Deck presentation.

About

This project demonstrates the use of unit and UI tests with code coverage on Xcode 7 using Swift 2.0

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages