NO CODE TEST RECORDING for Ios APPLICATIONS

Total Page:16

File Type:pdf, Size:1020Kb

NO CODE TEST RECORDING for Ios APPLICATIONS NO CODE TEST RECORDING FOR iOS APPLICATIONS A Thesis Presented to The Academic Faculty by Anushk Mittal In Partial Fulfillment of the Requirements for the Degree Bachelor of Science with the Research Option in the School of Computer Science Georgia Institute of Technology July 2020 Copyright © Anushk Mittal 2020 NO CODE TEST RECORDING FOR iOS APPLICATIONS Approved by: Dr. Alessandro Orso, Advisor School of Computer Science Georgia Institute of Technology Dr. Qirun Zhang School of Computer Science Georgia Institute of Technology Date Approved: July 27, 2020 2 ACKNOWLEDGMENTS I wish to thank Dr. Alessandro Orso without whom none of this would have been possible. I also wish to thank my mentor Dr. Shauvik Roy Choudhary, whom I worked under and with throughout my years of undergraduate research. He inspired me with the initial idea and helped develop the skills necessary to bring it to life. He guided me and supported me throughout the process, from ideation to completion. I would also like to thank my parents, my professors throughout my undergraduate studies at Georgia Tech, and the College of Computing, who believed in me, supported me and guided me through the path of learning new things and venturing into the unknown. If you want to change the world, you're at Georgia Tech! You can do that! 3 TABLE OF CONTENTS Page ACKNOWLEDGMENTS................................................................................................................... 3 LIST OF TABLES............................................................................................................................... 5 LIST OF FIGURES............................................................................................................................. 6 SUMMARY......................................................................................................................................... 7 CHAPTER I. Introduction...................................................................................................................................... 8 II. Literature Review............................................................................................................................ 17 III. Tool Design.................................................................................................................................... 24 IV. Experiment & Results..................................................................................................................... 47 V. Conclusion........................................................................................................................................ 54 VI. Future Work.................................................................................................................................... 55 REFERENCES...................................................................................................................................... 57 4 LIST OF TABLES Page Table 1: Assertable properties for the test case recording phase....................................................... 38 Table 2: List of open-source apps & NLTCs used for experimentation............................................ 49 Table 3: List of devices and recording / execution status.................................................................. 52 5 LIST OF FIGURES Page Figure 1a: Calculator Test Application UI....................................................................................... 12 Figure 1b: Calculator Test Application UI Hierarchy...................................................................... 12 Figure 2: iOS main function............................................................................................................. 20 Figure 3: iOS App Architecture....................................................................................................... 20 Figure 4: High-level overview of the adopted Barista approach [4] ............................................... 24 Figure 5: SDK Use Flow................................................................................................................... 25 Figure 6: Flowchart representing a high-level overview of recording phase.................................... 31 Figure 7: Abstract syntax of the record trace.................................................................................... 32 Figure 8: Recorded trace for “2+9=11 test case”.............................................................................. 33 Figure 9: Importing iOSTestSDK in a sample open-source Calculator app..................................... 34 Figure 10a: iOSTestSDK float button in the Calculator open-source app......................................... 36 Figure 10b: Float button presented with options............................................................................... 36 Figure 11a: Assertion check grid presented after selecting assertion check...................................... 37 Figure 11b: Button “1” selected in the assertion mode, single tap..................................................... 37 Figure 11c: Double-tapping presents an assertion table, where the receiver subview has been selected to assert property.................................................................................................................. 37 Figure 12: Add comments screen presented with user typed in comment........................................ 39 Figure 13: Automatically generated XCTestCase for “2+9=11 test case”........................................ 42 Figure 14: Pseudocode for encoder service that reads record trace JSON to write XCTestCase swift file............................................................................................................................................. 43 Figure 15: Adding UI Testing Bundle target to an existing Xcode project....................................... 45 Figure 16: UI widgets handled by iOSTestSDK............................................................................... 53 6 SUMMARY Over the past decade, mobile apps have touched every sphere of life with ~4.5M applications available to download through Apple’s App Store and Google’s Play Store [1] that are expected to generate ~$1T in revenue by 2023 [2]. Today, an average American checks their phone once every 12 minutes [3], but testing these mobile apps is mostly unreliable and too resource expensive with current state-of-the-art technology. Specifically, testing iOS apps requires writing code using Xcode IDE that requires a development environment setup for all testers. These testers must also be familiar with coding for iOS apps as they need to interface with XCUITest API to write UI tests or verify the automatically generated code through Xcode’s XCUITest Recorder. To address this issue and to make iOS testing accessible to everyone, we adopt the Barista technique [4] to passively record user interactions and build device-independent test scripts using any iOS device. We describe a three-part technique of recording user interactions through Objective-C swizzling, encoding generated test cases using a separately hosted server, and generating XCUITest files to run encoded test cases. We conclude with experimental results and discussions that demonstrate the effectiveness of our solution on a host of sample open-source applications that represent the most common and popular app categories and functionalities along with future directions on how this collected big data could be leveraged for intelligent insights. The goal of this research is to make testing approachable and easy for large corporations and indie developers alike. The presented tool has been made open-source at https://github.com/anushkmittal/iOSTestSDK. 7 CHAPTER I INTRODUCTION Over the past decade, mobile apps have touched every sphere of life from making new friends online to finding one’s significant other, to banking, shopping and playing games. They have replaced physical objects on our desks, such as calculators, torches, notepads, stickies, and more. In 2019 alone, the App Store ecosystem supported $519 billion in billings and sales globally [5]. No doubt, mobile apps play a significant role in our lives and present a multi-billion dollar industry [6]. Like all traditional software, these apps must be tested to check for correct behavior under different input conditions and scenarios, especially when failures in an app can result in loss of reputation, and ultimately customers, for all online businesses. These concerns are largely unanswered for iOS smartphones created and developed by Apple, Inc. iOS is the operating system that presently powers many of the company's mobile devices, including the iPhone, iPad, and iPod Touch. Initially unveiled in 2007 for the iPhone, iOS has been extended to support other Apple devices such as the iPod Touch (September 2007) and the iPad (January 2010). As of the 1st quarter of 2020, Apple's App Store contains more than 1.8 million iOS apps [1], and in 2019, apps available on the App Store were downloaded over 31 billion times [7]. Today, approximately 50% of all smartphone devices in the US are iPhones [8]. However, testing iOS apps is particularly challenging as major new iOS releases are announced yearly during Apple’s Worldwide Developers Conference (WWDC) with support for the majority of iPhones and iPads. Between 2017 to 2020, in the last three years, Apple has released 10 new iPhones and 11 new iPad models. iPhones introduced new screens of sizes 5.8-inch, 8 6.5-inch,
Recommended publications
  • Zebra Scanner SDK for Ios Developer Guide (En)
    ZEBRA SCANNER SDK for iOS DEVELOPER GUIDE ZEBRA SCANNER SDK for iOS DEVELOPER GUIDE MN001834A04 Revision A July 2019 ii Zebra Scanner SDK for iOS Developer Guide No part of this publication may be reproduced or used in any form, or by any electrical or mechanical means, without permission in writing from Zebra. This includes electronic or mechanical means, such as photocopying, recording, or information storage and retrieval systems. The material in this manual is subject to change without notice. The software is provided strictly on an “as is” basis. All software, including firmware, furnished to the user is on a licensed basis. Zebra grants to the user a non-transferable and non-exclusive license to use each software or firmware program delivered hereunder (licensed program). Except as noted below, such license may not be assigned, sublicensed, or otherwise transferred by the user without prior written consent of Zebra. No right to copy a licensed program in whole or in part is granted, except as permitted under copyright law. The user shall not modify, merge, or incorporate any form or portion of a licensed program with other program material, create a derivative work from a licensed program, or use a licensed program in a network without written permission from Zebra. The user agrees to maintain Zebra’s copyright notice on the licensed programs delivered hereunder, and to include the same on any authorized copies it makes, in whole or in part. The user agrees not to decompile, disassemble, decode, or reverse engineer any licensed program delivered to the user or any portion thereof.
    [Show full text]
  • Cocoa Touch & Iphone
    Music Appreciation 243: Introduction to Rick Astley Evan Doll [email protected] Alan Cannistraro [email protected] Thursday, April 2, 2009 Thursday, April 2, 2009 Welcome to CS193P: iPhone Application Development Evan Doll [email protected] Alan Cannistraro [email protected] Thursday, April 2, 2009 Staff • Lecturers ■ Evan Doll [email protected] ■ Alan Cannistraro [email protected] • Student TAs ■ Troy Brant [email protected] ■ Paul Salzman [email protected] • “Professor Emeritus” ■ Paul Marcos [email protected] Thursday, April 2, 2009 How many of you... • Are familiar with object-oriented programming? • Have developed software with Mac OS X? • Have developed apps for the iPhone? Thursday, April 2, 2009 Lectures, Sections, Office Hours • Lectures ■ 320-105, Monday & Wednesday 3:15 – 4:30 PM • Optional Section ■ 200-205, Friday 3:15 – 4:05 PM as announced ■ Guest speakers, additional topics ■ First one will be next Friday 4/10 • Office Hours ■ Troy and Paul will be holding office hours ■ Time & location TBD, check website for details Thursday, April 2, 2009 Requirements • Prerequisite: CS 106B/X • Recommended Book: None, we’ll use Apple documentation • You must have access to an Intel-based Macintosh ■ Running Mac OS X 10.5 Leopard ■ iPhone SDK (Not available on cluster computers!) • Owning an iPhone or iPod Touch is not required ■ Assignments may be done with the iPhone Simulator ■ Loaner iPod Touches should be available, more details to come Thursday, April 2, 2009 Enrollment • Response has been phenomenal again
    [Show full text]
  • App Frameworks #WWDC16
    App Frameworks #WWDC16 Improving Existing Apps Using modern best practices Session 213 Woody L., � to the Knowledge © 2016 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple. Agenda Reduce Technical Debt Asset Catalogs Dependency Injection Live Playgrounds Cycle of Development You down with ‘Dub-DC? Yeah, you know me. Lots of Requests Your boss More Requests Your customers Technical Debt //TODO: Write and clean up Customer’s Perspective Actuality Duarte requesting hi-res photo AppStore New API zsh AppKit CF AirPortUtility PreferencesApp iCal Foundation AVFoundation AirPortAssistant AirPortSettings AirPortAssistant OpenCL GameKit Dock Mail MapKit MobileMusicPlayer xnu AppKit AppStore MobileSafari zsh QuickTime udf WebKit BlueToothSettings cups Messages Dock ActivityMonitor MobileSafari bash Mail AccessibilitySettings GameKit GameKitServices MediaPlayerUI MediaPlayer MediaStream MobileMail Swift 3 Source code compatibility New and Updated Platforms A Dev’s Run Loop Bug Fixes Technical Debt New and Platforms ♽Updated APIs Customer Roadmap A Dev’s Run Loop Bug Fixes Technical Debt New and Platforms ♽Updated APIs Customer Roadmap A Dev’s Run Loop Bug Fixes Technical Debt New and Platforms ♽Updated APIs Customer Roadmap The Essentials A very good place to start Earlier iOS 8 5% 11% Minimum Deployment of iOS 8 • 95% of Devices iOS 9 84% As measured by the App Store on May 9, 2016 Pick a Deployment Target Latest update of previous release Deprecated API Deprecated API Treat Warnings
    [Show full text]
  • Iphone Ios 5 Development Essentials
    iPhone iOS 5 Development Essentials i iPhone iOS 5 Development Essentials – First Edition ISBN-13: 978-1466337275 © 2011 Neil Smyth. All Rights Reserved. This book is provided for personal use only. Unauthorized use, reproduction and/or distribution strictly prohibited. All rights reserved. The content of this book is provided for informational purposes only. Neither the publisher nor the author offers any warranties or representation, express or implied, with regard to the accuracy of information contained in this book, nor do they accept any liability for any loss or damage arising from any errors or omissions. This book contains trademarked terms that are used solely for editorial purposes and to the benefit of the respective trademark owner. The terms used within this book are not intended as infringement of any trademarks. Rev 2.3p ii Table of Contents Preface ............................................................................................................................................................... xix 1. About iPhone iOS 5 App Development Essentials .............................................................................................. 1 1.1 Example Source Code ................................................................................................................................... 2 1.2 Feedback ...................................................................................................................................................... 2 2. The Anatomy of an iPhone 4S ...........................................................................................................................
    [Show full text]
  • Assessing the Quality of Mobile Graphical User Interfaces Using Multi-Objective Optimization
    Noname manuscript No. (will be inserted by the editor) Assessing the Quality of Mobile Graphical User Interfaces using Multi-objective Optimization Makram Soui · Mabrouka Chouchane · Mohamed Wiem Mkaouer · Marouane Kessentini · Khaled Ghedira the date of receipt and acceptance should be inserted later Abstract Aesthetic defects are a violation of quality attributes that are symp-toms of bad interface design programming decisions. They lead to deteriorating the perceived usability of mobile user interfaces and negatively impact the Users eXperience (UX) with the mobile app. Most existing studies relied on a subjective evaluation of aesthetic defects depending on end-users feedback, which makes the manual evaluation of mobile user interfaces human-centric, time-consuming, and error-prone. Therefore, recent studies have dedicated their effort to focus on the definition of mathematical formulas that each targets a specific structural quality of the interface. As the UX is tightly dependent on the user profile, the combi-nation and calibration of quality attributes, formulas, and users characteristics, when defining a defect, is not straightforward. In this context, we propose a fully automated framework which combines literature quality attributes with the users profile to identify aesthetic defects of MUI. More precisely, we consider the mobile user interface evaluation as a multi-objective optimization problem where the goal is to maximize the number of detected violations while minimizing the detection complexity of detection rules and enhancing the interfaces overall quality in means M. Soui College of Computing and Informatics Saudi Electronic University, Saudi Arabia E-mail: [email protected] Mabrouka Chouchane School of computer science of Manouba, Tunisia E-mail: [email protected] Mohamed Wiem Mkaouer Rochester Institute of Technology E-mail: [email protected] Marouane Kessentini University of Michigan E-mail: [email protected] Khaled Ghedira Honoris United Universities E-mail: [email protected] 2 Makram Soui et al.
    [Show full text]
  • Using Microsoft Visual Studio to Create a Graphical User Interface ECE 480: Design Team 11
    Using Microsoft Visual Studio to Create a Graphical User Interface ECE 480: Design Team 11 Application Note Joshua Folks April 3, 2015 Abstract: Software Application programming involves the concept of human-computer interaction and in this area of the program, a graphical user interface is very important. Visual widgets such as checkboxes and buttons are used to manipulate information to simulate interactions with the program. A well-designed GUI gives a flexible structure where the interface is independent from, but directly connected to the application functionality. This quality is directly proportional to the user friendliness of the application. This note will briefly explain how to properly create a Graphical User Interface (GUI) while ensuring that the user friendliness and the functionality of the application are maintained at a high standard. 1 | P a g e Table of Contents Abstract…………..…………………………………………………………………………………………………………………………1 Introduction….……………………………………………………………………………………………………………………………3 Operation….………………………………………………….……………………………………………………………………………3 Operation….………………………………………………….……………………………………………………………………………3 Visual Studio Methods.…..…………………………….……………………………………………………………………………4 Interface Types………….…..…………………………….……………………………………………………………………………6 Understanding Variables..…………………………….……………………………………………………………………………7 Final Forms…………………....…………………………….……………………………………………………………………………7 Conclusion.…………………....…………………………….……………………………………………………………………………8 2 | P a g e Key Words: Interface, GUI, IDE Introduction: Establishing a connection between
    [Show full text]
  • How to Use the Graphical User Interface TCS Technical Bulletin
    How to Use the Graphical User Interface TCS Technical Bulletin A. Create/Edit the Graphical Interface (Build Mode) Accessing the site using the Graphical Interface requires that you first build a layout (one or more layers/tabs depending on your site). This is done using the setup wizard to upload images/backgrounds and place controllers in appropriate locations on those images/backgrounds. When finished and saved, the User accesses the site using the Graphical Interface. 1. Click the “+” button to add a layer/tab for the site. (Skip to step 7 to edit an existing layer.) 2. Name the layer/tab by clicking in the field and entering the desired name. 3. Click the Choose File button to select the desired background image from your computer’s drive and click the Save button. 4. The Place View will open showing you the layer/tab title, a Save Positions button, the background image, and a bin of available controllers along the right-hand edge of the Graphical Interface which can be placed onto the layer/ tab. 5. Drag/drop controller icons from the icon bin to the desired location on the background image. Moving your mouse over each icon will show that controller’s name. The arrows at the top and bottom of scroll bar or the scroll bar itself allow you to scroll through the available controllers. NOTE: If you have placed controller icons too close to the icon bin and you would like to move them, you may need to scroll the available controllers up or down to clear the area around an icon to allow it to be dragged/dropped again.
    [Show full text]
  • Développement Mobile Apple Ios, Ipados, Iphone, Ipad Avec Swift
    Développement mobile Apple iOS, iPadOS, iPhone, iPad avec Swift En bref Acquérir les meilleures bases pour concevoir et développer des applications pour la plateforme iOS (iPad, iPhone) de manière autonome avec l’IDE Xcode 11.x et le langage Swift 5.x en conformité avec les « best practices » d’Apple. Au terme de cette formation, les participants seront en mesure de développer une application complète avec la plupart des contrôles disponibles dans l’environnement iPhone, iPad et d’être autonomes pour la réalisation de projet de plus grande envergure. Ces derniers seront également en mesure d’implémenter les meilleurs choix et les « meilleures pratiques » en matière de structures de données pour leurs applications et garantir une conformité aux standards de développement d’Apple tant d’un point de vue ergonomique que fonctionnel. Le cours traitera, au fil de l’eau, également des considérations d’ordre marketing et UX, avec des incidences et des « Use Case » du monde professionnel. Objectifs globaux • maîtriser le cycle de développement d’une application iOS • connaître et appliquer les « meilleures pratiques » et « l’art de faire » en matière d’ingénierie logicielle pour la plate-forme iOS ainsi que iPadOS (généralités) • maîtriser les bases du langage Swift version 5.x • être en mesure de développer une application complète iOS avec l’environnement de développement intégré Apple Xcode version 11.x • maîtriser la recherche d’informations, de solutions et résolutions de problèmes afin d’obtenir un degré d’autonomie optimal • être en mesure
    [Show full text]
  • Introduction to GREET1 2011 Graphical User Interface
    Introduction To GREET1_2011 Graphical User Interface Jeongwoo Han Systems Assessment Group Center for Transportation Research Argonne National Laboratory The GREET Training Workshop Washington, DC, Jan. 31, 2012 Outline . Purpose of GREET GUI . Structure and Operation of GREET GUI . Outputs of GREET GUI . Installation and Compatibility Issues with GREET GUI . Help with GREET GUI 2 Outline . Purpose of GREET GUI . Structure and Operation of GREET GUI . Outputs of GREET GUI . Installation and Compatibility Issues with GREET GUI . Help with GREET GUI 3 GREET GUI Development GREET 1 Excel Model Fuel Cycle (or WTW) Modeling for Light Duty Vehicles 4 GREET GUI Development Receives GREET GUI Communicate Display GREET 1 Excel Model Fuel Cycle (or WTW) Modeling for Light Duty Vehicles Run 5 Outline . Purpose of GREET GUI . Structure and Operation of GREET GUI . Outputs of GREET GUI . Installation and Compatibility Issues with GREET GUI . Help with GREET GUI 6 Steps of a Typical GREET GUI Session Copyright and information screens Load GREET Model User selects/specifies fuel blending options (in the background) User reviews/modifies key assumptions for User selects simulation year(s), fuel types, fuel production, fuel transportation and vehiclevehicle type type and and other other simulation key options options distribution, and vehicle operation Run GREET Model User selects/specifies feedstock, production (in the background) and fuel market shares Generate output file for energy use and UserUser selects/specifies selects/specifies fuel fuel pathways pathways and and emission rates and input log file for a record vehiclevehicle technologiestechnologies of inputs made during the concluded session 7 Outline . Purpose of GREET GUI .
    [Show full text]
  • The Three-Dimensional User Interface
    32 The Three-Dimensional User Interface Hou Wenjun Beijing University of Posts and Telecommunications China 1. Introduction This chapter introduced the three-dimensional user interface (3D UI). With the emergence of Virtual Environment (VE), augmented reality, pervasive computing, and other "desktop disengage" technology, 3D UI is constantly exploiting an important area. However, for most users, the 3D UI based on desktop is still a part that can not be ignored. This chapter interprets what is 3D UI, the importance of 3D UI and analyses some 3D UI application. At the same time, according to human-computer interaction strategy and research methods and conclusions of WIMP, it focus on desktop 3D UI, sums up some design principles of 3D UI. From the principle of spatial perception of people, spatial cognition, this chapter explained the depth clues and other theoretical knowledge, and introduced Hierarchical Semantic model of “UE”, Scenario-based User Behavior Model and Screen Layout for Information Minimization which can instruct the design and development of 3D UI. This chapter focuses on basic elements of 3D Interaction Behavior: Manipulation, Navigation, and System Control. It described in 3D UI, how to use manipulate the virtual objects effectively by using Manipulation which is the most fundamental task, how to reduce the user's cognitive load and enhance the user's space knowledge in use of exploration technology by using navigation, and how to issue an order and how to request the system for the implementation of a specific function and how to change the system status or change the interactive pattern by using System Control.
    [Show full text]
  • App Frameworks #WWDC16
    App Frameworks #WWDC16 What’s New in Cocoa Touch Session 205 Olivier Gutknecht Senior Engineering Manager, UIKit © 2016 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple. What’s New in Cocoa Touch What’s New in Cocoa Touch What’s Not New in Cocoa Touch Since Last Year Since Last Year 3D Touch Since Last Year 3D Touch iPad Pro Since Last Year 3D Touch iPad Pro Apple Pencil Since Last Year 3D Touch iPad Pro Apple Pencil Smart Keyboard Adaptivity Adaptivity UIUserInterfaceSizeClass.compact Adaptivity UIUserInterfaceSizeClass.regular Adaptivity UIUserInterfaceSizeClass.gigantic Adaptivity UIUserInterfaceSizeClass.gigantic Adaptivity UIUserInterfaceSizeClass.gigantic Adaptivity UIUserInterfaceSizeClass.gigantic Making Apps Adaptive The fundamentals Traits Size Classes Size-based layouts Aa Making Apps Adaptive Interface Builder Making Apps Adaptive Tools and Techniques Auto Layout Dynamic Type Layout Guides UIAppearance Asset Catalogs Making Apps Adaptive Aa PART 1 PART 2 Making Apps Adaptive, Part I Presidio Thursday 11:00AM Making Apps Adaptive, Part II Presidio Friday 9:00AM Inclusive App Design Pacific Heights Tuesday 10:00AM Advanced Touch Input Advanced Touch Input 120 Hz touch scanning on iPad Air 2 and iPad Pro Advanced Touch Input 120 Hz touch scanning on iPad Air 2 and iPad Pro Orientation, Precise Location, Force, and 240 Hz scanning with Apple Pencil Advanced Touch Input 120 Hz touch scanning on iPad Air 2 and iPad Pro Orientation, Precise Location, Force, and 240
    [Show full text]
  • Learning Watchkit Programming Addison-Wesley Learning Series
    Learning WatchKit Programming Addison-Wesley Learning Series Visit informit.com/learningseries for a complete list of available publications. The Addison-Wesley Learning Series is a collection of hands-on program- ming guides that help you quickly learn a new technology or language so you can apply what you’ve learned right away. Each title comes with sample code for the application or applications built in the text. This code is fully annotated and can be reused in your own projects with no strings attached. Many chapters end with a series of exercises to encourage you to reexamine what you have just learned, and to tweak or adjust the code as a way of learning. Titles in this series take a simple approach: they get you going right away and leave you with the ability to walk off and build your own application and apply the language or technology to whatever you are working on. Learning WatchKit Programming A Hands-On Guide to Creating Apple Watch Applications Wei-Meng Lee New York • Boston • Indianapolis • San Francisco Toronto • Montreal • London • Munich • Paris • Madrid Capetown • Sydney • Tokyo • Singapore • Mexico City Many of the designations used by manufacturers and sellers to distinguish their products are Editor-in-Chief claimed as trademarks. Where those designations appear in this book, and the publisher was Mark L. Taub aware of a trademark claim, the designations have been printed with initial capital letters or in all capitals. Senior Acquisitions Editor The author and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions.
    [Show full text]