Calabash Structure Andrew Reed. File Structure Config/ o cucumber.yml Features/ o android/ o ios/ o playback/ o step_definitions/ o support/ o *.feature.

Slides:



Advertisements
Similar presentations
Introduction to Settings WEAVE: Assessment on Your Own Terms.
Advertisements

Service and Dispatch Updates Presented by: Derek Kratz.
Ranorex Appium Calabash
COMPUTER PROGRAMMING Task 1 LEVEL 6 PROGRAMMING: Be able to use a text based language like Python and JavaScript & correctly use procedures and functions.
© Paradigm Publishing, Inc Excel 2013 Level 2 Unit 2Managing and Integrating Data and the Excel Environment Chapter 7Automating Repetitive Tasks.
Galileo One Stop Shop Somerton PD Department. OBJECTIVES  Log in/out and navigating Galileo  Learn how to access reports  Review assessment results.
Student Manager Catalog Builder An ACEware Webinar.
Schools Module Introduction Press F5 to maximise this presentation.
CUSTOMIZING VQC Apr-17 N10 (CATEGORY) (NAME SLOTS) N11 (TEMPLATE)
1 Software Requirement Analysis Deployment Package for the Basic Profile Version 0.1, January 11th 2008.
Customizing Outlook. Forms Window in which you enter and view information in Outlook Outlook Form Designer The environment in which you create and customize.
1 Introduction to the Visual Studio.NET IDE Powerpoint slides modified from Deitel & Deitel.
By Ms.A.C.Sumathi AP(SG)/ Dept of CSE SNS College of Engineering, CBE.
EASY TEAM MANAGER By Dave Abineri EASYWARE: PO Box 231, Milford, OHIO (Cincinnati) Phone: (513) Use UP arrow to move to the NEXT slide Use.
Jennifer O’Donnell EDUC 681 Survey of Instructional Technology Applications Adobe Captivate.
COMPREHENSIVE Excel Tutorial 8 Developing an Excel Application.
Enhanced Shipping & Handling A Feature of D-Plus An Enhancement For iSeries 400 DMAS from  Copyright I/O International, 2005 Skip Intro.
Three-tier Mobile Application Testing Framework:
Case Submittal Best Practice
SqlReports Dean Dahlvang PSUG-MO March About Dean Dean Dahlvang Director of Administrative Technology for the Proctor.
Spreadsheets in Finance and Forecasting Presentation 8: Problem Solving.
Microsoft Excel 2007 © Wiley Publishing All Rights Reserved. The L Line The Express Line to Learning L Line.
10-1 aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf.
CHAPTER 9 Introducing Microsoft Office Learning Objectives Start Office programs and explore common elements Use the Ribbon Work with files Use.
Microsoft Access Get a green book. Page AC 2 Define Access Define database.
Clearly Visual Basic: Programming with Visual Basic 2008 Chapter 4 I Need a Tour Guide.
Chapter 8 Collecting Data with Forms. Chapter 8 Lessons Introduction 1.Plan and create a form 2.Edit and format a form 3.Work with form objects 4.Test.
In This Presentation Instructors using Pearson AP & Elective Courses will Receive: Step by step instructions for product initial registration Instruction.
Preparing and Deploying Data to ArcPad Juan Luera.
QAD.NET UI – Configured Screens Stacy Elwood Green, BravePoint MWUG September 2011.
Chapter 7 File I/O 1. File, Record & Field 2 The file is just a chunk of disk space set aside for data and given a name. The computer has no idea what.
Software Development Process.  You should already know that any computer system is made up of hardware and software.  The term hardware is fairly easy.
Databases. What is a database?  A database is used to store data. The word DATA is actually Latin for FACTS. A database is, therefore, a place, or thing.
9/2/ CS171 -Math & Computer Science Department at Emory University.
Creating an Example Android App in Android Studio Activity lifecycle & UI Resources.
Chapter 2 – Introduction to the Visual Studio .NET IDE
Graphical Enablement In this presentation… –What is graphical enablement? –Introduction to newlook dialogs and tools used to graphical enable System i.
Database Management Systems (DBMS)
] COREY PEARSON [ ASUG INSTALLATION MEMBER MEMBER SINCE: 2008 CHAVONE JACOBS [ ASUG INSTALLATION MEMBER MEMBER SINCE: 2003 ALLAN FISHER [ ASUG INSTALLATION.
Why use it? o Makes your life easier constructing interactive web games and puzzles. o Quick and painless o Excellent learning tool, fun and interactive.
Support.ebsco.com The EBSCOhost Android Application Tutorial.
Support.ebsco.com The EBSCOhost iPhone Application Tutorial.
Computing Fundamentals Module Lesson 7 — The Windows Operating System Computer Literacy BASICS.
TURN YOUR POWERPOINT INTO A MOVIE USING PHOTOSTORY.
Programming in java Packages Access Protection Importing packages Java program structure Interfaces Why interface Defining interface Accessing impln thru.
THE WINDOWS OPERATING SYSTEM Computer Basics 1.2.
Perfecto Mobile Automation
Registration and Eligibility Checklist Set Up in OPEN Diana Meyer OPEN Administrator.
Students will go to In the top right hand corner the student will type in their package code in the box that says “Place.
3M Partners and Suppliers Click to edit Master title style USER GUIDE Supplier eInvoicing USER GUIDE The 3M beX environment: Day-to-day use.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
Portal Construction 301. Where We Are In Portal Construction 101and 201 we created a Group Profile in the local system and uploaded to our Web Reservation.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Portal v2.6 Service Pack 1 Update. 2 Portal v2.6 Service Pack 1 6/27/2016 ©2007 GE Fanuc Intelligent Platforms All Rights Reserved Portal v2.6 Service.
© 2013 IBM Corporation IBM UrbanCode Deploy v6.0 Support Enablement Training Jenkins plug-in 1 November 2013.
THE NEW MOBILE WORKSPACE Enable Business Applications on Mobile Devices hopTo Work “I am amazed to see how easily hopTo transforms the user interface of.
Chapter 2: The Visual Studio .NET Development Environment
Chapter 2 Starting a Project
The EBSCOhost iPhone Application
Chapter 2 – Introduction to the Visual Studio .NET IDE
MAD.
Microsoft Excel A Spreadsheet Program.
Ready 4 Kindergarten: Maryland’s Early Childhood Comprehensive Assessment System Kindergarten Readiness Assessment App.
This is the cover slide..
The EBSCOhost iPhone Application
Automation with Gwen Introduction.
Put the title here Here is the sub-title.
Put the title here Here is the sub-title.
StageNow Workstation AirWatch Device Administrator Enrollment Profile
Ready for Kindergarten: Ohio’s Early Childhood Comprehensive Assessment System Kindergarten Readiness Assessment App.
Presentation transcript:

Calabash Structure Andrew Reed

File Structure Config/ o cucumber.yml Features/ o android/ o ios/ o playback/ o step_definitions/ o support/ o *.feature files

Config In the config directory we have a single configuration file(cucumber.yml) The file contains the configuration/commands needed to run the tests for all platforms(android, ios). So when we run the command to execute the tests: Then we can specify what format/profile to use, it may become apparent to run different methods for iPad and iPhone, or even OS versions. We can do this by adding the cucumber.yml file and adding a new profile with the required params.

Features This directory contains all the features,tests and how they run. More importantly this folder contains the.feature files which contains the BBD Gherkin formatted instructions.

.Feature Files All feature files must have a “Feature:” title, then an optional “Background:” and a mandatory “Scenario:” Feature: Should be the feature name(can include description of the feature in general). Background: Used at the start of every scenario to get to the point in the app where the feature is. e.g. Listings feature, so background logs into the app and gets to the listings grid. Scenario: The scenario you require to test, should be named exactly what it is testing.

Platform Folders(ios/ android/) The platform folders contain sub directories that are platform specific items. These items can identify views, helper methods and any pre-launch methods required. Helpers Pages Support

Platform Folder/Helpers The Helper folder is to contain Ruby files which are solely for platform specific methods. A good example is entering text into a textfield will be different in ios as it is to Android. Here is the ios specific helper method:

Platform Folder/Pages The pages folder contains files which represent view controllers in our application. These “page” files are used to ensure that the test is on the correct screen(“page”). To do this, simply we define a trait that is unique to the page. In most cases it will be the main view with an accessibility label set to the name of the view controller.

PlatformFolder/Support The support file is used to handle the before and after running of scenarios. We can change this file so that the app is reinstalled after every scenario.

Playback This folder contains actions that recorded in the calabash console. These actions are then referenced in the feature file which in turn performs the recorded action. This playback function is handy for scenarios where we need to move a cell in a tableview.

Step Definitions The step definitions contains the ruby files which map to the BDD written in the.feature files. Take note that Calabash have their own default steps and we should use these where needed, if we have a more custom scenario then use/create a file in the folder page_name_steps.rb, if its a step used in many pages then put this in the general_steps.rb The default steps can be referenced here: Predefined-steps

General_Steps.rb In the general steps file, we should have methods that are generic and used in multiple pages. A good example is being able to scroll a view in a direction. So this method will run the find_and_scroll_view method which exists in the platform/helpers/utils.rb file. This means that when we scroll in android or ios it will work. Not only will it work on any format, but also will work with any BDD that matches the cases e.g. Then I should scroll right on the listingsView Then I should scroll up on the discoveryView Both these BDD steps will run exactly the same code!

Support This is the root support folder, which contains non-platform specific actions/operations. The env.rb file defines a variable of runstate, this variable is used in the platform specific support folder called 01_launch.rb So as a quick breakdown, the platform specific support file handles the actual launch, but the general status(runstate) is held at a higher generic level in the root support folder, this means we can create a 01_launch.rb in the support folder for android and ios which contains their own way of starting the simulator/emulators to run the app. In addition to this, the support folder contains entry points for pages, this is explained in detail in the next slide.

Entry_Points.rb The entry points file contains the generic methods used for pages. In the screenshot, you can see the await method is a commonly used method for all pages. It lives in the entry points file because all pages use it. In the instance of a page using a custom method, then you must create a file pagename_entry_points.rb this file will contain that method. An example of a custom method could be a method that checks the listings grid for a cell.

Execution Structure.featurestep_definitions/ platform/helpers support/ platform/p ages 1. Feature file is broken down and mapped to a step_definition, this can also be the default calabash step_definitions 2. Step definitions then run ruby code from either the platform/helpers files or the specific page methods e.g. Listings.ScrollGrid 3. Platform specific methods which should be interaction with platform specific elements(UIAlertView). 4. The page file contains the trait and any page specific methods. e.g. ScrollGrid for listings. 5. A page can call generic methods in the helpers file. You should expect to see the page methods call several methods of the helper file.

Quiz Questions 1: What is a step definition? 2: Why should I use a page file? and when? 3: If i want to make a view scroll, how would i do this? 4: What does the “background” text do when in a feature file?

Quiz Answers 1: A step definition represents the binding between the BDD Gherkin and the ruby method needed to run. 2: Page files are ruby files that represent the unique views in the application, they should be used to ensure that a feature is on the correct screen and to run any view specific methods. We should try to use page files when there is key functionality to be tested on a page, the methods in the page file should be used to complete actions on the unique element, e.g. Scroll the listings grid up, down, left and right. Or another example, jump to tomorrow in the grid. 3: If the view is fairly generic, you can achieve this by running the find_and_scroll_view method in the helpers folder. If you want to complete more complex scrolling, say more than one type of scroll then you should create a page file and call the scrolling method several times from there. 4: The background element to a feature file is the steps ran before every scenario in that feature file, we need to this because the application will be reinstalled and re-run after each scenario. A good example would be testing the listings grid functionality, so when we run the feature, the background method logs the application in and then proceeds to present the listings page, the scenario can then concentrate on only testing listings functionality.