Test-Driven iOS Development with Swift 4 - Third Edition

Use test-driven approach to develop highly-functional iOS apps with Swift 4 and Xcode 9
Preview in Mapt

Test-Driven iOS Development with Swift 4 - Third Edition

Dr. Dominik Hauser

4 customer reviews
Use test-driven approach to develop highly-functional iOS apps with Swift 4 and Xcode 9

Quick links: > What will you learn?> Table of content> Product reviews

Mapt Subscription
FREE
$29.99/m after trial
eBook
$22.40
RRP $31.99
Save 29%
Print + eBook
$39.99
RRP $39.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$22.40
$39.99
$29.99 p/m after trial
RRP $31.99
RRP $39.99
Subscription
eBook
Print + eBook
Start 14 Day Trial

Frequently bought together


Test-Driven iOS Development with Swift 4 - Third Edition Book Cover
Test-Driven iOS Development with Swift 4 - Third Edition
$ 31.99
$ 22.40
Mastering Swift 4 - Fourth Edition Book Cover
Mastering Swift 4 - Fourth Edition
$ 35.99
$ 25.20
Buy 2 for $35.00
Save $32.98
Add to Cart

Book Details

ISBN 139781788475709
Paperback222 pages

Book Description

Test-driven development (TDD) is a proven way to find software bugs early. Writing tests before you code improves the structure and maintainability of your apps. Using TDD, in combination with Swift 4's improved syntax, means there is no longer any excuse for writing bad code.

This book will help you understand the process of TDD and how to apply it to your apps written in Swift.

Through practical, real-world examples, you’ll learn how to implement TDD in context. You will begin with an overview of the TDD workflow and then delve into unit-testing concepts and code cycles.

You will also plan and structure your test-driven iOS app, and write tests to drive the development of view controllers and helper classes. Next, you’ll learn how to write tests for network code and explore how the test-driven approach—in combination with stubs—helps you write network code even before the backend component is finished.

Finally, the book will guide you through the next steps to becoming a testing expert by discussing integration tests, Behavior Driven Development (BDD), open source testing frameworks, and UI Tests (introduced in Xcode 9).

Table of Contents

Chapter 1: Your First Unit Tests
Building your first automatic unit test
Understanding TDD
TDD in Xcode
The advantages of TDD
The disadvantages of TDD
What to test
Summary
Chapter 2: Planning and Structuring Your Test-Driven iOS App
The task list view
The task detail view
The task input view
The structure of the app
Getting started with Xcode
Setting up useful Xcode behaviors for testing
Summary
Chapter 3: A Test-Driven Data Model
Implementing the ToDoItem struct
Implementing the Location struct
Implementing the ItemManager class
Summary
Chapter 4: A Test-Driven View Controller
Implementing ItemListViewController
Implementing ItemListDataProvider
Implementing DetailViewController
Implementing InputViewController
Summary
Chapter 5: Testing Network Code
Implementing tests using a web service
Implementing a login request
Handling errors
Summary
Chapter 6: Putting It All Together
Connecting parts
Serialization and deserialization
Functional tests
Summary
Chapter 7: Code Coverage
Enabling code coverage
Automatic deployment with fastlane
Summary
Chapter 8: Where to Go from Here
What you have learned so far
Integration tests
UI tests
Behavior-Driven Development
TDD in existing projects
Generating mocks with Sourcery
More information about TDD
Summary

What You Will Learn

  • Implement TDD in Swift application development
  • Find bugs before you enter code using the TDD approach
  • Use TDD to build models, view controllers, and views
  • Test network code with asynchronous tests and stubs
  • Write code that is a joy to read and maintain
  • Develop functional tests to ensure the app works as planned

Authors

Table of Contents

Chapter 1: Your First Unit Tests
Building your first automatic unit test
Understanding TDD
TDD in Xcode
The advantages of TDD
The disadvantages of TDD
What to test
Summary
Chapter 2: Planning and Structuring Your Test-Driven iOS App
The task list view
The task detail view
The task input view
The structure of the app
Getting started with Xcode
Setting up useful Xcode behaviors for testing
Summary
Chapter 3: A Test-Driven Data Model
Implementing the ToDoItem struct
Implementing the Location struct
Implementing the ItemManager class
Summary
Chapter 4: A Test-Driven View Controller
Implementing ItemListViewController
Implementing ItemListDataProvider
Implementing DetailViewController
Implementing InputViewController
Summary
Chapter 5: Testing Network Code
Implementing tests using a web service
Implementing a login request
Handling errors
Summary
Chapter 6: Putting It All Together
Connecting parts
Serialization and deserialization
Functional tests
Summary
Chapter 7: Code Coverage
Enabling code coverage
Automatic deployment with fastlane
Summary
Chapter 8: Where to Go from Here
What you have learned so far
Integration tests
UI tests
Behavior-Driven Development
TDD in existing projects
Generating mocks with Sourcery
More information about TDD
Summary

Book Details

ISBN 139781788475709
Paperback222 pages
Read More
From 4 reviews

Read More Reviews

Recommended for You

Mastering Swift 4 - Fourth Edition Book Cover
Mastering Swift 4 - Fourth Edition
$ 35.99
$ 25.20
Understanding Software Book Cover
Understanding Software
$ 23.99
$ 16.80
Machine Learning: End-to-End guide for Java developers Book Cover
Machine Learning: End-to-End guide for Java developers
$ 75.99
$ 53.20
Switching to Angular - Third Edition Book Cover
Switching to Angular - Third Edition
$ 23.99
$ 16.80
Mastering Unity 2017 Game Development with C# - Second Edition Book Cover
Mastering Unity 2017 Game Development with C# - Second Edition
$ 39.99
$ 28.00
Test-Driven iOS Development with Swift 3 Book Cover
Test-Driven iOS Development with Swift 3
$ 31.99
$ 22.40