Test-driven iOS development with Swift create fully-feature and highly functional iOS apps by writing tests first

Create fully-featured and highly functional iOS apps by writing tests first About This Book Learn test-driven principles to help you build apps with fewer bugs and better designs Become more efficient while working with Swift to move on to your next project faster! Learn how to incorporate all of th...

Descripción completa

Detalles Bibliográficos
Otros Autores: Hauser, Dominik, author (author)
Formato: Libro electrónico
Idioma:Inglés
Publicado: Birmingham : Packt Publishing 2016.
Edición:1st edition
Colección:Community experience distilled.
Materias:
Ver en Biblioteca Universitat Ramon Llull:https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009630069906719
Tabla de Contenidos:
  • Cover; Copyright; Credits; About the Author; About the Reviewer; www.PacktPub.com; Table of Contents; Preface; Chapter 1: Your First Unit Tests; Building your first automatic unit test; What are unit tests?; Implementing a unit test example; Important built-in assert functions; Understanding TDD; The TDD workflow - red, green, and refactor; Red; Green; Refactor; TDD in Xcode; An example of TDD; Red - example 1; Green - example 1; Refactor - example 1; Red - example 2; Green - example 2; Refactor - example 2; A recap; Finding information about tests in Xcode; Test Navigator; Tests overview
  • Running testsThe setUp() and tearDown() methods; Debugging tests; Breakpoint that breaks on test failure; Test again feature; Advantages of TDD; Disadvantages of TDD; What to test; Summary; Chapter 2: Planning and Structuring Your Test-Driven iOS App; Task list view; Task detail view; Task input view; Structure of the app; The Table View Controller, the delegate and the data source; Table view cells; A model; Other view controllers; Development strategy; Getting started with Xcode; Setting useful Xcode behaviors for testing; Useful build behaviors; Testing behaviors; Summary
  • Chapter 3: A Test-Driven Data ModelImplementing the ToDoItem struct; Adding a title property; Adding an itemDescription property; Removing a hidden source of bugs; Adding a timestamp property; Adding a location property; Implementing the Location struct; Adding a coordinate property; Implementing the ItemManager class; Count; Adding and checking items; Equatable; Removing all items; Ensuring uniqueness; Summary; Chapter 4: A Test-Driven View Controller; Implementing ItemListViewController; Implementing ItemListDataProvider ; Conducting the first tests; Fake objects; Using mocks
  • Checking and unchecking itemsImplementing ItemCell; Implementing DetailViewController; Implementing InputViewController; Summary; Chapter 5: Testing Network Code; Implementing asynchronous tests; Implementing a login request to a web service; Handling errors; Summary; Chapter 6: Putting It All Together; Connecting parts; The initial View Controller; Showing the input view; Showing the detail view; Serialization and deserialization; Functional tests; Adding a UI test target; Recording and testing; Summary; Chapter 7: Code Coverage and Continuous Integration; Enabling code coverage
  • Code coverage in XcodeWhat code coverage is enough?; Continuous integration; Installing and setting up Xcode Server; Adding bots; Automatic deployment with fastlane; Installing fastlane; Setting up; Summary; Chapter 8: Where to Go from Here; What we have learned so far; Integration tests; UI tests; Behavior-Driven Development; TDD in existing projects; More information about TDD; Summary; Index