万本电子书0元读

万本电子书0元读

顶部广告

Test-Driven iOS Development with Swift电子书

售       价:¥

67人正在读 | 0人评论 9.8

作       者:Dr. Dominik Hauser

出  版  社:Packt Publishing

出版时间:2016-02-22

字       数:125.4万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:此类商品不支持退换货,不支持下载打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Create fully-featured and highly functional iOS apps by writing tests firstAbout This BookLearn test-driven principles to help you build apps with fewer bugs and better designsBecome 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 workflowWho This Book Is ForIf 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 LearnImplement TDD in swift application developmentGet to know the fundamentals, life cycle, and benefits of TDDExplore the tools and frameworks to effectively use TDDDevelop models and controllers driven by testsConstruct the network layer using stubsUse functional tests to ensure the app works as plannedAutomate and streamline the building, analysing, testing, and archiving of your iOS appsIn DetailTest-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 approachThis 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.
目录展开

Test-Driven iOS Development with Swift

Table of Contents

Test-Driven iOS Development with Swift

Credits

About the Author

About the Reviewer

www.PacktPub.com

Support files, eBooks, discount offers, and more

Why subscribe?

Free access for Packt account holders

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Downloading the color images of this book

Errata

Piracy

Questions

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 tests

Running one specific test

Running all tests in a test case

Running a group of tests

The 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

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

3. A Test-Driven Data Model

Implementing 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

4. A Test-Driven View Controller

Implementing ItemListViewController

Implementing ItemListDataProvider

Conducting the first tests

Fake objects

Using mocks

Checking and unchecking items

Implementing ItemCell

Implementing DetailViewController

Implementing InputViewController

Summary

5. Testing Network Code

Implementing asynchronous tests

Implementing a login request to a web service

Handling errors

Summary

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

7. Code Coverage and Continuous Integration

Enabling code coverage

Code coverage in Xcode

What code coverage is enough?

Continuous integration

Installing and setting up Xcode Server

Adding bots

Automatic deployment with fastlane

Installing fastlane

Setting up

Summary

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

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部