Testing Cross-Platform Mobile App Development Frameworks Nader Boushehrinejadmoradi, Vinod Ganapathy, Santosh Nagarakatte, Liviu Iftode Department of Computer.

Slides:



Advertisements
Similar presentations
Mobile Application Development Keshav Bahadoor. Part 1 Cross Platform Web Applications.
Advertisements

© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Honing In on Multiple Targets with a Single Codebase Jeff Tapper Senior Technologist.
Policy Weaving for Mobile Devices Drew Davidson. Smartphone security is critical – 1200 to 1400 US Army troops to be equipped with Android smartphones.
Amanda Silver Director of Program Management Visual Studio Tools for Client Applications Cross-Platform Development using Visual Studio.
CSCI 4550/8556 Computer Networks Comer, Chapter 3: Network Programming and Applications.
Sets and Maps Chapter 9. Chapter 9: Sets and Maps2 Chapter Objectives To understand the Java Map and Set interfaces and how to use them To learn about.
Exception Handling An Exception is an indication of a problem that occurs during a program’s execution. Exception handling enables the programmer to create.
Exceptions. 2 Objectives Introduce C# exception handling –library exception types –custom exceptions Describe keywords used for exception handling –try.
Applied Software Project Management Andrew Stellman & Jennifer Greene Applied Software Project Management Applied Software.
From Desktop to Wearable to Testing Belgium Testing Days 2015 Alfonso Nocella, Maveryx.
ANDROID PROGRAMMING MODULE 1 – GETTING STARTED
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Java Software Solutions Foundations of Program Design Sixth Edition by Lewis.
By Ms.A.C.Sumathi AP(SG)/ Dept of CSE SNS College of Engineering, CBE.
Microsoft Evangelist Presentation September 13, 2012.
Introducing Xamarin 2.0 Introducing Xamarin 2.0 Michael Hutchinson
Intelligent Tutoring System Mobile Communication Team Drew Boatwright Nakul Dureja Richard Liou.
Microsoft Visual Basic 2012 CHAPTER ONE Introduction to Visual Basic 2012 Programming.
Title slide to be used at the start of a module. Developing Mobile Apps Roland Guijt
1 Chapter Eight Exception Handling. 2 Objectives Learn about exceptions and the Exception class How to purposely generate a SystemException Learn about.
Thank You ©2012, Cognizant. Rapido has been created by the Research and Development team from QE&A Technology CoE Rapido is continuously enhanced and.
Introduction CIS 136 Building Mobile Apps 1. What is a mobile app? 2  Computer program  Designed for small devices  Smartphones  Tablets  Other handhelds.
Software Engineering Prof. Dr. Bertrand Meyer March 2007 – June 2007 Chair of Software Engineering Static program checking and verification Slides: Based.
Files and Streams. Java I/O File I/O I/O streams provide data input/output solutions to the programs. A stream can represent many different kinds of sources.
Developing Enterprise Mobile Apps with Xamarin Loren Horsager CEO, Mobile Composer.
Computer Security and Penetration Testing
Lecture 2 Object Oriented Programming Basics of Java Language MBY.
In a world of platform complexities and bring-your-own-device, IT departments want cost-effective ways to manage app deployments and user expectations.
111 © 2002, Cisco Systems, Inc. All rights reserved.
ISV Innovation Presented by ISV Innovation Presented by Business Intelligence Fundamentals: Data Cleansing Ola Ekdahl IT Mentors 9/12/08.
An Object-Oriented Approach to Programming Logic and Design Fourth Edition Chapter 5 Arrays.
COMP 121 Week 1: Testing and Debugging. Testing Program testing can be used to show the presence of bugs, but never to show their absence! ~ Edsger Dijkstra.
Understanding Xamarin Development Matt
TAL7011 – Lecture 4 UML for Architecture Modeling.
ICINETIC Experts in.NET technologies and architectures.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
Apache Cordova Tools in Visual Studio
PRIOR TO WEB SERVICES THE OTHER TECHNOLOGIES ARE:.
Trunica Inc. 500 East Kennedy Blvd #300 Tampa, FL Cross Platform Mobile Apps With Cordova and Visual Studio 2015 © Copyright 2015.
Basics of testing mobile apps
| | Top 4 Benefits of Hybrid Mobile Apps.
KaaShiv InfoTech presents Intel XDK For Inplant Training / Internship, please download the "Inplant training registration form"
Getting Started with.NET Getting Started with.NET/Lesson 1/Slide 1 of 31 Objectives In this lesson, you will learn to: *Identify the components of the.NET.
Recommending Adaptive Changes for Framework Evolution Barthélémy Dagenais and Martin P. Robillard ICSE08 Dec 4 th, 2008 Presented by EJ Park.
Unit Testing. F-22 Raptor Fighter Manufactured by Lockheed Martin & Boeing How many parts does the F-22 have?
Sets and Maps Chapter 9. Chapter Objectives  To understand the Java Map and Set interfaces and how to use them  To learn about hash coding and its use.
Week 1 Lecture 1 Slide 1 CP2028 Visual Basic Programming 2 “The VB Team” Copyright © University of Wolverhampton CP2028 Visual Basic Programming 2 v Week.
CS223: Software Engineering Lecture 31: Acceptance Testing.
Google Web Toolkit for Mobile Applications Development INGENUITY AT ITS BEST……………….
Microsoft Visual Basic 2015 CHAPTER ONE Introduction to Visual Basic 2015 Programming.
© 2012 IBM Corporation IBM Worklight Overview Martin Triska – IBM Worklight specialist (420) July 2012.
COMPARING CROSS-PLATFORM DEVELOPMENT APPROACHES FOR MOBILE APPLICATIONS Henning Heitkötter, Sebastian Hanschke and Tim A. Majchrzak Department of Information.
INTRODUCING HYBRID APP KAU with MICT PARK IT COMPANIES Supported by KOICA
About Inwizards Inwizards is a highly structured, performance oriented and customer centric organization. In Inwizards we follow the concept of development.
Opinionmeter International, Ltd OPMETER Real-time Customer Feedback Tools for achieving Quality Improvement and Service Excellence.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Enhanced Car Payment Calculator Application Introducing Exception Handling.
Introduction to Xamarin C# Everywhere
Xamarin for Visual Studio Enterprise
ET-570 Smart Phone Apps.
Xamarin Studio Xamarin Curriculum for Xamarin Studio
Mobile DevOps Donovan Microsoft 2016
Week 01 Comp 7780 – Class Overview.
1.1. .NET architectural components and .NET Core
Dev Test on Windows Azure Solution in a Box
DotnetConf 11/14/2018 3:27 AM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE.
Chapter 9: IOS Images and Licensing
Design and Programming
CIS16 Application Development – Programming with Visual Basic
Software visualization and analysis tool box
Focus of the Course Object-Oriented Software Development
Presentation transcript:

Testing Cross-Platform Mobile App Development Frameworks Nader Boushehrinejadmoradi, Vinod Ganapathy, Santosh Nagarakatte, Liviu Iftode Department of Computer Science, Rutgers University ASE 2015

The Growing App Market A steady growth on the amount of time users spend on mobile devices By targeting multiple platforms developers can reach a larger audience 2

App Developer Distribution There are a large number of mobile developers  Many of these developers are small teams/individuals Most developers focus on one mobile platform  Why is that? 3 Image source: store/

Conventional Cross-Platform Mobile Development Porting and maintaining code is costly  Different languages  Different APIs  Different tools 4

Mobile App Development with Cross- Platform Frameworks 5 Host Language Cross-Platform Framework

An Overview of Cross-Platform Frameworks Write code once, run on multiple platforms  Reduce development costs  Save development time  Reach a larger market Can be divided into 2 types  Hybrid  Native 6

An Overview of Cross-Platform Frameworks Write code once, run on multiple platforms  Reduce development costs  Save development time  Reach a larger market Can be divided into 2 types  Hybrid  Native 7

Xamarin at a Glance 8

Observation A growing demand exists for cross-platform frameworks  Ease developing new apps  Simplify porting of existing apps The framework has to correctly translate code to platforms that are different in many aspects  Can inconsistencies occur in translation? 9

Example: Apps are not Always Consistent A call to DateTime.Now.ToString() is made to display current time Inconsistency in translating this method call to the target platform 10

Insight By design, Cross-platform frameworks strive to provide consistent behavior across all targeted platforms Leverage this design assumption to automate bug finding  Help developers to detect and fix bugs earlier  Customers gets access to a more consistent framework 11

X-Checker: Cross-platform Test Tool 12 Shared API Library Test Case Generator Compare Results

X-Checker A tool that automatically tests cross-platform mobile frameworks:  Generate randomized test cases to run on different mobile platforms  Detect inconsistencies in framework by comparing test results in different platforms 13

Test Case Generator A Test case is a sequence of valid method calls  Run generated sequences on one platform  Iteratively extend valid code sequences  Based on Randoop [Pacheho et al]  Use all valid test cases 14

X-Checker Uses Differential Testing A Cross platform framework is a good candidate to apply differential testing [McKeeman]  Differential testing requires that two or more comparable systems be available to the tester  Present the systems with a series of generated test cases  Observe the results. if they differ, we have found a bug-exposing test case Differential testing will not generate false positives 15

Testing Considerations Need to ensure applications run on target platforms Keep UI as simple as possible Ensure a unified initial state across platform at the start of the test 16

Detecting Inconsistencies Apps are run on their respective platform  Test case either returns successfully or throws an exception  Serialize test case state to detect inconsistencies across platforms The test case result can either be similar on all platforms or lead to one of three types of inconsistencies 17

Inconsistency Type I 18 public static int TestMain( FileIO serialStream, FileIO logStream){ try{ //Simple test case which runs to completion on both platforms Complex b = new Complex(0,0); Complex exp = new Complex(1,0); Complex res = Complex.Pow(b,exp); //Serialize objects serialStream.appendToLog(b.GetType.FullName, serializer.serialize(b)); … return 0; } catch (System.Exception e){ //Not reached in this test case … return -1; } Test Case Android app Windows phone app State Windows Phone 8.1: res = 0 Android: res = NAN

Inconsistency Type 2 19 Windows Phone 8.1: ArgumentOutOfRangeException Android: IndexOutOfRangeException public static int TestMain( FileIO serialStream, FileIO logStream){ try{ //Simple test case which leads to different exception string s = "test"; int index = -1; double val = CharUnicodeInfo.GetNumericValue(s,index); //Not reached in this test case … return 0; } catch (System.Exception e){ //Each return different exceptions logStream(e.GetType().FullName); return -1; } Test Case Android app Windows phone app Exception

Inconsistency Type 3 20 public static int TestMain( FileIO serialStream, FileIO logStream){ try{ //Test case which leads to an exception on one platform NameTable nt1 = new NameTable(); NameTable nt2 = new NameTable(); XmlNamespaceManager nsMgr = new XmlNamespaceManager(nt2); … XmlParserContext xpctxt = new XmlParserContext(nt1, nsMgr, …); //Not reached on Windows Phone … return 0; } catch (System.Exception e){ //Each return different exceptions logStream(e.GetType().FullName); return -1; } Windows Phone 8.1: XmlException Android: No exception is thrown Test Case Android app Windows phone app Success Exception

Implementation Test case generation: Randoop Cross-platform framework: Xamarin Object serializer: Json.net 21

22

Results Discovered 47 Unique inconsistencies 14 inconsistencies were fixed after being reported  Most fixes were made within 1-2 weeks of the report 23

Discussion Duplicate inconsistencies and false positives  Test Cases with type 1 inconsistency can have duplicates  Flaky test cases introduce false postives  Filtering is used to remove duplicates and false positives Not all inconsistencies are bugs  Documented deviations of behavior Object.GetHashCode() System.UriBuilder Constructor(String)  Undocumented deviations known to developers XmlDictionaryReader.ReadContentAsString() 24 “… Furthermore, the.NET Framework does not guarantee the default implementation of theGetHashCode method, and the value this method returns may differ between.NET Framework versions and platforms, such as 32-bit and 64-bit platforms…” “In the.NET for Windows Store apps or the, catch the base class exception, FormatException, instead.”.NET for Windows Store appsFormatException

Summary 25

Backup Slides 26

Filtering Use filtering to eliminate problematic API calls 27

Structure of a Cross-platform Application Applications are broken down into 2 parts  Platform specific code  Shared Code 28