Skip to main content
  • Book
  • © 2017

iOS Code Testing

Test-Driven Development and Behavior-Driven Development with Swift

Apress

Authors:

  • Design with test-driven development techniques

  • Refactor legacy code to make the code more testable

  • Create automated UI tests with Xcode

Buy it now

Buying options

eBook USD 44.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book USD 59.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

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

Table of contents (13 chapters)

  1. Front Matter

    Pages i-xix
  2. Introduction to Test-Driven Development

    • Abhishek Mishra
    Pages 1-11
  3. The MVVM Architectural Pattern

    • Abhishek Mishra
    Pages 43-60
  4. Applying TDD to the Model

    • Abhishek Mishra
    Pages 61-99
  5. Applying TDD to View Controllers

    • Abhishek Mishra
    Pages 101-160
  6. Applying TDD to Collection View Controllers

    • Abhishek Mishra
    Pages 161-209
  7. Testing URLSession

    • Abhishek Mishra
    Pages 211-256
  8. Working with Legacy Code

    • Abhishek Mishra
    Pages 257-282
  9. Continuous Integration

    • Abhishek Mishra
    Pages 283-316
  10. Introduction to Behavior-Driven Development

    • Abhishek Mishra
    Pages 317-327
  11. Installing Quick

    • Abhishek Mishra
    Pages 329-349
  12. Applying TDD and BDD Techniques

    • Abhishek Mishra
    Pages 351-405
  13. Testing the User Interface

    • Abhishek Mishra
    Pages 407-432
  14. Back Matter

    Pages 433-440

About this book

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 Learn
  • Fit test to legacy code retrospectively
  • Install and configure popular Swift BDD frameworks
  • Practice BDD with Xcode

Who This Book Is For


Software practitioners, such as Swift developers and mobile app testers.



Authors and Affiliations

  • Milton Keynes, United Kingdom

    Abhishek Mishra

About the author

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.

Bibliographic Information

Buy it now

Buying options

eBook USD 44.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book USD 59.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