Member-only story

Automate an iOS Tic Tac Toe app with Appium 2 (XCUITest) Part 1: Player vs Player

How to use Appium 2 to automate playing Tic Tac Toe

Zhimin Zhan
7 min readFeb 19, 2023

A repost of my daughter’s article, I added a few notes. This is also included in the “Courtney’s Appium Series”.

In this article, I’ll show you how to automate Nathan Fallet and Group MINASTE’s Tic Tac Toe iOS app with Appium 2.

Table of Contents:
· Setup
Install Appium 2 and the XCUITest Driver
Build the Tic Tac Toe app
·
Get Started
How to Play Tic Tac Toe
·
Play Tic Tac Toe with Appium
Execution Video
Test Design
Refactoring
·
Complete Test Scripts
·
Zhimin’s notes

Setup

Install Appium 2 and the XCUITest Driver

Follow the steps in my other article to install the Appium 2 server, the XCUITest Driver and your desired Appium Client library (I prefer Ruby).

A basic summary of the setup (for macOS) is as follows:

# Install Node.js
brew install node@18

# Install Appium 2
npm install -g appium@next

# Install XCUITest Driver
appium driver install xcuitest

# Run this in a separate window to start up the Appium server
appium

# Install Ruby's Appium client library
gem install --no-document appium_lib

Note that there are some security permissions that may need to be granted. See the article for detailed step-by-step instructions as well as a simple script to verify the setup.

Build the Tic Tac Toe app

In this exercise, I will run a Tic Tac Toe app on the iOS simulator, using the open-source tic tac toe app I found on Github by Group MINASTE. By the way…

Zhimin Zhan
Zhimin Zhan

Written by Zhimin Zhan

Test automation & CT coach, author, speaker and award-winning software developer. Help teams succeed with Agile/DevOps by implementing real Continuous Testing.

No responses yet

Write a response