Upgrade to Pro — share decks privately, control downloads, hide ads and more …

"Developing BDD cross-platform mobile automatio...

"Developing BDD cross-platform mobile automation tests" from Igor Rozdobudko

Igor presents how BDD test methodology helps in development of mobile apps with a great quality. How to make cross-platform BDD automation tests quickly and painlessly. Where the start point in automation, which tools to use and how to avoid common errors. As well, I'll show a short demo where we will create a simple test together.

uaMobiTech

July 29, 2016
Tweet

More Decks by uaMobiTech

Other Decks in Programming

Transcript

  1. What do we expect from automation? • Easy to start

    writing tests for QA. • Less think about test code – more think about feature to test. • Clear test scenarios for all team members (Business, PM, Dev, QA) • Easily can be run on multiple devices. (iOS & Android) • Save time for testing. Less fix tests because of automation. • Makes us HAPPY!
  2. Calabash Interactions Actions: touch, swipe, scroll, set_text, double_tap... Waiters: wait_for_element_exists,

    wait_for_activity, wait_for_error etc. Assertions: check_element_exists, check_element_doesnot_exist, check_view_with_mark_exists
  3. Ruby package com.mkyong.io; import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; public

    class BufferedReaderExample { public static void main(String[] args) { BufferedReader br = null; try { String sCurrentLine; br = new BufferedReader(new FileReader("C:\\testing.txt")); while ((sCurrentLine = br.readLine()) != null) { System.out.println(sCurrentLine); } } catch (IOException e) { e.printStackTrace(); } finally { try { if (br != null)br.close(); } catch (IOException ex) { ex.printStackTrace(); } } } } JAVA Read File Example: Ruby Read File Example: puts File.read(file_name)
  4. Project structure Feature: Select date Scenario: I can change year

    Given Calendar is opened to choose a date When I choose year to change And I scroll up Then I don't see "2017" Given(/^Calendar is opened to choose a date$/) do @current_screen = page(FirstScreen) @current_screen.open_calendar @current_screen = page(CalendarScreen) end When(/^I choose (day|year) to change$/) do |arg| @current_screen.send("choose_#{arg}_menu") end class CalendarScreen < BaseScreen ... def choose_year_menu touch LCTRS.first_screen.date_picker_menu.year_date_picker end ... end ANDROID first_screen: date_picker: "android.widget.TextView id:'dataPickerTextView'" rate_picker: "android.widget.EditText id:'ratePIckerEditText'" IOS first_screen: date_picker: "datePicker'" rate_picker: "ratePicker'"