calabash - practicalsqa.net · selenium 1.0 + webdriver = selenium 2.0 webdriver is designed in a...

21
Calabash Calabash enables you to write and execute automated acceptance tests of mobile apps. Calabash is cross-platform, supporting Android and iOS native apps. It is open source and free, and has a company, Xamarin, backing and developing it. With Xamarin Test Cloud you can automatically test your app on hundreds of mobile devices. Calabash consists of libraries that enable test-code to programmatically interact with native and hybrid apps. The interaction consists of a number of end-user actions. Each action can be one of Gestures Touches or gestures (e.g., tap, swipe and rotate).

Upload: others

Post on 23-May-2020

21 views

Category:

Documents


0 download

TRANSCRIPT

Calabash

Calabash enables you to write and execute automated acceptance tests of mobile apps. Calabash is cross-platform, supporting Android and iOS native apps. It is open source and free, and has a company, Xamarin, backing and developing it.

With Xamarin Test Cloud you can automatically test your app on hundreds of mobile devices.

Calabash consists of libraries that enable test-code to programmatically interact with native and hybrid apps. The interaction consists of a number of end-user actions. Each action can be one of

Gestures

Touches or gestures (e.g., tap, swipe and rotate).

Calabash

● Assertions

For example: there should be a "Login" button or the web view should contain an "<h1>" element with the text "Hello".

● Screenshots

screendump the current view on the current device model

Calabash

● Calabash could be compared to Selenium WebDriver. However, it is important to realize that interacting with a web app from a desktop computer is vastly different than interacting with a native app using a touch screen. Calabash provides APIs that are specialized to native apps running on touch screen devices

CUCUMBER

Calabash supports Cucumber. Cucumber lets us express the behavior of our app using natural language that can be understood by business experts and non-technical QA staff.

Although focus on Cucumber, Calabash can be used to write automated functional and acceptance tests using any Ruby-based test framework, C# and JVM-based languages will be supported too

OVERVIEW

● Calabash iOS consists of two parts: a client library written in Ruby, and calabash.framework, a server framework written in Objective-C (a Clojure/JVM version of the client is coming too). To use calabash you make a special test target in XCode that links with calabash.framework. The application is otherwise unchanged. The server framework will start an HTTP server inside your app that listens for requests from the client library.

Overview: How it works

● The cucumber tool executes your feature files which contain steps that are defined either in predefined or custom (user defined) steps definitions. Custom steps are written using the API that the client library exposes. The API methods make HTTP requests to the server, which does things like finding components in the UI and taking actions on them. Here is an illustration:

Overview: How it works

● The cucumber tool executes your feature files which contain steps that are defined either in predefined or custom (user defined) steps definitions. Custom steps are written using the API that the client library exposes. The API methods make HTTP requests to the server, which does things like finding components in the UI and taking actions on them. Here is an illustration:

Overview: How it works

● The cucumber tool executes your feature files which contain steps that are defined either in predefined or custom (user defined) steps definitions. Custom steps are written using the API that the client library exposes. The API methods make HTTP requests to the server, which does things like finding components in the UI and taking actions on them. Here is an illustration:

Overview: How it works

Selenium WebDriver

● The biggest change in Selenium recently has been the inclusion of the WebDriver API. Driving a browser natively as a user would either locally or on a remote machine using the Selenium Server it marks a leap forward in terms of browser automation.

● Selenium WebDriver fits in the same role as RC did, and has incorporated the original 1.x bindings. It refers to both the language bindings and the implementations of the individual browser controlling code. This is commonly referred to as just "WebDriver" or sometimes as Selenium 2.

Selenium WebDriver 2

● Selenium 1.0 + WebDriver = Selenium 2.0

● WebDriver is designed in a simpler and more concise programming interface along with addressing some limitations in the Selenium-RC API.

● WebDriver is a compact Object Oriented API when compared to Selenium1.0

● It drives the browser much more effectively and over comes the limitations of Selenium 1.x which affected our functional test coverage, like the file upload or download, pop-ups and dialogs barrier

● WebDriver overcomes the limitation of Selenium Rc's Single Host origin policy

Selenium WebDriver 3

● WebDriver is the name of the key interface against which tests should be written in Java, the implementing classes one should use are listed as below:

● AndroidDriver, ChromeDriver, FirefoxDriver, HtmlUnitDriver, InternetExplorerDriver, SafariDriver

Differences in between IDE, RC WD

How to install ADT

● Download the ADT Bundle for Machttps://developer.android.com/sdk/index.html

● Set up according to the instructionshttps://developer.android.com/sdk/installing/bundle.html

● Go to the directory where you installed the ADT● Adb is located in <your-directory>/sdk/platform-

tools/

How to install ADT

● Download the ADT from https://developer.android.com/sdk/index.html(pick the appropriate version – almost certainly 64-bit Windows)

● Set up according to instructions herehttps://developer.android.com/sdk/installing/bundle.html

● ADB is located in <yourdirectory>\sdk\platform-tools

Using ADB to get logs

● Connect your device● Run “adb devices” and make sure your device

shows up● Run “adb logcat -c” to clear logs● Run “adb logcat” to see the logs as they're

being generated● You can redirect to create log dumps on disk,

i.e. “adb logcat >amazing_bug.txt”

Questions

● What would be the best way to do negative testing for any native/hybrid app?

● How would you approach mobile testing if you see the app for the first time

● How would you approach functional testing for mobile app?

● Based on your experience what the most common issues mobile apps have?

Questions

● 1. What kind of person would you refuse to work with?

● 2. Tell me about your dream job.● 3. What is more important to you: the money or

the work?● 4. What would your previous supervisor say

your strongest point is?● 5. Tell me about a problem you had with a

supervisor

Answers

● 1. Do not be trivial. It would take disloyalty to the organization,

violence or lawbreaking to get you to object. Minor objections will

label you as a whiner.

● 2. Stay away from a specific job. You cannot win. If you say the job you

are contending for is it, you strain credibility. If you say another

job is it, you plant the suspicion that you will be dissatisfied with

this position if hired. The best is to stay genetic and say something

like: A job where I love the work, like the people, can contribute and

can’t wait to get to work.

Answers

● 3. Money is always important, but the work is the most important. There is no better answer.

● 4. There are numerous good possibilities:

Loyalty, Energy, Positive attitude, Leadership, Team player, Expertise,Initiative, Patience, Hard work, Creativity, Problem solver

● 5. Biggest trap of all. This is a test to see if you will speak ill of your boss. If you fall for it and tell about a problem with a former boss, you may well below the interview right there. Stay positive anddevelop a poor memory about any trouble with a supervisor.