Skip to main content
Apress
Book cover

Modularizing Legacy Projects Using TDD

Test-Driven Development with XCTest for iOS

  • Book
  • © 2021

Overview

  • Write tests to ensure thread safety
  • Modularize legacy projects by example
  • Understand the different types of testing—unit, integration, and end-to-end tests

This is a preview of subscription content, log in via an institution to check access.

Access this book

eBook USD 34.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book USD 44.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Other ways to access

Licence this eBook for your library

Institutional subscriptions

Table of contents (12 chapters)

Keywords

About this book

Improve current or new projects with top notch testability and maintainability. Writing tests improves the design of your apps, as it pushes you to have a more modularized design. This in turn improves the maintainability and sustainability of your apps. This book is for iOS developers who already know the basics of iOS and Swift development but want to learn all the testing pro features in iOS.

You'll start by reviewing the TDD Cycle and how to implement these concepts on a legacy project or a new one. You'll then walk through TDD step-by-step on a blank project, including setting up test targets, assertions, and expectations. You'll follow that with all levels of testing such as unit tests, integration tests, and end-to-end tests, and also tackle fairly complex, yet badly written legacy code. 

The book will take you through the journey of modularizing a legacy app using TDD. Throughout this journey, you will be introduced to multiple testingconcepts and techniques, like writing tests for network and core data layers. You will write tests to ensure the thread safety of your app. And you’ll add a new feature while you are in the middle of refactoring, which is an important skill so you can keep adding features while you are fixing your technical debt. By the end of this book, you will have all the tools needed to become a testing master.


What You'll Learn
  • Use mocking and dependency injection to make components more testable 
  • Write tests for asynchronous code like network code 
  • Add new features to existing legacy apps using TDD



Who This Book Is For


Experienced iOS developers who care about software quality and meeting customer expectations.

Authors and Affiliations

  • Giza, Egypt

    Khaled El-Morabea

  • Cairo, Egypt

    Hassaan El-Garem

About the authors

Khaled El-Morabea

Khaled is an engineering manager at Instabug. He has been an iOS developer for more than 8 years and leading the iOS team for more than 3 years. In that time he has worked on several projects. During his time at Instabug, he has worked on multiple integral products, both as a developer and as a strategic engineering manager.

Hassaan El-Garem Hassaan has been involved in the field of iOS Development for 5 years, during which he worked on multiple apps and projects. He has a passion for testing and for working on complex projects, while maintaining the highest level of quality. Following his passion for testing has led him to create a closed-source testing framework used for randomized stress testing.


Bibliographic Information

  • Book Title: Modularizing Legacy Projects Using TDD

  • Book Subtitle: Test-Driven Development with XCTest for iOS

  • Authors: Khaled El-Morabea, Hassaan El-Garem

  • DOI: https://doi.org/10.1007/978-1-4842-7428-6

  • Publisher: Apress Berkeley, CA

  • eBook Packages: Professional and Applied Computing, Apress Access Books, Professional and Applied Computing (R0)

  • Copyright Information: Khaled El-Morabea and Hassaan El-Garem 2021

  • Softcover ISBN: 978-1-4842-7427-9Published: 26 October 2021

  • eBook ISBN: 978-1-4842-7428-6Published: 25 October 2021

  • Edition Number: 1

  • Number of Pages: XVII, 335

  • Number of Illustrations: 144 b/w illustrations

  • Topics: Apple and iOS

Publish with us