Asynchronous iOS Testing in Swift with XCWaiter

Automation, iOSDev
Apple recently announced Swift 3.1 development snapshot  and XCode 8.3 for the developers. There are couple of handy classes added to the XCTest framework to enable Asynchronous Testing for iOS and macOS applications. In this post, we will see how we can perform asynchronous testing using XCWaiter. Swift 3.1-Dev Newly added classes are available in Xcode 8.3 which is currently available for the download if you have Apple Developer Account. You can get it from the Downloads section of the developer account. Xcode 8.3 needs macOS version 10.12 and above. You can download compressed XIP file which is around 4.52 GB.  If you already have previous version of the Xcode then remove it or you can keep it but you have to switch between Xcode DEVLOPER_DIR. Once downloaded you can extract the file to install…
Read More

Swift Dependency Management for iOS

iOSDev
Dependency/Package Manager Most modern languages come with an official solution for code distribution. In today's world of modern mobile development, it is essential to re-use the code already written by developers. Code reuse can be achieved by creating and distributing the packages from central repository. A package manager is a tool that simplifies the process of working with code from multiple sources. Typical Package Manager should have ability to do following things Centralised hosting of packages and source code with public server with access to developers or contributors Download the source code at the run time, so that we don't need to include it in the repository. Link the source code to our working repository by including source files. Allow packages to be versioned The examples of popular package managers are RubyGems for Ruby , Composer for…
Read More
Beginers Guide to iOS Continuous Integration with Xcode Server

Beginers Guide to iOS Continuous Integration with Xcode Server

iOSDev
Apple has very comprehensive documentation on Xcode Server and Continuous Integration with OSX Server (app) and Xcode Server (Xcode within the server app). You might be wondering what's the point of this post if everything is documented in the guide. However Apple's guide still reads as OSX Server than macOS Server but Apple has released new macOS Server (5.2) with some improvements in the Automated Xcode Builds. Anyway this is small tutorial aims to setup a Mac to run as a macOS Server with Xcode Service and Setup basic Xcode Bots for the macOS Server with Xcode 8 to perform Continuous Integration. We will cover macOS Server basics and setup Configure Xcode to use Xcode Service of macOS Server Setup Development Xcode to use Xcode Server on macOS Server Create a Xcode bot with example of XCFit Swift Package on Github Run Bot Integrations and Analyse Results Requirements…
Read More
Stabilizing the CI By Re-runing Flaky iOS XCUI Tests

Stabilizing the CI By Re-runing Flaky iOS XCUI Tests

Automation, DevOps, iOSDev
Apple has released Xcode UI Testing a.k.a XCUI Test framework at WWDC 2015 which enable UI testing of iOS application straight from Xcode without any third party tools like Appium, Calabash or KIF.  These tools that call themselves mobile testing frameworks but they're actually little more than wrappers to UIAutomation or Instruments.  The release of iOS 10 has broken all these open-source mobile test automation frameworks as Apple stopped supporting Instruments technology. The only options remained was to use XCTest framework from Apple or wait for those tools to build a wrapper around XCUITest.  XCTest is not a new framework but it has evolved quite well with Xcode releases. You can read more about Pros and Cons of using XCTest for iOS app testing here XCUITest + Continuous Integration Problem XCUITest framework is still new and…
Read More

Pros and Cons of using Xcode Server for iOS Continuous Integration

Automation, DevOps, iOSDev
Continuous Integration a.k.a. CI is an integral part of iOS development process which gives early feedback when something breaks during application development. In an agile application development, producing working app is not only writing good code but also setting up infrastructure to deliver it continuously. The process of Continuous Integration and automating the build can help to achieve continuous delivery.  There are various continuous integration tools available in the market which can be used in the iOS team. The CI server solution can be self hosted or cloud. You can get whole list of CI servers here with recommendations. In the iOS development we have few challenging options while selecting self hosted CI server Xcode Server Jenkins TeamCity If you are looking for cloud solutions then there are some promising services like…
Read More
Adding Homebrew Support to XCFit Framework

Adding Homebrew Support to XCFit Framework

Automation, BDD, iOSDev
Glad to announce that XCFit is available to download from Homebrew package manager. XCFit  a.k.a (XCUI, Cucumberish and Fitnesse Integrations Tests) is a full stack Xcode BDD framework for Swift iOS apps. XCFit creates automated Xcode templates which helps us to setup BDD style tests within Xcode. You can read more about XCFit on my previous post or articles published on DZone here . Homebrew Just in case, if you have not heard of Homebrew, it's package manager fro macOS. We can install almost everything using Homebrew including macOS free apps. Homebrew can be installed on any macOS using a command. [crayon-58a9860aedc57429746003/] Now that, we are ready to use Homebrew. We can install package as core Homebrew or using HomeBrew caskroom like this [crayon-58a9860aedc66810710374/] e.g We can install 'Google Chrome" using following command. [crayon-58a9860aedc6f771389832/] Now , we will see how to…
Read More
Continuous Integration with Xcode Server on macOS: Complete Setup Guide

Continuous Integration with Xcode Server on macOS: Complete Setup Guide

Automation, DevOps, iOSDev
Apple has very comprehensive documentation on Xcode Server and Continuous Integration with OSX Server (app) and Xcode Server (Xcode within the server app). You might be wondering what's the point of this post if everything is documented in the guide. However Apple's guide still reads as OSX Server than macOS Server but Apple has released new macOS Server (5.2) with some improvements in the Automated Xcode Builds. Anyway this is small tutorial aims to setup a Mac to run as a macOS Server with Xcode Service and Setup basic Xcode Bots for the macOS Server with Xcode 8 to perform Continuous Integration. We will cover macOS Server basics and setup Configure Xcode to use Xcode Service of macOS Server Setup Development Xcode to use Xcode Server on macOS Server Create a Xcode bot with example of…
Read More
Apple Swift Package Manager : A Deep Dive

Apple Swift Package Manager : A Deep Dive

Automation, DevOps, iOSDev
Apple has released it's own package manager called 'Swift Package Manager' to share and distribute Swift packages. It's good to know that Apple is working on replacement of the current loved and hated package managers in the iOS development world those are CocoaPods and Carthage. In this article, we will cover basics of package management & deep dive into package management in iOS especially Swift Package Manager. Current iOS Package Managers Most modern languages come with an official solution for code distribution e.g RubyGems for Ruby,  Composer for PHP , NPM for NodeJS. In the iOS development world, developers has to rely on third party dependency management tools like CocoaPods and Carthage. The package managers in iOS has a additional job of building the code on top of downloading. Package manager should able to download as…
Read More
XCFit 2.0 Released : Full Stack BDD in Xcode + Page Object + Swift Package Manager

XCFit 2.0 Released : Full Stack BDD in Xcode + Page Object + Swift Package Manager

Automation, iOSDev
XCFit 2.0 Glad to announce new version of XCFit with brand new features. You can find release notes on Github here. If you are new to XCFit then XCFit a.k.a (XCUI, Cucumberish and Fitnesse Integrations Tests) is a full stack Xcode BDD framework for Swift iOS and macOS apps. XCFit allows us to write API level, UI and Acceptance Tests with Swift in human readable language using tools like Cucumber and Fitnesse in Xcode. We can still use Apple's brand new UI Testing framework (XCUI) under the hood of Cucumberish. XCFit is fully automated solution for Cucumberish and Fitnesse. You can use 80(Fitnesse):20(Cucumberish) formula to automate Acceptance and UI Testing for better coverage and faster feedback. XCFit is available on RubyGem,  CocoaPods and Swift Package Manager. XCFit 2.0 has just released ! XCFit 2.0 New Features Improved Xcode Templates with support of Page…
Read More

Swift 3 : Basic concepts with Xcode 8

Automation, iOSDev
Swift3 at WWDC Apple has announced Swift3 on WWDC [2016] this year. It's amazing that Swift can be used on Linux and lots of third party companies working on server side swift. First couple of releases of Swift has gone though major changes in the Swift but Apple has promised that Swift 3 will be stale release and can be adopted by companies without any fear. Apple has also provided migrator for the Swift2 to Swift3 which makes migration easy.  In this tutorial, we will learn basics of Swift announced at the WWDC 'Getting Started with Swift" talk. I would strongly recommend watching this talk. Let's look at what's new in the swift with basic concepts. Please note this isn't tutorial to learn all Swift but to get brief overview…
Read More