A few weeks ago, we released an update to our Networking with URLSession course, which brings everything in our Getting Started with iOS category up to date for iOS 11, Swift 4, and Xcode 9. If you’re ready to move on, and learn about how to automate the process of ensuring your apps are functioning as expected, Testing in iOS is for you!
In this 28-video course, you’ll get started writing basic unit tests, and then pick up some more advanced techniques. You’ll also explore UI testing to test your app’s user interface. And of course, this course uses the latest version of Swift, iOS, and Xcode as well!
Let’s have a look at what’s inside.
Part 1: Unit Testing Basics
In this first part, you’ll learn about the structure of unit tests, and strategies for writing and refactoring your tests.
This section contains 11 videos:
- Introduction: In this video, you’ll get an overview of what will be covered in this first section and why testing is important.
- Getting Started: Learn the basics of adding unit tests to an already existing project.
- Importing Modules: Often times, unit tests need to access code from other modules. Learn how to do this using @testable.
- Test Case Structure: This video covers the structure of unit tests and what is expected when you write them.
- Running Your First Test: At long last, it’s time to run your first test. Like with all things with Xcode, there are many way to do this.
- Challenge: Writing Your First Test: Now that you have experience writing a unit test, go ahead and try writing another one.
- Fixing Your Second Test: Writing unit tests often means fixing unit tests. This video will walk you through the process.
- Red Green Refactor: There are many strategies for writing unit tests and one of them is called “Red/Green/Refactor”. This video walks you through it.
- Challenge: Write Red Green Refactor Test: Your challenge is to write another unit test but this time, adhering to the Red Green Refactor method.
- Optimizing Tests: Tests can get messy. In this video, you’ll do a little clean up to make your tests cleaner and understandable.
- Conclusion: This reviews what it means to write unit tests and reviews some essential strategies.
Part 2: Advanced Unit Testing Techniques
In part 2, you’ll pick up some more advanced techniques, including testing asynchronous methods, using mock objects, and testing performance.
This section contains 9 videos:
- Introduction: This video gives you an overview of some of the advanced techniques that you’ll be learning in this section.
- Asynchronous Testing This video covers some strategies when testing methods that return results over an indeterminate time.
- XCTWaiter and Expectations: The XCTWaiter and expectations allow you to wait for a result in your unit tests.
- Challenge: Adding XCTWaiter: In this challenge, you’ll add an XCTWaiter to your unit test.
- Mocking: This video explores relationships that you can establish between objects.
- Mocking Tests Writing tests for your mock objects takes a little bit of reworking. This video walks you through the process.
- Code Coverage: Knowing what is tested and what is not, is as important as writing the tests. Thankfully, Xcode provides code coverage reports.
- Performance Testing: Sometimes you’ll want to test how well a method preforms and for that, you use a special unit test: a performance test.
- Conclusion: This video reviews the section and reminds you about some strategies to keep in mind.
Part 3: UI Testing
In the final part of this course, learn how to test your app’s user interface with UI testing.
This section contains 8 videos:
- Introduction: UI tests allow you to test the user interface of your iOS app. Xcode allows you to autmate the process.
- Recording a UI Test Thankfully creating a UI test is as simple as clicking a button and recording your actions.
- Refactoring Your UI Test: This video covers how to take recorded UI actions and convert them into bonafide UI tests.
- Challenge: Write Your Own UI Test: Now that you have an idea on how to write UI tests, your challenge is to write one on your own.
- Queries: Queries are used to fetch items like navigation bar and buttons. This video covers the process of how it works.
- Multidevice UI Testing Some UI tests on iPhones won’t work on iPads. This video gives you strategies for dealing with the issue.
- Challenge: About Screen Test: Your next challenge is to write a test for the about screen view controller.
- Conclusion: This video concludes the series and gives you some things to think about in your future testing.
Where To Go From Here?
The rest of the course is for raywenderlich.com subscribers only. Here’s how you can get access:
- If you are a raywenderlich.com subscriber: The first part of the course is ready for your today! The rest of the course will be released next week. You can check out the course here.
- If you are not a subscriber yet: What are you waiting for? Subscribe now to get access to our updated Testing in iOS course and our entire catalog of over 500 videos.
Stay tuned for more new and updated iOS 11 courses to come. I hope you enjoy the course! :]