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

Saved in:
Bibliographic Details
Author / Creator:Hauser, Dominik, author.
Imprint:Birmingham, UK : Packt Publishing, 2016.
Description:1 online resource (1 volume) : illustrations.
Language:English
Series:Community experience distilled
Community experience distilled.
Subject:
Format: E-Resource Book
URL for this record:http://pi.lib.uchicago.edu/1001/cat/bib/11755985
Hidden Bibliographic Details
ISBN:9781785880049
1785880047
9781787125032
1787125033
9781785880735
178588073X
Notes:Includes index.
Description based on online resource; title from cover page (Safari, viewed March 11, 2016).
Summary: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 the principles of test-driven development (TDD) in to your daily programming workflow Who This Book Is For If debugging iOS apps is a nerve-racking task for you and you are looking for a fix, this book is for you. What You Will Learn Implement TDD in swift application development Get to know the fundamentals, life cycle, and benefits of TDD Explore the tools and frameworks to effectively use TDD Develop models and controllers driven by tests Construct the network layer using stubs Use functional tests to ensure the app works as planned Automate and streamline the building, analysing, testing, and archiving of your iOS apps In Detail Test-driven development (TDD) is a proven way to find software bugs early. Writing tests before your code improves the structure and maintainability of your app. Test-driven iOS Development with Swift will help you understand the process of TDD and how it impacts your applications written in Swift. Through practical, real-world examples, you'll start seeing how to implement TDD in context. We will begin with an overview of your TDD workflow and then deep-dive into unit testing concepts and code cycles. We will showcase the workings of functional tests, which will help you improve the user interface. Finally, you will learn about automating deployments and continuous integration to run an environment. Style and approach This is an easy-to-follow example-driven tutorial, packed with lots of tips and tricks that explore TDD bit-by-bit in the process of making an iOS application.
Table of Contents:
  • 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