Tag: testing
-
In Search of Test Discovery Solutions in iOS
Introduction Five years ago, I wrote a blog post about extracting test methods before runtime in iOS. This falls under a broader category of test discovery - the process of identifying test cases in a codebase. While test discovery is relatively straightforward in scripting languages, it is more challenging in iOS and other statically typed languages. For a Swift package project, this can be done with the swift test list command.
-
Swift Testing and the Compatibility With xcodebuild
Introduction Swift Testing is a new test framework introduced by Apple at WWDC 2024. It offers a range of macro-based features, making test writing more expressive. One of the key features driving migration from XCTest to Swift Testing is parameterized testing. While this concept has been widely available in other languages (ex. pytest introduced it in 2011), Swift Testing now enables repeated test execution with different inputs and expected outputs.
-
WebDriverAgent - The Heart of iOS E2E Testing
In the previous post, we explored the overview of E2E testing in mobile development. Today, we’re going to dive deeper into how E2E testing with Appium works on iOS. 1. Introduction to WebDriverAgent (WDA) 1.1. Running Your First Test With Appium Here’s a simple code snippet to start your tests. For simplicity, we’ll run tests on simulators.
-
Overview of Mobile E2E Testing
1. Introduction End-to-end (E2E) testing is a software testing strategy that verifies the system integration from start to finish, including apps, backend services, and other related components; to ensure everything functions as expected altogether. Compared to unit tests, E2E tests are often fewer in number due to their complexity and maintenance costs. This type of testing is even more uncommon in mobile development where special setups are often required. This blog post aims to provide a quick overview of mobile E2E testing and some opinionated architecture suggestions for incorporating E2E testing into your engineering process.
-
How to stub network in iOS
There are times we wish to fake a network event, for example, a network error. However, integrating a 3rd party stub library just for this purpose is not really worthy. This post aims at demonstrating how to stub network.