IOS code testing : test-driven development and behavior-driven development with Swift /

Saved in:
Bibliographic Details
Author / Creator:Mishra, Abhishek.
Imprint:[Place of publication not identified] : Apress, 2017.
Description:1 online resource
Language:English
Series:For professionals by professionals
Books for professionals by professionals.
Subject:
Format: E-Resource Book
URL for this record:http://pi.lib.uchicago.edu/1001/cat/bib/11308475
Hidden Bibliographic Details
ISBN:9781484226896
1484226895
9781484226889
1484226887
Digital file characteristics:text file PDF
Summary:Put into motion practical examples to master Test-Driven Development (TDD) and acceptance testing in Swift. This book uses a pragmatic approach to writing well-tested code and provides techniques that can be used to retrofit tests to legacy code bases. You'll be introduced to basic principles of TDD, such as Test First, Red-Green-Refactor, Remove Duplicate code, Dependency Injection, and Single Responsibility. Approaches covered include TDD, behavior-driven development (BDD), UI, and acceptance testing with common standard/open source frameworks. iOS Code Testing offers helpful instruction to teach iOS developers to retrospectively fit tests to legacy code, refactor legacy code so as to make the code more testable, install and configure a popular Swift BDD framework, practice BDD with Xcode, and create automated UI tests with Xcode. Additionally, many projects have legacy code bases. Legacy code is often seen as a blocker when it comes to implementing any kind of testing.
Other form:Print version: 9781484226889 1484226887
Standard no.:10.1007/978-1-4842-2689-6
Table of Contents:
  • At a Glance; Contents; About the Author; About the Technical Reviewer; Acknowledgments; Chapter 1: Introduction to Test-Driven Development; What Is Test-Driven Development?; TDD Terminology; Subject under Test; Unit Test; State Verification Test; Interaction Test; Negative Test; Test Suite; Assertions; Instantiating Classes for Testing; Principles of Test-Driven Development; Test First; Red
  • Green
  • Refactor; Write the Minimum Amount of Code; Remove Duplication; Summary; Note; Chapter 2: Writing Your First Set of Unit Tests with Xcode; Downloading and Installing Xcode.
  • Creating a New Project with Unit Test SupportAdding Support for Unit Tests to an Existing Project; A Tour of Xcode; The Project Navigator; Test Case Classes; The Test Navigator; Viewing Test Reports; Code Coverage Reports; Building the Cookie Factory App; Building the Cookie Class; Building the CookieController Class; Updating the View Controller Class; Viewing Code Coverage Data; Summary; Chapter 3: The MVVM Architectural Pattern; The MVC Architectural Pattern; The Model-ViewController Architectural Pattern; Model-ViewController Testability Issues.
  • The Model-View-ViewModel Architectural PatternAdvantages of MVVM; ViewModel Instantiation; Isolated View Controller; Table View Controllers; Navigation Controller-Based Apps; Summary; Chapter 4: Applying TDD to the Model; Creating the Xcode Project; Building the Model Layer; The AccountOwner Class; Creating the First Name Validator Class; Creating the Last Name Validator Class; Creating the Email Address Validator Class; Integrating the Validator Classes into the AccountOwner Class; The Transaction Class; The BankAccount Class; Testing Core Data; Summary.
  • Chapter 5: Applying TDD to View ControllersApplication Architecture; Creating the Xcode Project; Building the User Interface Layer; Building the Login View Controller Scene; Building the Signup View Controller Scene; Creating a Segue Between the Login Scene and the Signup Scene; Building the Model Layer; The LoginModel Class; The SignupModel Class; Building the ViewModel Layer; The LoginViewModel Class; View Model
  • View Controller Binding; Building the performInitialViewSetup Method; Building the userNameDidEndOnExit Method; Building the passwordDidEndOnExit Method.
  • Building the userNameUpdated MethodBuilding the passwordUpdated Method; Building the Login Method; Creating the Login Controller Class; Creating the Mock Login Controller Class; Updating the LoginViewModel Class; The SignupViewModel Class; Connecting the View Controller to the View Model; Binding the Login View Controller Class to the View Model; Calling the performInitialSetup Method of the View Model from the View Controller; Calling the userNameDidEndOnExit Method of the View Model from the View Controller; Calling the passwordDidEndOnExit Method of the View Model from the View Controller.