You are on page 1of 10

Tool Support for Testing Complex Multi-Touch Gestures

Shahedul Huq Khandkar, S. M. Sohan, Jonathan Sillito and Frank Maurer


Department of Computer Science
University of Calgary, Canada
{s.h.khandkar, smsohan, sillito, frank.maurer}@ucalgary.ca

ABSTRACT specific gestures (e.g. [3]). Gesture recognition code can


Though many tabletop applications allow users to interact be complex and difficult to correctly implement [4]. As a
with the application using complex multi-touch gestures, au- step toward improving tool support for automating testing
tomated tool support for testing such gestures is limited. As a that involves gesture recognition code, we have developed a
result, gesture-based interactions with an application are of- framework called TouchToolkit. TouchToolkit is a hardware
ten tested manually, which is an expensive and error prone abstracted gesture recognition tool with a test automation
process. In this paper, we present TouchToolkit, a tool de- component. This proof of concept tool can automate the
signed to help developers automate their testing of gestures testing of complex multi-touch gesture recognition. When
by incorporating recorded gestures into unit tests. The design using this tool, developers can record complex multi-touch
of TouchToolkit was informed by a small interview study gestures that can be used as part of unit tests.
conducted to explore the challenges software developers face
when debugging and testing tabletop applications. We have The design of the TouchToolkit framework was informed by
also conducted a preliminary evaluation of the tool with en- a small study in which we interviewed tabletop application
couraging results. developers to explore the challenges they face in debugging
and testing of tabletop applications. In this study, we found
ACM Classification: H5.2 [Information interfaces and pre- that developers rely on manual testing for their tabletop in-
sentation]: User Interfaces. - Graphical user interfaces. terfaces because today’s tool support for test automation is
limited. Also, behavioral differences between the actual
General terms: Verification, Design, Economics, Reliabil- hardware and the device simulator forced them to frequently
ity, Standardization. move between their development workstation and a tabletop
computer in order to ensure that the application is working
Keywords: Gestures, Multi-touch, Multi-user, Tabletop, Test-
as expected.
ing, Debugging.
INTRODUCTION
As a preliminary evaluation of the test component of Touch-
Toolkit, we carried out a user study to explore the toolkit’s
Automated software testing is important for developing ro-
usability and applicability. Participants were experienced
bust software applications in a cost-effective manner. An
tabletop application developers in a lab environment and
automated test suite helps with the maintenance of appli-
familiar with unit testing practices. We found that all of
cations by reducing the likelihood that changes introduce
the participants could successfully write automated test code
errors in previously working features of the application. Such
using this toolkit after a demonstration. Our participants
testing is common in the software industry and it is well
also provided encouraging feedback about the record/replay
supported by tools in many domains. However, tool support
approach of TouchToolkit.
for automating the testing of applications that use touch inter-
face remains limited. In particular, applications that involve In reporting this work, this paper makes two key contribu-
complex multi-touch gestures in a multi-user environment tions. First, we present a list of commonly experienced de-
with lots of possible concurrent interactions are difficult to bugging and testing difficulties associated with tabletop ap-
test in a cost effective way. plications. These can be used to inform the tool development.
While recent operating systems and some multi-touch appli- Second, TouchToolkit, demonstrates that record/replay based
cation frameworks provide gesture recognition for a set of testing can be used as a possible paradigm for automating
common gestures, developers of tabletop applications often aspects of tabletop interface testing.
have to write code to recognize and respond to application
The remainder of this paper is organized as follows. We start
by comparing our work to earlier work. Next, we discuss
Permission to make digital or hard copies of all or part of this work for the exploratory study along with our main findings from the
personal or classroom use is granted without fee provided that copies are study. We then discuss the TouchToolkit architecture and
not made or distributed for profit or commercial advantage and that copies how this tool can be used for test automation. Next, we
bear this notice and the full citation on the first page. To copy otherwise, to present a preliminary evaluation of the tool and demonstrate
republish, to post on servers or to redistribute to lists, requires prior specific
permission and/or a fee.
the test framework. Finally, we discuss the limitations and
ITS’10, November 7-10, 2010, Saarbrücken, Germany. future work that is needed before presenting a brief summary
Copyright 2010 ACM 978-1-60558-745-5/09/10...$10.00. of the paper.
RELATED WORK & operating systems. In addition, TouchToolkit provides
TouchToolkit has a hardware abstraction module and a test a gesture definition language [15] to edit existing or define
framework that uses this module. In this section, we compare new gestures whereas most frameworks an operating systems
our work with existing work on hardware independence and (e.g. Windows 7) comes with a fixed set of gestures.
testing of multi-touch applications.
Also, there is tool support to bring limited multi-touch capa-
Hardware Independence bilities to regular computers. For example, Mouse 2.0 [21],
Multi-touch tabletop devices often require developers to write Multi-Mice [19] and Multi-Touch Vista 1 can add the ability
device specific implementations because of the differences to use multiple mice as touch points. Similarly, Johnny Lee’s
in underlying hardware and vendor specific software devel- Wiimote project [18] can turn any regular display into a
opment kits (SDKs). However, one possible way to achieve multi-touch enabled system using Infrared pens. However,
platform independence is through abstracting the communi- using mice or pens to mimic finger touches can only be
cation interface between the actual hardware and the applica- used for a maximum of two active touch points which is
tion. We need this hardware independence to reuse the same significantly less than the available tabletop devices. To
multi-touch tabletop applications across different devices. overcome this limitation, we implemented a record and re-
play feature that can simulate actual multi-touch interactions
Tabletop hardware vendors provide tool support for the de- using a virtual device.
velopment and testing of tabletop applications specific to
their device. For example, Microsoft Surface provides an Testing of Multi-Touch Applications
SDK for developers to simplify the touch-related develop- Interaction designers are not generally domain experts in
ment complexities like managing concurrent touch points, gesture recognition [4]. To simplify the process, there are
touch friendly widgets, components to detect special tags, a number of frameworks and toolkits available for pattern
and the like. Similarly, SMART Technologies provides an and gesture recognition, such as Weka [5] and GT2K [6].
SDK for their multi-touch devices. However, the widgets While these are mostly libraries of techniques, tools are also
and other features provided by these SDKs are not interoper- available for designing gestures such as MAGIC [7] and
able, as a result the applications developed using these SDKs quill [8]. MAGIC uses recorded data as samples and quill
cannot be readily used on other platforms. also uses recorded data for training purpose. In contrast,
TouchToolkit provides a gesture definition language [15] that
Echtler [16] proposed an abstract architecture design and includes multi-touch and multi-step gestures. This allows
an implementation thereof to improve the interoperability the developers to easily test different steps of the gesture
of multi-touch applications among various devices. It has recognition process and edit them as necessary.
an interpretation layer that decouples the hardware specific
inputs from the software application code. Several other DART [11] is a tool that uses the capture/replay concept
projects also provide tool support for abstracting multi-touch to simplify the process of working with augmented real-
interactions. For an example, PyMT [17] is a framework for ity. It allows designers to specify complex relationships
rapid prototype development of multi-touch applications. It between the physical and virtual world and allows designers
provides consistent touch data to the application widget layer to capture and replay synchronized video and sensor data to
from different touch devices. Pointer [13] also proposed a work off-site and to test specific parts of their experience
hardware abstraction approach. OpenInterface [9] provides more effectively. FauxPut [12] is another testing tool for
an environment to work with simulated components from a interaction designers that can wrap input device APIs and
component repository (e.g. speech recognition, video “finger provide interface for recording, simulating and editing inputs
tracker”). for recognition based interactions. It also allows creating
simulation of sensor data along with other actual device data
In TouchToolkit, we have a similar approach as PyMT and in parallel.
Pointer in the device abstraction part. However, Touch-
Toolkit also has a virtual hardware simulator similar to Open- The Microsoft Surface SDK provides a record and playback
Interface to simulate actual device inputs for testing and tool that allows developers to test their applications using
debugging multi-touch applications. recorded touch interactions. However, this tool can only
be used for applications that are built using the Microsoft
Recent versions of some operating systems are providing Surface SDK as it only works inside their simulator or on an
native support for touch based inputs. For an example, Mi- actual Microsoft Surface device. Although the tool provides
crosoft Windows 7 supports Zoom, Pinch, Rotate and some a recording feature that helps the manual tests to some extent,
other gestures out of the box. Mac OS Snow Leopard also it does not provide any support for using those recordings
provides gesture support to some extent. However, this op- in automated tests. Pointer [13] also proposed a record and
erating system level support can only be utilized if there replay based automated testing approach.
is a device driver, which is not yet available for all touch
enabled devices. For an instance, to use the Windows 7 TouchToolkit follows a similar approach with an extension
Touch API on Microsoft Surface one will need to write a that it allows developers to debug and write automated tests
device driver, as it is not available yet. Also, developers need of applications independent of underlying hardware. This
to handle operating system specific differences in their appli- also allows to simulate multi-user scenarios using multiple
cations. TouchToolkit abstracts out the input layer from the
application to solve this problem for the supported devices 1 http://multitouchvista.codeplex.com
recorded interactions and helps to overcome the need of an around three main topics. During the interviews each topic
actual device to a great extent. was introduced using starter questions:
Although not directly applicable to tabletop applications,
there is tool support available for automated testing of tra- 1. Please tell me how you tested your application.
ditional mouse and keyboard based user interfaces (UI). For
2. Is there anything that was difficult to test?
example, CodedUI Test 2 , Project White 3 , Selenium 4 and
QFTest 5 are used to automate UI testing of regular desktop 3. How did you test multi-user scenarios?
and web applications. Some of these tools follow a record
and replay based test automation while others rely on a pro-
grammatic approach only. Although these tools and most Each interview was audio-recorded and transcribed for anal-
other UI testing tools can automate the UI events from mouse ysis. Our analysis involved two stages. In the first, stage we
and keyboard, we haven’t seen a test automation tool that performed open coding on the transcribed data. Open coding
works for touch inputs even though the underling operating is an analytic process to identify concepts in the collected
system (i.e. Windows 7) natively provides the support. data [20]. In the second stage of our analysis, we grouped the
coding into five categories that capture the main challenges
While large scale multi-touch devices are fairly new and our participants faced.
still mostly used for research purposes, smaller handheld
multi-touch devices like smart phones and other portable Findings
devices are quite common to general people. Froglogic6 is The following discussion of our findings is organized around
working on Squish - an automated graphical user interface the five categories that emerged as we analyzed our study
(GUI) testing tool for different platforms including Apple’s data.
iPhone and iPad to support the testing of Cocoa Touch 7 Tabletop Application Testing Workflow. Figure 1 shows the
applications. Vimov 8 provides another multi-touch testing tabletop application testing workflow. This example work-
tool for iPhone and iPad applications. It can simulate device flow demonstrates that the developers carry out their debug-
features through another device like using an iPhone as a ging at two different locations, i) at their workstations using
multi-touch controller for Apple’s iPad simulator. Although the simulator and ii) at the actual table (the shaded region in
these tools help the testing of handheld multi-touch devices, the figure). This process is described by P1 in the following
we cannot use them for automated testing of large tabletop response:
interfaces.
“I usually used the simulator to test only the initial test to see
EXPLORATORY STUDY how it looks like. Then I had to move it to the actual hardware
We conducted a set of interviews to explore the common and then test it because the experience is much different”.
testing and debugging challenges that developers face while
developing tabletop applications. This workflow indicates that the testing and debugging effort
is increased when working on tabletop applications because
Study Participants the developers need to move between their workstation and
We interviewed 3 participants who developed tabletop appli- the actual hardware and perform repetitive testing.
cations in a university lab environment. All the participants
had prior software development experience and more than Testing Approach. Although all participants of this study
one year of tabletop application development experience. used automated unit tests to automatically verify their appli-
The participants were from the same lab where the toolkit cation logic, none of them used any automation for testing
was developed but they had not used the toolkit before this the tabletop interfaces. In fact, none of the participants were
study. In this paper we refer to those participants as P1, P2 even aware of any automated testing tools. As a result they
and P3. Table provides a summary of their experience levels. spent a considerable amount of time on manual regression
testing, which involves carrying out the same tests over and
P1 developed GIS-based tabletop applications with an indus- over again. This was particularly time consuming for partici-
try partner. P2 developed a multi-player table-based game pant P3 who was developing an application for two different
and P3 developed and maintained an existing collaborative
tabletop application. Both P1 and P2 developed software
for the Microsoft Surface and P3 developed software for Participant # of Years of Years of
SMART tables. Tabletop Tabletop Development
Data Collection and Analysis Apps. Experience Experience
Each participant was interviewed independently for 25 min-
utes. The interviews were semi-structured and organized P1 2 1 5
2 http://msdn.microsoft.com/en-us/library/dd286726.aspx
3 http://white.codeplex.com/white P2 3 2 8
4 http://seleniumhq.org/
5 http://www.qfs.de P3 1 1 3
6 http://www.froglogic.com/
7 http://cocoatouchapps.com
8 http://www.vimov.com/ Table 1: Participants’ Experience
Figure 1: An example of a tabletop application testing workflow

tabletop devices with different physical sizes. So, P3 had to Feature Simulator Actual Table
manually test on both tables whenever there was a significant
change in the application. # of touches # of Mice 52+
Limitations of the Simulator. Tabletop hardware vendors
often ship device simulators. Although these simulators Physical Limited Almost any shape
can mimic the hardware on a standard PC to some extent, objects
the developers still run into issues as a result of differences
between the simulator and the actual tabletop. For example, Sensitivity Mouse is very “fat-finger” Finger is
in response to a question on the difference between testing Precise (300- less Precise
alone at the workstation and with multiple users at the table- 800 DPI)
top hardware, participant P1 mentioned the following:
# of Testers # of Mice More than one
“... if you are trying to create a new window, you can’t do it
more than once at the same time because you have only two Physical ori- Vertical Horizontal
hands (two mice at the simulator). So if two people are trying entation
to test at the same time (on the actual hardware) maybe they
will check occurrences like doing this at exactly the same
time.” Table 2: Feature comparison between a Simulator and
an Actual Tabletop
Table summarizes the key differences between these two
environments (in this case the Microsoft Surface Computer
and the Microsoft Surface Simulator). From Table we see votes, 2) multiple users vote sequentially and 3) multiple
that the simulator supports a limited capability multi-touch users vote concurrently. However, multi-user interactions
and multi-user environment compared to the target tabletop. can go beyond a single interaction on a single element. In
As a result, a significant amount of testing and debugging that situation, manual testing becomes even harder as there
work needs to be carried out on the actual table, especially is an explosion of possible states. Multi-user scenarios often
when complex concurrent interactions need to be considered. introduce unseen performance issues as well. P2 and P3
mentioned that at times they experienced severe performance
Testing Multi-User Scenarios. Multi-user scenarios typically degradation when multiple users were concurrently using
involve a large number of possible concurrent interactions their systems. But a single developer or tester, when doing
by different users on the same interface. Manually testing manual testing can only explore a limited set of possible
such interfaces require multiple users, which is an often concurrent scenarios.
difficult to find every time a feature needs to be tested. For
an example, P3 mentioned a multi-user scenario that he de- Bringing Code to the Tabletop. In most development teams
veloped where multiple users could vote by placing a tap that our participants worked in, digital tables are shared by
gesture on a specific interface element. He prepared the multiple developers. As a result, developers typically need to
test plan to test for the following scenarios: 1) single user move code between their PC and the shared tabletop so that
Application Test Runner processor that recognizes gestures from the raw touch data,
(3) the touch recorder that stores the raw data from the
hardware abstraction layer and (4) the core that acts as a
Touch- bridge among the components. The test framework executes
Toolkit
Event Test Online
Controller Framework Storage the automated test scripts. A test script validates the ges-
ture recognition code against one or more recorded touch
interactions. Gestures are defined using a gesture definition
Gesture Touch language [15] provided by the toolkit which allows to define
Core Recorder
Processor multi-touch gestures that may include touch interactions in
multiple steps. We describe the key components related to
automated testing in the subsequent sections.
Hardware Abstraction Layer
Hardware Abstraction Layer
MS Surface TUIO … Virtual Device Like other tools (e.g., [16]), TouchToolkit decouples the ac-
tual hardware from the application by providing a hardware
Figure 2: Components of the TouchToolkit Framework abstraction layer. This layer includes a hardware agnostic
interface for capturing multi-touch inputs. This interface can
be implemented for most multi-touch enabled hardware plat-
they can test the features in the target environment. Our study forms and we currently have implementations for Microsoft
participants use source code repositories or USB memory Surface, SMART Tabletop, Windows 7, AnotoPen and the
sticks as intermediate storage between the two environments. TUIO protocol[10]. TouchToolkit also has an implementa-
This process of going through an intermediate medium slows tion of this interface for a virtual hardware device that can
down the familiar workflow of the develop-debug-develop be used to playback recorded interactions and run automated
cycle. Also, it requires developers to commit untested code tests. Multiple devices can be active at the same time and
to the shared repository, which often breaks a working build. the framework supports changing devices at runtime. This
As P1 mentioned: is useful in an environment where additional devices (e.g.,
AnotoPens) need to be connected while the application is
“(The process of transferring code to the table) is not com- running.
fortable because sometimes you make some changes but you
are not confident to commit it, as it’s not a final change” While all multi-touch devices provide a set of common in-
puts like coordinates for touch points, additional inputs are
Participants P1 and P3 mentioned that developing on the also available that are often unique to a particular device.
tabletop with an additional vertical display was faster as For example, the Microsoft Surface provides finger direction
the outcome of the work could be loaded and debugged data, Diamond Touch can identify users and so on. To
immediately. To boost productivity, we recognize that it is maintain hardware independence, the hardware abstraction
important to provide developers with tools so that they can layer ensures that basic touch information is processed in
get immediate feedback about their work-in-progress code. a common format. However, hardware specific data can
TOUCH TOOLKIT ARCHITECTURE also be provided and that data is passed, through the core
To address some of the challenges faced by the participants in component, to other parts of the toolkit and to applications.
our exploratory study, we developed TouchToolkit. Specifi- When an application uses a gesture that needs a device spe-
cally, TouchToolkit aims to address four development and cific input, it should also provide an alternate option (i.e.
testing challenges: (1) automated unit testing, (2) debug- another gesture) as a fall back. For example, an applica-
ging, (3) testing multi-user scenarios, and (4) device inde- tion can have a single finger “rotate” gesture. This gesture
pendence. requires the “touch direction” data that is available in Mi-
TouchToolkit provides a touch interaction record and play- crosoft Surface but not in many other multi-touch devices.
back system that helps simplify testing and debugging during As an alternate, the application may also provide the two
development as well as automating tests to validate multi- finger rotate gesture that uses the basic inputs to comply with
touch interactions. It also provides a device independent API different devices. In most cases, the TouchToolkit framework
that can be used to add new device support and a gesture can be used to determine whether an application that uses the
recognition system. The tool can be used in applications Toolkit has any device specific dependencies.
that use Windows Presentation Foundation (WPF) and also Touch Interaction Recorder
in Silverlight-based web applications. The entire source code To record interactions, the Touch Recorder subscribes to
and documentation for the tool is available on the project web lower level input from the hardware abstraction layer through
site9 . The video with this paper shows how the tool is used. the core component and saves the data into an online storage
The component diagram of the TouchToolkit framework is and also cache it locally to improve performance. This
shown in Figure 2. The four key components of the toolkit allows automatic synchronization of data between developer
are: (1) the hardware abstraction layer which exposes a machines and actual devices. The data is stored in an XML
hardware agnostic API for the application, (2) the gesture format (see Figure 3). The recorder can record and store in-
teractions from any device that is supported by the hardware
9 http://touchtoolkit.codeplex.com abstraction layer, including basic touch information (i.e., co-
<FrameInfo> 2
1
<TimeStamp>10926403</TimeStamp>
<Touches> Test Framework Touch Recorder
<TouchInfo>
<ActionType>1</ActionType> Basic Create virtual app. Load data from 
storage
<Position> touch data
<X>451.14</X> Register gesture 
<Y>107.29</Y> events Merge timelines
</Position>
<TouchDeviceId>10</TouchDeviceId> 4
<Tags> Device Init. virtual device
User’s validation code
<Tag> specific
<Key>Size</Key> touch data Simulate touch
Playback Completed
<Value>10</Value>
</Tag>
</Tags> Gesture detected
</TouchInfo> Core, Gesture Processor 
... & Event Controller
3
</Touches>
</FrameInfo> Continuous flow Asynchronous communication
Figure 3: An XML code fragment representing a part Figure 4: Work flow of automated test framework
of a touch interaction. Some details are omitted for
clarity. Each interaction is recorded as a frame which
contains one or more touches. gesture is detected, it invokes the user defined validation
code. Depending on the type of gesture the user defined code
can be invoked multiple times. Regardless of the status of
ordinates, touch ID) and any additional device specific data gesture detection, the framework also invokes the “Playback
provided by the hardware. Completed” test code defined by the user at the end. An
example test using this framework is given later in this paper.
During playback this module reconstructs the touch data
object from the XML content and sends the data to the TESTING USING TOUCH TOOLKIT
system through a virtual device so that it appears to the rest Automated unit testing is a well known way to increase
of the system as if it is coming from the actual device. This the effectiveness, efficiency and coverage of software testing
allows the developers to test applications that require multi- [14]. It is one of the industry standard methods for repeatedly
touch interactions on their development machine. verifying and validating individual units of the application
in regression testing. Though there are some simulators
Test Framework available to manually test tabletop applications, tool support
Record and playback can be used for both manual and au- for unit testing multi-touch gestures is limited.
tomated testing. While manual test may involve gesture
detection as well as other UI related functionality testing, the Writing Unit Test for Gestures
automated test framework focuses specifically on validating Traditional unit tests execute sequentially, however, multi-
gesture detection code. Most automated Unit Test systems do touch gesture based user interactions require asynchronous
not have the option to use an active UI during test. However, processing. For example, a “Flick” gesture requires a cer-
gestures are directly related to UI and testing them often tain period of time to complete, so a test to validate the
requires UI specific functionality. To mimic a realistic ap- recognition of that gestures must wait until the gesture is
plication scenario, the test framework creates an in-memory completed. Such tests require asynchronous execution which
virtual UI layer and subscribes to gesture events in the same is supported by the TouchToolkit test framework API.
way that an application would. The test framework can be
used to test any type of gestures that can be defined in the Multi-touch gesture interactions can trigger continuous events.
gesture definition language, including complex multi-touch For an example, a photo viewer application needs to keep
gestures that involve touch interactions with multiple steps. responding to the “Zoom” gesture in “real-time” as long as
More details about the gesture processor and the gesture the zoom interaction continues. So, a test for this scenario,
definition language can be found in [15]. needs to validate the zoom interaction continuously instead
of just once it is completed. The TouchToolkit test frame-
Figure 4 shows the work flow of an automated test in Touch- work allows a developer to write unit test cases for such
Toolkit. To start, it creates the virtual application and reg- continuous touch-interactions.
isters the necessary gesture events during the initialization
process. Then the TouchRecorder loads the data from storage To support asynchronous and continuous interaction testing,
and starts the simulation process. If a test involves simulating our test framework is event driven. The core of the API is the
multi-user scenarios using multiple touch interactions then Validate method which takes the following parameters:
the system merges frames from individual recorded data into
one time line. The virtual device continues to send simulated 1. expectedGestureName: The name of the gesture to detect
device messages to the framework. As soon as the desired (e.g., Zoom).
Figure 5: Example unit test code using Touch Toolkit

2. savedInteraction: The identifier or the recorded interac- TouchToolkit allows developers to write unit test code for
tion that should produce the expected gesture. validating multi-touch interactions.

3. gestureDetectedCallback: The method to call when the Step by Step Debugging.


gesture is detected. Developers can write custom valida-
tion code inside this method. In addition to unit testing, the record and playback feature
can also be used to debug complex touch interactions. Using
TouchToolkit one can set breakpoints in an IDE to debug
Figure 5 shows a code fragment that is used to test if the touch interaction related code. Also TouchToolkit provides
“Zoom” gesture is detected as a result of playing the saved a speed control that developers can use to speed up the
interaction named “TouchInteraction02”. In line 5 and 23 of debugging process. As a result, a developer can quickly
the code, we use an existing class named AutoResetEvent move to a point of interest during debugging as well as
from the System.Threading class library in the Microsoft investigate an interaction in slow motion. Currently devel-
.NET framework to implement the asynchronous unit test opers can use the remote debugging feature of Microsoft
execution. AutoResetEvent allows threads to communicate Visual Studio to debug the application on the actual hardware
with each other by sending signals. The Validate API as from their workstation. However, this requires developers to
discussed above is used in line 7. In addition to just the move between the actual hardware and their workstations to
detection of the “Zoom” gesture a developer can provide interact with the application and to see the live debug outputs.
additional validation code around line 15. TouchToolkit enables the developers to achieve the same goal
without using the actual hardware.

Testing Multi-User Scenarios.


In our exploratory study we found that a key challenge for
developers is testing and debugging interactions or scenarios
involving multi-user interactions. To mitigate these chal-
lenges, TouchToolkit supports the execution of different in-
teractions in parallel, even if those interactions were recorded
Figure 6: User defined gesture validation code separately. The result is that developers do not need to in-
volve multiple testers every time they need to test concurrent
Figure 6 shows how to write unit test for continuous interac- multi-user interactions. At present, we do not have a visual
tions such as “Zoom”. Here the purpose of the validation is tool for editing the time lines of recorded touch interactions
to see if the distance between subsequent touch points during but a knowledgable programmer can use the API methods to
a “Zoom” gesture is increasing. Using this same approach achieve this effect.
Figure 7: TouchToolkit: Simulating multi-user touch interactions

Figure 7 shows a screenshot of the TouchToolkit record and an audio recorder to record the conversations and a screen
playback window for a multi-touch photo viewer application. capturing tool to record a user’s activities on the screen
The “Add New” tab in the debug window allows developers during the coding tasks. The evaluation was done three
to record new touch interactions. The “Existing Gestures” months after the initial exploratory study using the same
tab allows developers to playback recorded touch interac- participants.
tions individually or in parallel. In step 1, a “Lasso” gesture
is recorded. Next, in step 2 the “Zoom” gesture is recorded. Data Collection
Once these two are recorded separately, as shown in step 3, Each session lasted 50 minutes and consisted of three sec-
TouchToolkit allows one to run both of them in parallel to tions as follows:
simulate multi-user scenario. To differentiate the constituent
interactions of a combined playback, TouchToolkit applies First, we showed the participant a seven minute introductory
different color codes to the individual interactions as shown video describing the main features of our framework and
in Step 3. A speed controller on the playback panel allows spent 1-2 minutes on follow up discussion. Then, we asked
the playback speed to be adjusted. the participant to perform the following three tasks to a par-
tial implementation of a tabletop photo viewer application:

1. Add a photo resize features using predefined zoom and


pinch gestures.

2. Record the resize interaction for later be use in automated


Figure 8: Using multiple recorded touch interactions in testing of the application.
a single Unit Test
3. Write a UnitTest to automatically test the zoom gesture in
This same combined playback can be used inside unit test an existing visual studio test project.
code to test for multi-user multi-touch interactions. To achieve
this, a developer needs to specify all the desired gestures
while calling the Validate method. Figure 8 shows an ex- Finally, we conducted a semi-structured interview to collect
ample test code fragment. This code tests if “Zoom” and feedback on the toolkit and to better understand each partic-
“Lasso” gestures are detected after executing two saved in- ipant’s experiences using the toolkit.
teractions named “interaction01” and “interaction02” in par- Findings
allel. As shown in this example, the test framework hides the At a high level, our preliminary evaluation has suggested that
complexity of dealing with multi-user, multi-touch scenarios the TouchToolkit test framework:
and provides a high level API for developers.
• can be used to write unit tests for touch interactions, and
EVALUATION • the record/replay feature can be used to overcome some of
We performed a preliminary evaluation with a focus on get- the testing and debugging challenges.
ting early feedback from experienced multi-touch application
developers about the usability and appropriateness of the These findings are discussed in some more detail in the
toolkit. All of the studies were done individually. We used remainder of this section.
Findings from Task 1: Adding Resize Functionality. Partici- support for many of the challenges that our participants faced
pants were asked to add resize functionality for the image ob- in their debugging and testing of tabletop applications. For
jects. The required gestures (zoom and pinch) were available example, Participant P3 appreciated that the TouchToolkit
in TouchToolkit’s predefined list of gestures. The purpose allowed him to test and debug without moving between the
of this task was to evaluate the usability of the gesture event tabletop device and his workstation, which he believes will
subscription API. help him be more efficient in his development:
Participants P2 and P3 were able to complete the task. How- “For sure it will save a lot of development time as you don’t
ever, P1 partially completed the task but faced difficulty have to move between the device and development machine
on using the right data type from the library. We found back and forth just to test a feature.”
that she was expecting that the IDE’s auto-complete feature
would help her to determine which types to use, however this He also felt that it was valuable that “you can also interact
feature was not supported in this case. when playback is going on” as it makes many debugging
scenarios easier. Participant P2 felt that the main benefit of
In summary, the participants were able to understand how to the framework for him would be the ability to develop au-
use the toolkit to implement an application feature. We also tomated tests and use those as part of continuous integration
found that participants were expecting comprehensive IDE suite. Finally, participant P1 felt that the support for device
support not yet available in our prototypical implementation. independent record and replay in the TouchToolkit to be the
most useful for her development work.
Findings from Task 2: Record the Resize Touch Interaction.
This task requires one to do the following: LIMITATIONS of TOUCH TOOLKIT and STUDY
The goal of our work has been to develop tool support for
1. Write the appropriate code to show the recording panel in Microsoft .NET based tabletop applications. The tool is well
the debugger. integrated with the Microsoft Visual Studio IDE and test
framework. This makes it easy to use for any application
2. Use the recorder panel to record the touch interactions. that runs on the same platform. On the other hand, it does
not support application development with non Microsoft lan-
These steps were demonstrated in the introductory video. All guages and touch frameworks.
of the participants successfully completed this task. This
feedback indicates that our participants could quickly learn The purpose of the preliminary user study was to generally
how to record an interaction using the tool. evaluate the approach taken in TouchToolkit. We had three
experienced tabletop application developers as our partici-
Findings from Task 3: Writing Unit Test. Participants were pants. We recognize that a comprehensive user study in-
asked to write a unit test to validate the “zoom” gesture. To volving more participants can provide more generalizable
ease the process of writing unit tests, TouchToolkit provides insights about the approach and our tool.
IDE templates of test code. However, a developer needs to
write the actual test code depending on the specific interac- TouchToolkit was intended to be used for automated test-
tion under test. ing of multi-user multi-touch based interaction. However,
some other tabletop input techniques such as Smart Tags or
The purpose of this task was to see how easily a developer physical object based interactions are not yet supported by
can understand the test API and the appropriate structure for this tool which limits its usefulness in testing some kinds of
writing unit tests for gestures. The “zoom” gesture was cho- applications.
sen for three reasons. First, it is a common and comparatively
simple gesture and the associated test plan is straightforward. FUTURE WORK
Second, this is a scenario that requires developers to write In future, we plan to extend the TouchToolkit in the following
asynchronous test code which developing the test logic. Fi- ways:
nally, “zoom” is a continuous gesture that requires the test
code to react in a continuous fashion. This test scenario gave • To evolve TouchToolkit as a comprehensive multi-touch
our participants an opportunity to use all of the main testing application test framework we need to include support for
features provided by our framework. other devices and input techniques.
• In addition to the record/replay based testing we plan to
All the participants completed the task. While participant P1 provide support for programmable user interface automa-
was not familiar with the concept of inline functions which tion testing for multi-touch applications.
simplified the asynchronous code execution to a great extent,
she was able to complete the task as the IDE template al- CONCLUSION
ready placed the basic code structure. This indicated that the We have introduced TouchToolkit which provides tool sup-
participants, after implementing and recording an interaction port for debugging and testing multi-user, multi-touch table-
using TouchToolkit, could write an automated test for the top applications. This tool offers a device independent record
interaction. We also found that templates can help reduce and replay based framework. Using this framework, devel-
the learning curve for new developers. opers can write automated tests for complex gestures that
run on their development machine. Also, these automated
Findings from Interviews. This study has provided prelim- tests can be used as a part of regression testing in a con-
inary evidence that our test framework provides effective tinuous integration process. To reduce the learning curve,
we present an event based API that most UI developers are 11. Kara, L. B. and Stahovich, T. F. An image-based,
already familiar with. Also, we provide IDE integration for trainable symbol recognizer for hand-drawn sketches,
Microsoft Visual Studio including test code templates and Computers & Graphics, vol. 29, no. 4, pp. 501-517,
test execution as a part of the test process. We believe this 2005.
automated test framework can help to produce real-world
multi-touch tabletop applications with good quality. The 12. Cardenas, T., Bastea-Forte, M., Ricciardi, A., Hartmann,
results of our evaluation of the toolkit are preliminary, but B. and Klemmer, S. R. Testing Physical Computing
encouraging. Prototypes Through Time-Shifted & Simulated Input
Traces. In extended abstracts of UIST 2008.
ACKNOWLEDGMENTS
We would like to thank Teddy Seyed and Andy Phan for their 13. Bastea-Forte M., Yeh, RB and Klemmer, S.R. Pointer:
contribution on developing providers for different hardware Multiple Collocated Display Inputs Suggests New
platforms. Models for Program Design and Debugging. In Extended
Abstracts of UIST (Posters), 2007
REFERENCES
1. North, C., Dwyer, T., Lee, B., Fisher, D., Isenberg, P., 14. Beck, K. and Andres, C. 2004 Extreme Programming
Robertson, G., Inkpen, K. and K.I. Quinn, Understand- Explained: Embrace Change (2nd Edition). Addison-
ing Multi-touch Manipulation for Surface Computing, Wesley Professional.
Interact 2009.
15. Khandkar, S. and Maurer, F. 2010. A Domain Specific
2. Elias, J., Westerman, W. and Haggerty, M. Multi-touch Language to Define Gestures for Multi-Touch Appli-
gesture dictionary. United States Patent 20070177803, cations. In Proc. of the 10th SPLASH Workshop on
2007. Domain-Specific Modeling, Reno/Tahoe.

3. J.O. Wobbrock, M.R. Morris, and A.D. Wilson, User- 16. Echtler, F. and Klinker, G. 2008. A multitouch
defined gestures for surface computing, Proceedings of software architecture. In Proceedings of the 5th Nordic
the 27th international conference on Human factors in Conference on Human-Computer interaction: Building
computing systems, 2009, pp. 1083-1092. Bridges (Lund, Sweden, October 20 - 22, 2008).
NordiCHI ’08, vol. 358. ACM, New York, NY, 463-466.
4. Fails, J. and Olsen, D. A design tool for camera-based
interaction. In Proc. CHI, 2003. 17. Hansen, T. E., Hourcade, J. P., Virbel, M., Patali,
S., and Serra, T. 2009. PyMT: a post-WIMP multi-
5. Witten, I. H. and Frank, E. Data Mining: Practical touch user interface toolkit. In Proceedings of the ACM
Machine Learning Tools and Techniques. Morgan international Conference on interactive Tabletops and
Kaufmann, San Francisco, 2nd edition, 2005. Surfaces (Banff, Alberta, Canada, November 23 - 25,
2009). ITS ’09. ACM, New York, NY, 17-24.
6. Westeyn, T., Brashear, H., Atrash, A. and Starner, T.
Georgia tech gesture toolkit: supporting experiments in 18. Lee, J.C. Hacking the Nintendo Wii remote, IEEE
gesture recognition. In proc. ICMI, 2003. Pervasive Computing, vol. 7, no. 3, July-Sept 2008, 39-
45.
7. Ashbrook , D. and Starner,T. MAGIC: a motion gesture
design tool, in Proceedings of the 28th international 19. Pawar, U.S., Pal, J., and Toyama, K. Multiple mice
conference on Human factors in computing systems, pp. for computers in education in developing countries,
2159-2168, 2010. International Conference on Information Technologies
and Development, 2006.
8. Long, A. C., Landay, J. A. and Rowe, L. A. Quill: a
gesture design tool for pen-based user interfaces, Eecs 20. Strauss, A. L. and Corbin, J. Basics of Qualitative
department, computer science division, UC Berkeley, Research: Techniques and Procedures for developing
Berkeley, CA, 2001. Grounded Theory. Sage Publications, 1998.
9. Gray, P., Ramsay, A. and Serrano, M. A demonstration 21. Villar, N., Izadi, S., Rosenfeld, D., Benko, H., Helmes,
of the OpenInterface Interaction Development Environ- J., Westhues, J., Hodges, S., Ofek, E., Butler, A., Cao,
ment, UIST’07 Adj. Proc. X., and Chen, B. 2009. Mouse 2.0: multi-touch meets
the mouse. In Proceedings of the 22nd Annual ACM
10. Kaltenbrunner, M., Bovermann, T., Bencina, R., and Symposium on User interface Software and Technology
Costanza, E. TUIO: A protocol for table-top tangible (Victoria, BC, Canada, October 04 - 07, 2009). UIST
user interfaces. In Proceedings of Gesture Workshop ’09. ACM, New York, NY, 33-42.
2005, 2005.

You might also like