iOS Code Testing (eBook)
XIX, 440 Seiten
Apress (Verlag)
978-1-4842-2689-6 (ISBN)
- Fit test to legacy code retrospectively
- Install and configure popular Swift BDD frameworks
- Practice BDD with Xcode
Abhishek Mishra has been developing software for over 12 years and has experience with a diverse set of programming languages and platforms. He holds a Masters degree in Computer Science from the University of London and is a freelance consultant and trainer specializing in iOS development. He is the author of Swift iOS: 24-Hour Trainer and iPhone & iPad App: 24-Hour Trainer. He was also the technical editor on Professional iOS Programming.
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. What You Will LearnFit test to legacy code retrospectivelyInstall and configure popular Swift BDD frameworksPractice BDD with XcodeWho This Book Is ForSoftware practitioners, such as Swift developers and mobile app testers.
Abhishek Mishra has been developing software for over 12 years and has experience with a diverse set of programming languages and platforms. He holds a Masters degree in Computer Science from the University of London and is a freelance consultant and trainer specializing in iOS development. He is the author of Swift iOS: 24-Hour Trainer and iPhone & iPad App: 24-Hour Trainer. He was also the technical editor on Professional iOS Programming.
Chapter 1 title: Introduction to Test-Driven Development- What is Test Driven Development- Key Principles of Test Driven Development-------- Test First-------- Red – Green – Refactor-------- Remove Duplication- Architectural Patterns-------- Dependency Injection-------- Single Responsibility- Swift Mocking and Stubbing TechniquesChapter 2 title: Writing your first set of Unit Tests.- Download and Install Xcode- Introducing the CookieMonster Project- Creating the Xcode project.- Creating the CookieModel Object- Creating the CookieBuilder Object- Displaying Results in the Xcode Console- Architectural Patterns-------- The Builder PatternChapter 3 title: Introducing the MVVM pattern- Apple’s Model-View-Controller Implementation- Microsoft’s MV-VM Pattern.- Challenges Implementing MV-VM in iOS Applications.-------- Using Protocols to create Bindings.-------- Using RxSwift to create Bindings.Chapter 4 title: Applying TDD techniques to the data model.- Why Test The Model- Building The Bank Account Class Using TDD Techniques- Building the Transaction Class Using TDD Techniques- Adding Support For Account Balance in The Bank Account Class- Testing a CoreData Model ClassChapter 5 title: Testing View Controllers- Introducing the LoginScreen project- Creating a Local Stub Server- Creating the View Controller Using Test-Driven Techniques- Creating the View Model Using TDD Techniques- Creating the Model Using TDD TechniquesChapter 6 title: Testing Collection Views- The MVVM Architecture for Collection Views- Building Model Objects- Building the Cell View Model- Building the CollectionView View Model- Building the ColllectionViewCell - Building the CollectionViewChapter 7 title: Testing NSURLSessionIntroducing the RestaurantList AppOverview of the RESTful APICreating Model ObjectsCreating The Service ManagerMocking NSURLSessionChapter 8 title: Testing Legacy code- The Problem of Untested Legacy Code- Adding Functionality To An Existing Legacy Class--- Sprouts--- Wrappers--- Decorators- Dealing With a Large Class--- Single Responsibility- Dependency Breaking Techniques--- Extracting Protocols--- Preserve Signatures--- Replace Concrete Method Parameters With Protocols--- Dependency InjectionChapter 9 title: Continuious Integration- Download and Install Mac OSX Server- Configure the Xcode Build Server- Client-side XCode changes - Integrating a Bot- Deploying an Integration to a Provisioned Device.Chapter 10 title: Introduction to BDD- What is Behaviour Driven Development- Advantages and Disadvantages of BDD- Testing Code vs Testing Behaviour- Turning Business Requirements to Testable Scenarios- Patterns and Anti-Patterns- UI vs Non-UI Acceptance TestsChapter 11 title: Installing Quick- Installing Quick with Cocoapods- Installing Quick with Carthage- Configuring Your Xcode Project- Using Nimble for Assertions.Chapter 12 title: Applying BDD and TDD techniques -Reviewing The Business Requirements for The Project-Defining The Features and User Stories-Writing Down the Test Scenarios-Creating the Xcode Project-Creating BDD Test Cases with Quick-Implementing the RestaurantSearch View Controller-Implementing the RestaurantList View Controller-Implementing the Service Manager-Satisfying the Acceptance Criteria.Chapter 13 title: Testng the UI- Adding Support for UI Testing to Your Project- Key Parts of a UI Test Case- Key Classes- Assertions- UI Test Recording- Waiting For Elements
Erscheint lt. Verlag | 30.6.2017 |
---|---|
Zusatzinfo | XIX, 440 p. 199 illus., 185 illus. in color. |
Verlagsort | Berkeley |
Sprache | englisch |
Themenwelt | Informatik ► Programmiersprachen / -werkzeuge ► Mac / Cocoa Programmierung |
Informatik ► Software Entwicklung ► Mobile- / App-Entwicklung | |
Informatik ► Software Entwicklung ► Qualität / Testen | |
Informatik ► Weitere Themen ► Smartphones / Tablets | |
Schlagworte | Behavior-Driven Development • Code testing • Engineering • Ios • Mac • programming • Software • SWIFT • Test-Driven Development • Xcode |
ISBN-10 | 1-4842-2689-5 / 1484226895 |
ISBN-13 | 978-1-4842-2689-6 / 9781484226896 |
Haben Sie eine Frage zum Produkt? |
Größe: 11,8 MB
DRM: Digitales Wasserzeichen
Dieses eBook enthält ein digitales Wasserzeichen und ist damit für Sie personalisiert. Bei einer missbräuchlichen Weitergabe des eBooks an Dritte ist eine Rückverfolgung an die Quelle möglich.
Dateiformat: PDF (Portable Document Format)
Mit einem festen Seitenlayout eignet sich die PDF besonders für Fachbücher mit Spalten, Tabellen und Abbildungen. Eine PDF kann auf fast allen Geräten angezeigt werden, ist aber für kleine Displays (Smartphone, eReader) nur eingeschränkt geeignet.
Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen dafür einen PDF-Viewer - z.B. den Adobe Reader oder Adobe Digital Editions.
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen dafür einen PDF-Viewer - z.B. die kostenlose Adobe Digital Editions-App.
Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.
aus dem Bereich