Top Ads

Font Banner - Free Fonts

Appium - Run First Android Automation Test Using In Eclipse - Software Testing Tutorials

Download Appium - Run First Android Automation Test Using In Eclipse - Software Testing Tutorials graphic type that can be scaled to use with the Silhouette Cameo or Cricut. An SVG's size can be increased or decreased without a loss of quality. All of our downloads include an image, Silhouette file, and SVG file. It should be everything you need for your next project. Our SVG files can be used on adhesive vinyl, heat transfer and t-shirt vinyl, or any other cutting surface

We have configured appium project in eclipse during previous post. Now we are all set to create and run first appium software automation test script on android mobile device. In this steps we will learn how to create first appium automation softwre test script in eclipse and then run it in real android mobile device.


PREREQUISITE : All previous 12 STEPS should be completed without any error.

We will use android mobile phone's default installed calculator app to run appium software automation test script. You can download Android Calculator software App from THIS PAGE if it is not installed in your mobile. This is our first appium software test so we will create simple test to sum two numbers. Follow the steps given bellow.

1. Gather Required Capabilities
Before creating appium test for android software app, You need bellow given parameters of android device and app to set webdriver capabilities in test script.
  1. Find Android Device Name : As described in THIS POST, Connect your android device with PC and get device name by running adb devices command in command prompt. My android device name Is : ZX1B32FFXF. Find your device name.
  2. Find Android Software App Package Name : You can view THIS POST to know how to get android app package name. Package name for my calculator app (Which Is Installed in my android device) is com.android.calculator2. Find your app package name.
  3. Find App Activity Name : You can view THIS POST to know how to get android app activity name. Activity name for my calculator app (Which Is Installed in my android device) is com.android.calculator2.Calculator. Find your app activity name.
  4. Find Android OS Version : In your android device, Open settings -> About phone -> Android version. My device's Android version Is : 4.4.2.
2. Launch And Start Appium Node Server
Appium should be installed and configured and also you need Server Address and Port number (which is used by appium) as described in THIS POST.

Launch Appium
  • Launch Appium from Windows Start menu.


  • For me, Server Address is : 127.0.0.1 and Port Number is : 4723.
Start Appium Node Server
Click on Start button to start appium node server as shown in bellow image. It will take some time to launch node server.

Note : You can consider appium node server is started properly once it shows log as shown in above image.

3. Create Appium Test Script In Eclipse
I have created sample appium software test script using selenium webdriver to sum two numbers using android calculator application.

Prerequisite :
  • Calculator app should be installed in your android device.
  • Install TestNG in eclipse if it is not installed. View THIS POST.
  • Also replace capabilities values of bellow given list with your own values in script. Otherwise it will not works.
  1. deviceName - Name of device which is connected with PC.
  2. CapabilityType.VERSION - OS version of your android device.
  3. appPackage - Calculator app's Package name.
  4. appActivity - Calculator app's Activity name.
Now create bellow given test class under Android package of your appium project. Usage of each code syntax is given in script itself.

SimpleAndroidCalcTest.java
package Android;

import java.net.MalformedURLException;
import java.net.URL;
import java.util.concurrent.TimeUnit;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.remote.CapabilityType;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;

public class SimpleAndroidCalcTest {

WebDriver driver;

@BeforeTest
public void setUp() throws MalformedURLException {
// Created object of DesiredCapabilities class.
DesiredCapabilities capabilities = new DesiredCapabilities();

// Set android deviceName desired capability. Set your device name.
capabilities.setCapability("deviceName", "ZX1B32FFXF");

// Set BROWSER_NAME desired capability. It's Android in our case here.
capabilities.setCapability(CapabilityType.BROWSER_NAME, "Android");

// Set android VERSION desired capability. Set your mobile device's OS version.
capabilities.setCapability(CapabilityType.VERSION, "4.4.2");

// Set android platformName desired capability. It's Android in our case here.
capabilities.setCapability("platformName", "Android");

// Set android appPackage desired capability. It is
// com.android.calculator2 for calculator application.
// Set your application's appPackage if you are using any other app.

capabilities.setCapability("appPackage", "com.android.calculator2");

// Set android appActivity desired capability. It is
// com.android.calculator2.Calculator for calculator application.
// Set your application's appPackage if you are using any other app.

capabilities.setCapability("appActivity", "com.android.calculator2.Calculator");

// Created object of RemoteWebDriver will all set capabilities.
// Set appium server address and port number in URL string.
// It will launch calculator app in android device.

driver = new RemoteWebDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);
}

@Test
public void Sum() {
// Click on DELETE/CLR button to clear result text box before running test.
driver.findElements(By.xpath("//android.widget.Button")).get(0).click();

// Click on number 2 button.
driver.findElement(By.name("2")).click();

// Click on + button.
driver.findElement(By.name("+")).click();

// Click on number 5 button.
driver.findElement(By.name("5")).click();

// Click on = button.
driver.findElement(By.name("=")).click();

// Get result from result text box.
String result = driver.findElement(By.className("android.widget.EditText")).getText();
System.out.println("Number sum result is : " + result);

}

@AfterTest
public void End() {
driver.quit();
}
}

Note : Before running above script using testng, Please make sure your android device is connected with PC with USB debugging mode enabled and Appiun node server is launched and started.

4. Running  Appium Test Script 
I hope you already know how to run software test script using testng (VIEW EXAMPLE). Run above test script and view your android phone screen. It will 
  • Open calculator app in your mobile device.
  • Tap on buttons in this sequence -> CLR, 2, +, 5 and =.
  • Get result from text area of calculator app.
  • Print result in eclipse console.
This way, We have executed very simple test script in android mobile device. If you have noticed in above example test script, We have used only name locator. We will use all different element locators (Which are described in THIS POST) in upcoming examples.

Download Appium - Run First Android Automation Test Using In Eclipse - Software Testing Tutorials All SVG file downloads also come bundled with DXF, PNG, and EPS file formats. All designs come with a small business commercial license. These SVG cut files are great for use with Silhouette Cameo or Cricut and other Machine Tools.

LihatTutupKomentar

SVG by Keywords

A Sample Java Program Accounting adab berbusana muslimah Administrasi Dan Layanan Administrasi Perkantoran adminstrasi Advanced VBScript Advantages of Automated Testing Advantages of Java Advantages of Manual Testing Advantages of Selenium Advantages of Test Automation Advantages of TestNG Aksi Indosiar Akuntansi Alamat Alamat Perusahaan alamat pt Ancol ANDROID_HOME AndroidDriver aneka kerudung Appium Appium Android Examples Appium FAQ Appium Fundamentals Appium Interview Questions Appium Interview Questions and Answers Appium Questions Appium Tutorial Appium Tutorials Application Environments supported by Selenium Arrays in Java Artikel Kesehatan astra aurat aurat wanita Automated Test Process baju pengantin muslimah Bali Bander Bandung Bank Bank Dan Keuangan Banking Domain knowledge for Testers Bantar Gebang Banten Batch Testing in Selenium Batch Testing with Selenium Bawang Putih Bayi Begadang Bekasi Benefits of Test Automation Benefits of TestNG BIIE bisnis BKK Black Box Techniques Bogor Boleh atau Tidak Boundary value analysis Broadcast Browser Compatibility Testing with Selenium Browsers supported by Selenium buah Buah Untuk Diabetes Buah-Buahan bug Bug Tracking Tool Bugzilla Bukit Indah Bulan Ini BUMN BUMN Dan CPNS 2015 busana di dalam al-qur'an busana kerja busana model kebaya busana muslimah c data types C FAQ C Language Basics C language Constants C Language FAQ C Language Functions C Language Fundamentals C Language Interview Questions C Language Interview Questions and Answers C Language Pointers C Language Questions C Language Tokens c Language tutorial C Language Tutorial for Beginners C Language Variables C Programming Fundamentals Cakung Call Center cantik alami cantik hati cantik mudah dan murah cara memakai jilbab cara sehat Cari Lowongan Kerja Di Cikarang Choose Selenium Tools Chrome Browser Driver Cianjur Cibinong cibitung Cibubur Cikampek cikarang Cikokol Cikupa Cilegon Cileungsi Cilincing Ciracas Cirebon Comments in Java Comments in VBScript Compare data using VbScript Configure Selenium Cook Core Java Tutorial Core Java Videos Cross Browser Testing using Selenium Cross Browser Testing using Selenium WebDriver Cucumber customer Service D Academy 3 D Academy Celebrity D1 D3 D4 Daftar Lowongan Kerja Cikarang Data comparisons Data Driven Framework in Selenium Data driven testing in UFT Data driven testing using excel Data driven testing using TestNG DataProvider Data Driven Testing with Selenium Database Test Cases Database Test scenarios Database Testing Checklist Database Testing in Selenium Database Testing Tutorial Debugging Tests in UFT Decision Tables Defect Management Tools Defect Report Defect Reporting and Tracking. Delta Mas Delta Silicon Delta silicone deltamas Denpasar Depok Design Grafis Designer Detoks Diabetes Insipidus Diabetes Saat Kehamilan Diet Disadvantages of Manual Testing Disadvantages of Selenium Disadvantages of Test Automation DKI Jakarta Domain knowledge for Software Testers Drawbacks of Automated Testing Drawbacks of Manual Testing Drawbacks of selenium Drawbacks of Selenium IDE Driver Eclipse IDE Download ejip Elektronik Element handling in Selenium Element Handling Selenium WebDriver element locators Element locators in selenium Elements handling in Selenium email email hrd email PT Endurance testing Enginering Equivalence partitioning ERP Domain Knowledge for testers Error handling in UFT Error handling in VBScript Euro 2016 event Excel file handling in VBScript Exception handling in Java Experience based Techniques Farmasi File Handling in Java File handling in vbscript Firebug Firepath Flu foto muslimah cantik Functional and Regression Test Tools Functional test tools Functional Testing Checklist fungsi busana Games gamis Garmen gaun pengantin modern Gaya Hidup gaya hidup sehat Gejala Diabetes gigi GIIC Gobel Greenland Grogol Grouping test cases Grouping Test Cases in TestNG Gudang Gunung Putri hamil sehat Handle Frames Handle Mouse hover Handle multiple browsers in Selenium Handling Browser in Selenium Handling Web Elements in Selenium Harapan Indah Helper hikmah berbusana muslimah Hipertensi HP UFT Tutorial for beginners hrd dan industri hyundai Ibu Hamil Iklan Lowongan Kerja Indotaise Industri informasi Informasi Kesehatan Informatika inner beauty Inspect Elements Inspirasi Kesehatan Install TestNG Insurance Domain Knowledge for testers Internasional Internet Explorer Driver Interview Questions on Selenium Fundamentals Interview questions on Selenium Test process Introduction to Functional Testing Introduction to Java Introduction to Selenium Introduction to Selenium Webdriver jababeka jabodetabek jakarta Jakarta Barat jakarta pusat Jakarta Selatan jakarta Timur jakarta Utara Jakasampurna Jantung Jatake Jati Uwung Jatinegara Java Java Abstraction Java Array methods Java Arrays Java Basics Java built in methods Java Built-in Methods Java character methods Java Code Example Java conditional statements java data types Java download and install Java Encapsulation Java Environment setup Java Exception Handling Java FAQ Java File class java flow control Java for selenium Java for Selenium Interview Questions and Answers Java for Selenium Videos Java fundamentals Java Fundamentals and OOPS Java Guide Java Inheritance Java Input and Output Java input output operations Java Interfaces Java Interview Java Interview Questions Java Introduction Java IO Java Loop statements Java Methods Java Modifiers Java Number methods Java Object Oriented Programming Java OOPS Java OOPS concepts Java Operators Java Polymorphism Java Program Example Java Program structure Java programming for Selenium Java Programming for Test Automation Java Programming fundamentals Java Questions and Answers Java Static Methods Java String methods Java strings java syntax Java Syntax Rules Java tutorial Java Tutorial for Beginners Java tutorial for selenium java tutorials for webdriver Java user defined methods Java Variables Java Video tutorials Java videos for Selenium Jawa Barat Jawa Tengah Jawa Timur jenis jilbab jenis kain JIEP jira Job Fair JUnit Kalijaya Kalimantan Kanker Karanganyar karawang Kasir Kawasan Industri Kebayoran Baru Kebon Jeruk kecantikan kecantikan alami kecantikan hati kecantikan kulit kecantikan wajah Kedunghalang Kementerian Kesehatan Kesehatan Anak Kesehatan Dan Kecantikan Kesehatan Gigi kesehatan ibu hamil Kesehatan Kulit Kesehatan Mata Keyword Driven Framework in Selenium KIIC KIM Kimia Klari Komplikasi Diabetes Komputer Kontraktor kuliner Kulit Kumpulan Renungan Kristen Lebak Bulus Lemah Abang Lemak Lemak Trans Lembaga Lembaga Negara Lembur Limitations of Selenium WebDriver Lippo Load Testing lowongan lowongan email Lowongan Kerja Lowongan Kerja BANK Lowongan Kerja Bekasi Februari 2014 Lowongan Kerja Cikarang Februari 2014 Lowongan Kerja Hari Ini Lowongan Kerja Jakarta Februari 2015 Lowongan Kerja Karawang Februari 2015 Lowongan Kerja Khusus STM Lowongan Kerja Operator Produksi Lowongan Kerja SMP Lowongan Kerja SPG lowongan PT lowongan sma lowongan smk Lowongan Terbaru Maintinance Makanan Penderita Diabetes Makanan Sehat Manfaat Buah Manfaat Tanaman Manual Test Process Manual testing manual testing basics Manual Testing Fundamentals Manual Testing Limitations Manual Testing Live Project Manual Testing Process Manual Testing Project manual testing resume Manual Testing Tutorial Manual Testing Videos Manual Testing vs Test Automation Manual Testing vs. Test Automation Manufaktur dan Industri Manufaktur Industri mari berhijab Marunda Makmur Matraman Medan Medan Satria Mencegah Diabetes Mengemudi Method Overloading Method Overriding Migas mm2100 mobile automation Mobile Test Tools Mobile Testing Tools model baju batik model baju muslimah model busana muslimah model jilbab motoGP musim hujan Nasional Negative Test Cases Ngaliyan Non Functional Testing NTB Obat Alami Obat Diabetes Alami obesitas Object repositories in uft Oktober Olahraga OP Open Source Test Tools Operating Systems supported by Selenium Operator Operator Forklip Operator Injecion operator produksi Operators in VBScript Oracle Interview Questions Oracle PL/SQL Interview Questions Osteoporosis Otak Otomotif Overview of Functional Testing Overview of Java Overview of Mobile Applications Overview of Performance Testing Overview of Selenium Overview of Selenium WebDriver overview of Web Applications paduan warna Pantangan Penyakit Diabetes Parallel Test Execution using TestNG Parameterization in Selenium Pasir Gombong Pelayaran Pemasaran Dan Penjualan Pendidikan Pengobatan Penjualan dan marketing Penyakit Perawat Perawatan Diabetes Performance Test Process performance test tools Performance Testing Tutorial Phases of SDLC Phases of Software Test Process PL/SQL FAQ PL/SQL Interview questions PL/SQL Tutorial PNS Polymorphism in Java Pondok Labu Pondok Ungu Positive and Negative Test Cases Positive Test Cases PPIC Pramugari Pramuniaga Proetein profil Programming Basics for Testers Programming essentials for Testers Programming fundamentals for Software Testers Programming Knowledge for Testers Programming Languages supported by Selenium project management tool Project Test Automation Psikotes Pulogadung purwakarta Q Academy Indosiar qa training Quality Control rahasia kecantikan rahasia kecantikan wanita korea rambut RAMUAN HERBAL Read and write files in Java Real Time Testing Project Training Recepsionist Regression Testing resep masakan sehat Resep Minuman Restaurant Rumah Sakit S1 S2 S3 Sample Java program Sanity Testing Sarjana sayuran untuk penderita diabetes sdlc SDLC Models Security Testing Checklist sehat alami Sekretaris Selenium Selenium 1.0 vs Selenium 2.0 Selenium 2 Selenium 3 selenium basics Selenium Browser Object Selenium Browser operations Selenium Checklist Selenium Components Selenium Course Brochure Selenium Data Driven Testing Selenium Element locators Selenium Environment Setup selenium FAQ Selenium fundamentals Selenium Fundamentals and Features Selenium Grid Selenium Grid 2 Selenium Guide Selenium History Selenium IDE Selenium IDE Features Selenium IDE Interview Questions and Answers Selenium IDE Test Cases Selenium IDE tutorial Selenium IDE Videos Selenium Installation Selenium Interview Questions Selenium Interview Questions and Answers Selenium Introduction Selenium Java Tutorial Selenium Jobs selenium learning objectives Selenium Live project selenium online training Selenium Project Selenium Project explanation Selenium Project overview Selenium project testing selenium project training Selenium Projects Selenium Questions Selenium Quick Tutorial selenium rc Selenium RC versus Selenium WebDriver Selenium Real Time Interview Questions and Answers Selenium Real time project Selenium Resumes Selenium Step by Step Tutorials Selenium Suite of Tools Selenium syllabus Selenium Test Case Selenium test cases Selenium test planning Selenium Test process Selenium Test Scripts Selenium Tester Job Responsibilities Selenium Tester Resume selenium testing Selenium Testing Project Selenium TestNG Videos Selenium Tools Selenium training Selenium training videos Selenium Tutorial Selenium Tutorial for Beginners Selenium Video Tutorial Selenium Video Tutorials Selenium Videos Selenium vs. UFT Selenium WebDriver Selenium WebDriver Browser Commands Selenium WebDriver Commands Selenium WebDriver environment setup Selenium WebDriver examples selenium webdriver interview questions Selenium WebDriver Interview Questions and Answers selenium webdriver methods Selenium Webdriver Test cases Selenium WebDriver Test Scripts Selenium webDriver tutorial Selenium WebDriver Videos Semarang Sentul Serang serba-serbi muslimah Silk Test SilkTest Sistem Kerja sma SMA/SMK smk Smoke Testing SMP Software Development process Software Quality Software Quality vs Software Test Design Software Test Documents Software Test Life Cycle Software Test Plan Software Test Planning software test process Software Test Tools software tester resume Software tester role Software Tester skills Software Testing software testing basics Software Testing Career Software Testing checklist Software Testing Experience Resume Software testing faq Software Testing Guide software testing interview questions Software Testing Interview Questions and Answers Software Testing interviews Software Testing Job Responsibilities Software Testing Jobs Software Testing Learning Objectives Software Testing life cycle Software Testing methodologies Software Testing Process Software Testing Real-time Project Software Testing Standards Software Testing Tools Software Testing Training Software Testing Tutorial Software Testing Tutorial for Beginners Software Testing tutorials Software Testing Tutorials for Beginners software testing videos Sopir SPB spg Spike Testing SQL Commands for Database Testing SQL FAQ SQL for Software Testing sql for testers SQL Fundamentals SQL Interview Questions SQL Interview Questions and Answers SQL Knowledge for Software Testing SQL PL/SQL Interview Questions SQL Queries SQL Statements SQL Tutorial for Beginners SQL Tutorial for Software Testing staff staff administrasi Staff Kantor Static vs. Non Static Methods stlc Stress Testing String handling String handling in Java Stroke Subang Sulawesi Sumatera Sumatra Sunter supervisor Surabaya Suryacipta Susu Synchronization in Selenium Tambun tangerang Tanjung Baru Tanjung Pura Tebet teknisi Telekomunikasi Teluk Jambe Telur Terminating loops in VBScript Test Automation Test automation checklist Test Automation Limitations Test Automation process Test Automation Resume test automation using selenium Test Case Management Tool Test Closure Test Condition Test Data Collection Test design Test design in UFT Test Design Techniques Test Documentation Templates Test execution in UFT Test Execution phase test levels Test Link Test Management Tools Test Metrics Report Test planning Test Planning in Selenium Test Requirements test scenario Test scenarios vs Test cases Test Summary Report test tools Test Types TestComplete Testing Frameworks used in Selenium testing interview questions testing live project Testing Project Training Testing Project using Selenium Testing Tools Testing Tutorial TestNG annotations TestNG data driven testing TestNG for Selenium TestNG framework for selenium TestNG Framework in Selenium TestNG Framework Quick Tutorial TestNG Grouping Test Cases TestNG Installation TestNG Interview Questions and Answers TestNG Parallel Test Execution TestNG Reports TestNG test cases TestNG Testing Framework in Selenium TestNG Tutorial TestNg with Selenium TestNG with Selenium WebDriver tetap sehat Text stream object in vbscript the voice indonesia 2016 Tidur tipis kecantikan Tips TIPS - TIPS HIDUP SEHAT tips belanja tips cantik tips diet Tips Hidup Sehat Tips Ibu Hamil tips kecantikan Tips Kerja Tips kesehatan tips meke up tips memilih busana tips memilih warna tips muslimah tips sehat Tools for Automated Testing Transportasi Dan Logistik Types of Software Types of Software Environments Types of Test Tools types of testing tools UFT UFT 12.51 Installation UFT 12.51 new features UFT 12.51 New Technology Support UFT 12.51 Product updates UFT Basics UFT checklist UFT Fundamentals UFT Guide UFT Interview Questions and Answers UFT latest version new features UFT Shared Object Repository UFT Test Process UFT Test Result UFT Tool UFT Tutorial UFT Tutorials UFT Videos Universitas UNIX Knowledge for Testers Usability Test Tools Usage of Java Use Case Testing User Defined Methods in Java VBScript Automation objects VBScript Basics VBScript built in functions vbscript conditional statements VBScript Control flow statements VBScript Data Types VBScript Database Object models vbscript debug commands vbscript excel object VBScript Excel Object Model for UFT vbscript file system object VBScript FileSystemObject Model VBScript for UFT VBScript Function Procedures VBScript functions VBScript Functions for UFT VBScript Fundamentals VBScript if statement VBScript Loop Structures VBScript Objects VBScript scripting examples VBScript Sub Procedures VBScript Tutorial VBScript Tutorial for beginners VBScript User defined Functions Vbscript variables Vendor Test Tools Via Email Video Vitamin wajah Wanaherang Warung Kobak Watir Web elements in selenium Web Environment Knowledge for Testers web testing checklist Web Testing Tutorial WebDriver WebDriver API Commands WebDriver Commands WebDriver Commands and Operations WebDriver environment setup WebDriver examples WebDriver Features webdriver interview questions webdriver tutorials What is Database Testing? What is Software Testing? White Box Techniques Working with different browsers write and execute java programs write java program in eclipse Write selenium Test Cases Writing Selenium Test Cases Writing Selenium Test scripts Writing Test Cases Writing Test Cases using User defined methods xpath locator in selenium yayasan Yogyakarta