SlideShare a Scribd company logo
Appium workshop
Syam Sasi
Martin Schneider
Technopark Trivandrum, 18.05.2019
Appium workshop technopark trivandrum
About us
Syam Sasi
Senior Software Engineer @ Carousell
https://about.me/syamsasi
Martin Schneider
Senior Software Engineer @ Carousell
mart.schneider@gmail.com
Code
https://github.com/martinschneider/appium-workshop-2019-05-18
git clone git@github.com:martinschneider/appium-workshop-2019-05-18.git
mvn compile
© Martin Schneider, mart.schneider@gmail.com

Recommended for you

Appium
AppiumAppium
Appium

How to start with Appium on Android Devices. Basics of Appium. How to setup appium on Windows? Advantages of Appium

mobile app testingsoftware testingapps
What's New With Appium? From 1.0 to Now
What's New With Appium? From 1.0 to NowWhat's New With Appium? From 1.0 to Now
What's New With Appium? From 1.0 to Now

Developed by Sauce Labs and a thriving community of open source contributors, Appium is a cross-platform automation framework for testing mobile web, native, and hybrid applications. In this webinar, hear the latest about Appium version 1.3.x from project lead Jonathan Lipps as he takes us on a tour of the stability improvements and features the team has added since the Appium 1.0 release back in May of 2014.

appiummobile testingmobile ci
Using Selenium to Test Native Apps (Wait, you can do that?)
Using Selenium to Test Native Apps (Wait, you can do that?)Using Selenium to Test Native Apps (Wait, you can do that?)
Using Selenium to Test Native Apps (Wait, you can do that?)

This document discusses automating tests for native mobile applications. It begins by describing the challenges of testing iOS applications using Apple's UI Automation and Instruments tools. It then reviews two attempted approaches for automation that were brittle and difficult to use at scale. The document advocates for using Appium, an open source test automation tool that allows controlling native and hybrid applications using the WebDriver protocol. It provides an example of using Appium to automate tests for a native iOS application and discusses the tool's benefits and limitations. In closing, it outlines opportunities to further enhance Appium's capabilities and integrations.

selenium testingautomationmobile
Background and history of Appium
A brief (overly simplified) history of UI test automation
1993: QA Partner (Segue Software)
1996: QA Partner → Silk Test
2004: Selenium created at ThoughtWorks (Jason Huggins)
2005: Robot Framework (Pekka Klärck)
2006: Borland acquires Silk Test
2007: WebDriver (Simon Stewart)
2008: Selenium Grid
2008: Cucumber (Aslak Hellesøy)
2009: Selenium + WebDriver = Selenium 2.0
2009: MicroFocus acquires Borland
2009: Silk4J
2011: iOS Auto (Dan Cuellar)
2013: Espresso
2014: Appium 1.0 (Saucelabs)
2017: Silk Webdriver
© Martin Schneider, mart.schneider@gmail.com
The history of Appium
2011: Dan Cuellar creates iOSAuto, a tool for iOS automation written in C#
2012: Dan presents Appium during a Lightning Talk at the 2012 Selenium Conference in London
2012: Dan rewrites appium in Python and open-sources it under the Apache 2 license
2012: Cooperation with Jason Huggins (Selenium co-founder) starts
2013: Saucelabs starts backing Appium
2013: Appium is rewritten using node.js
2013: Android support is added → first truly platform-independent mobile testing framework
2014: Appium 1.0 is released
2016: Drivers for Windows desktop and youi.tv automation are added
2016: Appium is donated to the JS Foundation
The journey continues!
http://appium.io/history.html
https://github.com/appium
http://appium.io/
© Martin Schneider, mart.schneider@gmail.com
Coffee break reading material ;-)
https://www.infoq.com/news/2018/04/cucumber
-bdd-ten-years
https://www.seleniumhq.org/about/history.jsp
http://appium.io/history.html
© Martin Schneider, mart.schneider@gmail.com

Recommended for you

Appium@Work at PAYBACK
Appium@Work at PAYBACKAppium@Work at PAYBACK
Appium@Work at PAYBACK

We are using a variety of automation tools in our project. Appium is one of them. Since Appium is now one of the most used open source automation tools for Mobile we like to share our 2 years of experience: When do we use Appium? How do we use it? What does our architecture look like? Where are the pitfalls? Simply put: How does Appium fare in our day to day life and would we use it again?

androidtestingmobile
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on WebinarParallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar

Watch a live presentation at http://offer.bitbar.com/parallel-test-runs-with-appium-on-real-mobile-devices Appium is an open source test automation framework and currently one of the hottest framework for mobile app, game and web testing. In this webinar, we’ll discuss about the best practices, how to use Appium for different types of apps, games and web apps, and how to use all new features around it – the parallel test runs, image recognition and more! Stay tuned and join our upcoming webinars at http://bitbar.com/testing/webinars/

testdroidtest automationmobile testing strategy
Appium ppt
Appium pptAppium ppt
Appium ppt

"Learn All Aspects Of Appium step by step, Enhance your skills & Launch Your Career, On-Demand Course affordable price & classes on virtually every topic.Try Before You Buy for maven online training visit: https://goo.gl/YKsHBZ"

appium online trainingit courses online trainingappium
Appium philosophy
Appium philosophy
1. You shouldn't have to recompile your app or modify it in any way in order to
automate it.
2. You shouldn't be locked into a specific language or framework to write and
run your tests.
3. A mobile automation framework shouldn't reinvent the wheel when it comes
to automation APIs.
4. A mobile automation framework should be open source, in spirit and
practice as well as in name!
Appium design
Appium design

Recommended for you

Appium Interview Questions and Answers | Edureka
Appium Interview Questions and Answers | EdurekaAppium Interview Questions and Answers | Edureka
Appium Interview Questions and Answers | Edureka

Mobile application testing focuses on testing the functionality and features of mobile applications. It is performed by application vendors. Mobile testing focuses on testing the native features of mobile devices like calls, SMS, Bluetooth, etc. It is performed by handset makers. A simulator mimics the outward behavior of a target but not its internal state, while a simulation accurately models both the outward behavior and underlying internal state of a target. Types of mobile application testing include usability, compatibility, interface, services, low-level resource, performance, and operational testing. The general structure of a mobile testing framework includes application packages, instrumentation, test runners, and test packages. Common bugs in mobile applications include critical bugs, block bugs, major bugs, and minor

appium interview questions and answersappium interview questionsmobile testing interview questions
Mobile Automation with Appium
Mobile Automation with AppiumMobile Automation with Appium
Mobile Automation with Appium

The document discusses challenges in mobile automation testing and provides an overview of Appium as a tool for mobile test automation. It covers Appium architecture, requirements, capabilities, and tips for scaling mobile tests. Advanced Appium actions like horizontal and vertical swiping and chained locators are mentioned. The document also discusses visual testing, accessibility testing, and performance testing for mobile apps using Appium.

appiummobile automationios
Appium: Mobile Automation Made Awesome
Appium: Mobile Automation Made AwesomeAppium: Mobile Automation Made Awesome
Appium: Mobile Automation Made Awesome

The tools and practices refined over the last decade by web developers have not crossed over easily into the mobile community. Mobile devs have been without tools like continuous integration and automated testing, which enable delivery of high-quality apps more rapidly. A key piece of the solution for mobile is Appium, an open-source, cross-platform, language-agnostic mobile automation framework you can use to write automated UI tests for Android and iOS apps (native, hybrid, web), to be run on emulators or devices. In this talk we will explore the philosophy that underlies the work behind Appium, including the open-source nature of Appium’s diverse, active and friendly community. Then, after a brief explanation of the technology that powers Appium, we’ll move into the technical portion of the talk, where attendees will see easy it is to write Appium scripts using the WebDriver protocol in their favorite language, and integrate Appium tests into a CI system using Selenium Grid or Sauce Labs. Finally, we’ll look at some concrete examples of how Appium has been used in a large project with 20 Android Apps at Swiss Post to dramatically improve mobile QA. Ultimately, the talk provides an argument for moving from manual QA to automated testing, an understanding of the mobile automation landscape, and a solid introduction to Appium, which leading projects and companies around the world have chosen as their mobile automation framework of choice.

appiumswiss postmobile
Appium basics
Appium architecture
Appium client Appium server
JSONWP
● Client-server architecture
● Server is written in node.js
● Clients are available for all major
programming languages
UIAutomator 2
XCUITest
Selenium
WebDriver driver = new FirefoxDriver();
driver.get("http://www.google.com");
WebElement element = driver.findElement(By.name("q"));
element.sendKeys("Appium Meet-up");
element.submit();
...
Appium
AppiumDriver driver = driver = new AppiumDriver(new
URL("http://127.0.0.1:4723/wd/hub"), capabilities);
IOSElement element = driver.findElement(By.name("search"));
element.sendKeys("Appium Meet-up");
element.submit();
...

Recommended for you

Vietnam qa meetup
Vietnam qa meetupVietnam qa meetup
Vietnam qa meetup

Hello Testers, Welcome to the special edition of Vietnam QA meet up. We have three speakers from Carousell on this special occasion. 1. Demystifying selenium grid - Syam Sasi, Senior Software Engineer , Carousell 2. The testing culture at Carousell - Ngan Do, Software Engineer , Carousell 3. The weekly release cycle for mobile apps - Long Ly, Senior Software Engineer , Carousell Date : Thursday, May 30th, 2019 Time: 6:00 PM to 9:00 PM Location: 23rd floor, E. Town Central, 11 Doan Van Bo, Ward 12, District 4 Ho Chi Minh City Register link: https://www.eventbrite.sg/e/vietnam-qa-meetup-tickets-61865212516 The event is free and drinks with snacks will be served. Please note that the event will be conducted in mainly English. Detail Schedule: 6PM - 6:30PM - Pizzas, Fruits and networking 6:30 - 7:10 PM - Demystifying the selenium grid 7:10 - 7:15 - Q&A 7:15 - 7:45 - Testing culture at Carousell 7:45- 7:50 - Q&A 7:55 - 8:40 - Weekly release cycle for mobile apps 8:40 - 8:45 - Q&A 8:45 - 09:00 - Kahoot

software testingrelease processselenium grid
Automated UI Testing Frameworks
Automated UI Testing FrameworksAutomated UI Testing Frameworks
Automated UI Testing Frameworks

Finding the right test framework is the key for getting your automated process right. This slide-show is a list of a few automated UI test frameworks, each with its characteristics, for Android and iOS.

writingframeworkframeworks
Appium - test automation for mobile apps
Appium - test automation for mobile appsAppium - test automation for mobile apps
Appium - test automation for mobile apps

This document provides an overview of Appium, an open-source test automation tool for mobile applications. It allows testing of native, hybrid, and mobile web apps across iOS and Android platforms. Appium uses the Selenium WebDriver API and supports many programming languages. It can test on both simulators/emulators and real devices. While it has some limitations like no image comparison, its benefits include easy setup, cross-platform capability, and integration with continuous integration and device farms.

mobileiosappium
Selenium and Appium
Appium vs. native frameworks
● Appium is highly portable.
● We can use the same tool to automate Android, iOS, Web (with
Selenium) and Windows Desktop applications → multi-platform test
frameworks.
● Appium is slower than native automation.
● There is an overhead that comes with the client/server architecture.
Appium basics
Our first Appium test:
● /appium-demo/src/test/java/io/github/martinschneider/appium/android/CounterTest01.java
● /appium-demo/src/test/java/io/github/martinschneider/appium/android/CounterTest02.java
Appium capabilities

Recommended for you

Cross Platform Appium Tests: How To
Cross Platform Appium Tests: How ToCross Platform Appium Tests: How To
Cross Platform Appium Tests: How To

This is a presentation about mobile apps testing using Appium. The presentation conrtains tips on comprehensive testing of apps written for various devices and platforms. Presentation by Yaroslav Pernerovskyy (Lead Test Engineer, GlobalLogic, Kyiv), delivered at UA Mobile, November 22, 2014. More details - http://uamobile.org

cross platform testingmobiletesting
Appium
AppiumAppium
Appium

This document discusses Android and iOS automation using Appium. It provides an overview of Appium, including that it is an open source test automation tool for mobile apps that supports automation of native, hybrid and mobile web apps. It also outlines the features of Appium, how to set up automation for Android and iOS apps, and demonstrates automating a mobile web app.

Automation Testing With Appium
Automation Testing With AppiumAutomation Testing With Appium
Automation Testing With Appium

The slides cover the introduction to Appium, why is Appium used, Basic concepts, and terminologies used in Appium, Drivers supported by Appium.

appiumautomation with appiumknolx
Appium Capabilities
General Capabilities
automationName - XCUITest or UiAutomator2
platformName - iOS or Android
platformVersion - 7.0, 11.0
deviceName - iPhone6, Samsung Galaxy S8
app - /path/to/apk, app or ipa
fullReset - true or false
newCommandTimeout - in seconds
Appium Desktop
Why Appium Desktop?
● Inspect Android and iOS App UI
● Search for a mobile element
● Record the actions

Recommended for you

How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...

This presentation is about the things I did to test the Tele2 React Native app with Appium. I'll explain the journey we've taken and some best practices which you can use with React Native and Appium

appiumreact-nativemocking
Introduction To Appium With Robotframework
Introduction To Appium With RobotframeworkIntroduction To Appium With Robotframework
Introduction To Appium With Robotframework

This document provides an introduction to Appium, a cross-platform solution for automating tests on native, hybrid and mobile web apps. It discusses Appium's philosophy of using the same code across platforms and leveraging existing knowledge of WebDriver APIs. Requirements for iOS and Android are listed. Advantages of Appium include using favorite programming languages, testing on real devices and simulators, supporting multiple frameworks, and integrating with CI/CD pipelines. Initial setup can be challenging and image recognition is still a work in progress. Source code for an Appium workshop is provided.

qamobile appsappium
Dive into Angular, part 5: Experience
Dive into Angular, part 5: ExperienceDive into Angular, part 5: Experience
Dive into Angular, part 5: Experience

This presentation has been prepared by Oleksii Prohonnyi for internal Angular.js training to improve skills of newbies in JS/Angular. Part 1 (Introduction): http://www.slideshare.net/oprohonnyi/dive-into-angular-part-1-introduction Part 2 (Architecture): http://www.slideshare.net/oprohonnyi/dive-into-angular-part-2-architecture Part 3 (Performance): http://www.slideshare.net/oprohonnyi/dive-into-angular-part-3-performance Part 4 (Angular 2.0): http://www.slideshare.net/oprohonnyi/dive-into-angular-part-4-angular-20

watchersunit testingjavascript
Appium Desktop Demo
Inspecting Android App
1. Run appium command in command prompt/terminal
2. Open Appium Desktop
3. Click on Appium > New Session Window
4. Enter the following capabilities and save
Note: Pixel is the name of the emulator
{
"platformName":"android",
"deviceName":"Pixel",
"automationName":"UiAutomator2",
"app":"/path/to/apk/file",
"avd","Pixel"
}
Android locator types
Android locator types
● accessibility
● id
● xpath
● class
● uiAutomator
● image
http://appium.io/docs/en/commands/element/find-elements/
https://saucelabs.com/blog/advanced-locator-strategies

Recommended for you

A Comprehensive Guide to Conducting Test Automation Using Appium & Cucumber o...
A Comprehensive Guide to Conducting Test Automation Using Appium & Cucumber o...A Comprehensive Guide to Conducting Test Automation Using Appium & Cucumber o...
A Comprehensive Guide to Conducting Test Automation Using Appium & Cucumber o...

The widespread use of mobile applications in our daily lives has created a demand for seamless integration and reliable performance. Modern tech-savvy users expect mobile apps to solve their problems seamlessly and without fail.

software testing
Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017

Are you a backend developer that’s being pushed into front-end development? Are you frustrated with all JavaScript frameworks and build tools you have to learn to be a good UI developer? If so, this session is for you! We’ll explore the tools for frontend development and frameworks too! Streamed live at 8pm MST on Oct 25, 2017! https://virtualjug.com/vjug24/

angularangular-clireact.js
Building And Executing Test Cases with Appium and Various Test Frameworks.pdf
Building And Executing Test Cases with Appium and Various Test Frameworks.pdfBuilding And Executing Test Cases with Appium and Various Test Frameworks.pdf
Building And Executing Test Cases with Appium and Various Test Frameworks.pdf

Building and executing test cases with Appium requires choosing an appropriate test framework, writing test cases according to the framework, and then executing the test cases. Popular test frameworks that can be used with Appium include TestNG, JUnit, Appium Studio, Robot Framework, Espresso, and XCTest. Test cases are executed using tools like the command line interface, IDEs, or continuous integration services. Together, Appium and the right test framework allow organizations to automate mobile application testing.

test frameworks
Android locator types
● /appium-demo/src/test/java/io/github/martinschneider/appium/android/CounterTest03.java
● /appium-demo/src/test/java/io/github/martinschneider/appium/android/CounterTest04.java
Inspector tools
Appium inspector
{
"platformName" : "android",
"appPackage": "com.thecarousell.Carousell" ,
"appActivity": "com.thecarousell.Carousell.activities.EntryActivity" ,
"appPath": "/Users/martinschneider/carousell.apk",
"deviceName" : "test",
}
Appium inspector

Recommended for you

Good practices for debugging Selenium and Appium tests
Good practices for debugging Selenium and Appium testsGood practices for debugging Selenium and Appium tests
Good practices for debugging Selenium and Appium tests

We often come across situations when: > We cannot figure out why our Selenium/Appium scripts fail during execution either locally or on CI. > We need to debug scripts locally while writing them but find debugging painful and slow Debugging the scripts is often the approach to fix them. What all different ways we can do it? I shared about some of the good practices I have used for debugging Selenium and Appium scripts

appiumseleniumtest automation
Java Test Automation for REST, Web and Mobile
Java Test Automation for REST, Web and MobileJava Test Automation for REST, Web and Mobile
Java Test Automation for REST, Web and Mobile

Presentation about how to use REST, Web and Mobile open source tools to increase your test codebase. This presentation was made by me and Edson Yanaga for JavaOne 2017 San Francisco on 04/09/2017

javaone2017javaoneoraclecloud
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for Java

This document provides an overview of Google App Engine for Java (GAE/J) through a presentation. It discusses key aspects of GAE/J including the scalable infrastructure, programming languages supported, frameworks, development tools, deployment, data storage using the datastore, testing, limits, and services. It emphasizes that GAE/J handles the infrastructure and allows developers to focus on application code without worrying about scaling or maintaining servers.

gaejjavagoogle app engine
Macaca inspector
● https://macacajs.github.io/app-inspector/
● npm i app-inspector -g
● adb devices
● app-inspector -u YOUR-DEVICE-ID
● http://10.0.1.117:5678
● Does not require Appium or an Appium session
Macaca inspector
● https://macacajs.github.io/app-inspector/
● npm i app-inspector -g
● app-inspector -u YOUR-DEVICE-ID
● http://10.0.1.117:5678/
Waiting strategies
Waiting strategies
● /appium-demo/src/test/java/io/github/martinschneider/appium/android/LoginTest01.java
● /appium-demo/src/test/java/io/github/martinschneider/appium/android/LoginTest02.java
● /appium-demo/src/test/java/io/github/martinschneider/appium/android/LoginTest03.java
● /appium-demo/src/test/java/io/github/martinschneider/appium/android/LoginTest04.java

Recommended for you

Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...

Мы вместе проговорить следующие ��опросы 1. Запуск тестов в облаке: server-side VS client side execution 2. Парк устройств и поддерживаемые фреймворки в TestDroid, TestObject 3. Доступные действия и ограничения в работе с устройствами в облаке 4. Интеграция проекта на базе Appium-а используя client-side execution & API облачного сервиса 5. Интеграция с hockeyApp. 6. Как мы тестировали и что из этого получилось – личная история

comaqacomaqawinter
Microservices for the Masses with Spring Boot, JHipster, and OAuth - Jforum S...
Microservices for the Masses with Spring Boot, JHipster, and OAuth - Jforum S...Microservices for the Masses with Spring Boot, JHipster, and OAuth - Jforum S...
Microservices for the Masses with Spring Boot, JHipster, and OAuth - Jforum S...

Microservices are being deployed by many Java Hipsters. If you're working with a large team that needs different release cycles for product components, microservices can be a blessing. If you're working at your VW Restoration Shop and running its online store with your own software, having five services to manage and deploy can be a real pain. This presentation will show you how to use JHipster to create Angular + Spring Boot apps with a unified front-end. You will leave with the know-how to create your own excellent apps! Related blog posts: * Java Microservices with Spring Boot and Spring Cloud: https://developer.okta.com/blog/2019/05/22/java-microservices-spring-boot-spring-cloud * Java Microservices with Spring Cloud Config and JHipster: https://developer.okta.com/blog/2019/05/23/java-microservices-spring-cloud-config * Secure Reactive Microservices with Spring Cloud Gateway: https://developer.okta.com/blog/2019/08/28/reactive-microservices-spring-cloud-gateway

microservicesspringbootjhipster
An Overview of Angular 4
An Overview of Angular 4 An Overview of Angular 4
An Overview of Angular 4

Angular is an open source JavaScript framework that is used to build single page based web applications.A detailed overview of Angular 4, Its features, development environment and components.

angular developmentangular jsangular development services
Static wait
Thread.sleep(3000);
● Fixed duration for every execution
○ either too long (waste of execution time)
○ or too short (test will still fail)
● Remember: Test behave differently
○ on different environments
○ under different network conditions
○ etc.
● Just ugly and wrong! Avoid at all costs!
© Martin Schneider, mart.schneider@gmail.com
Implicit wait
driver.manage().timeouts().implicitlyWait(10,
TimeUnit.SECONDS);
● Will wait up to the specified time for every element.
● Speeds up test execution locally but also slows down overall test execution
because it is a global setting (no ability to fail fast)!
● Better than static waits but still not quite convenient enough….
© Martin Schneider, mart.schneider@gmail.com
WebDriverWait wait = new WebDriverWait(driver, 10);
wait.until(presenceOfElementLocated(goToLogin))
.click();
wait.until(presenceOfElementLocated(username))
.sendKeys(username);
● Waits until a condition is met.
● This isn’t limited to visibility.
● We can implement custom conditions.
● We can use different timeouts for different use-cases!
Explicit wait
© Martin Schneider, mart.schneider@gmail.com
Swipe and scroll

Recommended for you

Spring Boot
Spring BootSpring Boot
Spring Boot

Spring Boot is a framework that makes it easy to create stand-alone, production-grade Spring based applications that you can "just run". It allows you to create stand-alone applications, embed Tomcat/Jetty directly with no need to deploy WAR files, and provides starter POMs to simplify configuration. Spring Boot applications are run by adding a spring-boot-gradle-plugin and can then be run as an executable JAR. Features include REST endpoints, security, external configuration, and production monitoring via Actuators.

microservicesrestspring framework
Appium testing api
Appium testing apiAppium testing api
Appium testing api

Appium Philosophy and Design Appium Philosophy Appium Design Appium Client-Server Architecture Appium Session Appium Desired Capabilities Appium Server - Appium Client - Appium Desktop Advantages of the CSA Setup Android Project

appium testing apiappiumapi testing
Ashish Baraiya
Ashish BaraiyaAshish Baraiya
Ashish Baraiya

This document provides details about a software quality assurance professional with over 10 years of experience in software testing and automation. They have experience leading testing teams and currently hold a New Zealand Work Permit Visa. Their experience includes test automation using tools like Selenium, performance testing with JMeter, and testing in agile environments. They have worked with various companies and clients across different domains.

The X Y Coordinates
The Touch Action Class
● /appium-demo/src/test/java/io/github/martinschneider/appium/android/swipe/SwipeTest.java
1. Touch Action
*press*release*moveTo*tap*wait*longPress.cancel.perform
TouchAction().press(el1).moveTo(el2).release();
2. Multi Touch
action1 = TouchAction().tap(el1);
action2 = TouchAction().tap(el2);
MultiAction().add(action1).add(action2).perform();
Page object model
Page objects
© Martin Schneider, mart.schneider@gmail.com
● De-facto standard design pattern in UI test automation.
● A page object is an object-oriented class that serves as an interface to a
page/screen of your AUT.
● Goals: enhance maintenance, avoid code duplication
● Ideally one page object per page/screen/dialog/component.
● Tests don’t care about the layout and locators of your app. They just
interact with page objects.
● We can use mechanisms like Dependency Injection to simplify the use of
page objects.

Recommended for you

React django
React djangoReact django
React django

Django is a Python web framework that follows the MVT (Model-View-Template) architectural pattern. React allows building user interfaces using reusable components. This document discusses combining Django and React to take advantage of both. It provides steps to create a Django project with REST API endpoints and a React frontend app that fetches data from the API. Key steps include creating Django models, views and URLs, then setting up a React app with components that call the Django REST API and render data. Bringing Django and React together allows building scalable web apps rapidly with Django's backend and React's frontend capabilities.

djangopythonreact native
Sst hackathon express
Sst hackathon expressSst hackathon express
Sst hackathon express

Express is a popular Node.js framework that provides scaffolding for building web applications in an organized manner. It allows adding middleware functions and templating engines like Dust.js to add dynamic content. The document demonstrates how to use the Request module to call an external weather API, parse the JSON response, and render the data in a Dust template to present weather information for different cities. It concludes by discussing deploying the application to production platforms like Bluemix.

node.jsexpress
Mobile automation using selenium cucumber & appium
Mobile automation using selenium cucumber & appiumMobile automation using selenium cucumber & appium
Mobile automation using selenium cucumber & appium

This document discusses mobile automation using Selenium-Cucumber and Appium. It provides an overview of Selenium-Cucumber for automating web and mobile tests in a behavior-driven development approach. It also introduces Appium for automating native and hybrid mobile apps across platforms. The document outlines how to set up the required tools and libraries and provides examples of using Selenium-Cucumber to automate tests of Android web and mobile apps.

mobile automationappiumbdd
Theory is boring...
● /appium-demo/src/test/java/io/github/martinschneider/appium/android/LoginTest05.java
● /appium-demo/src/test/java/io/github/martinschneider/appium/android/LoginTest06.java
● /appium-demo/src/test/java/io/github/martinschneider/appium/android/LoginTest07.java
How to design a test framework?
Some thoughts
How to design a test framework?
© Martin Schneider, mart.schneider@gmail.com
● Don’t re-invent the wheel but combine existing tools in a way that best fit
your use-case.
● Always keep re-usability, adaptability, extensibility and scalability in mind.
● A quick (and “dirty”) PoC is a start but what’s your use-case in 6 months / 1
year / 5 years… Is your design ready for the change?
● → Have a vision and lay the foundation accordingly.
● Good design now = less refactoring later.
● Test automation requires software engineers (test engineer = engineer).
● Apply the same (or better) practices you have for building the solutions you
sell to your customers, always lead by example (quality!).
● Powerful under the hood but super-easy to use.
● A framework is cool but don’t forget the culture in which it is used.
https://www.linkedin.com/in/martin-schneider
How to design a test framework?
© Martin Schneider, mart.schneider@gmail.com
Core framework
Business model
Page objects and DTOs
Tests Testdata
Cloud
integration
3rd party
integrations
Test helper
API layer
EXAMPLE
Robot

Recommended for you

How to kill test flake in appium
How to kill test flake in appiumHow to kill test flake in appium
How to kill test flake in appium

The document discusses strategies for making mobile tests less flaky in 6 steps: 1. Use explicit waits instead of hardcoded waits 2. Use reliable locator strategies like accessibility IDs instead of XPath 3. Make tests faster by launching specific app screens or using deep links instead of full user flows 4. Mock API calls to avoid failures from changing backend services 5. Debug test failures by examining logs and error messages 6. Follow best practices like storing results and getting involved in app development to ensure testability

appiumautomationtest automation
Web Development in Django
Web Development in DjangoWeb Development in Django
Web Development in Django

This document introduces Django, an open-source Python web framework. It discusses what Django is, why it is useful for building dynamic web applications, and some of its key features like automatic admin interfaces and convention over configuration. The document then provides a tutorial on basic Django components like models, urls, views and templates. It concludes by listing additional Django resources and information about Usware Technologies, the company presenting.

barcampbangalorebarcamppython
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfA Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf

Companies strive to enhance customer engagement through frequent feature updates in today's fast-paced digital landscape. The imperative to deliver reliable, bug-free applications quickly is paramount. To meet these demands, a robust testing process is indispensable.

appium testing
IOS automation
Locator Strategy for iOS
Accessibility ID
driver.findElement(MobileBy.AccessibilityID ("foo"));
iOS NS Predicates
driver.findElementByIosNsPredicate (tableViews()[1].cells().firstWithPr
edicate("label == 'Olivia' " ));
iOS Class Chain
driver.findElement(MobileBy.iOSClassChain("**/XCUIElementTypeCell[`nam
e BEGINSWITH " C"`]/XCUIElementTypeButton[10]" ));
● /appium-demo/src/test/java/io/github/martinschneider/appium/ios/IOSTest.java
Real device vs. simulators/emulators
Appium On Real Devices - Android
© Martin Schneider, mart.schneider@gmail.com
1. Enable USB Debugging
2. Connect the device using usb
3. Note down the udid
4. Device is detected when run the adb devices command
https://developer.android.com/studio/debug/dev-options

Recommended for you

Unit testing for ext js apps using sencha test - Walkingtree Technologies
Unit testing for ext js apps using sencha test - Walkingtree TechnologiesUnit testing for ext js apps using sencha test - Walkingtree Technologies
Unit testing for ext js apps using sencha test - Walkingtree Technologies

Most comprehensive unit and end-to-end functional testing solution for ExtJS and ExtReact applications. Sencha Test helps developers and test automation engineers create unit and functional tests quickly, and execute them on multiple browsers simultaneously. Sencha Test helps you improve application quality, accelerate time to market, and reduce testing time and costs.

senchasencha extjs appssencha extjs
Evento anual Splunk .conf24 Highlights recap
Evento anual Splunk .conf24 Highlights recapEvento anual Splunk .conf24 Highlights recap
Evento anual Splunk .conf24 Highlights recap

Encontro anual da comunidade Splunk, onde discutimos todas as novidades apresentadas na conferência anual da Spunk, a .conf24 realizada em junho deste ano em Las Vegas. Neste vídeo, trago os pontos chave do encontro, como: - AI Assistant para uso junto com a SPL - SPL2 para uso em Data Pipelines - Ingest Processor - Enterprise Security 8.0 (Maior atualização deste seu release) - Federated Analytics - Integração com Cisco XDR e Cisto Talos - E muito mais. Deixo ainda, alguns links com relatórios e conteúdo interessantes que podem ajudar no esclarecimento dos produtos e funções. https://www.splunk.com/en_us/campaigns/the-hidden-costs-of-downtime.html https://www.splunk.com/en_us/pdfs/gated/ebooks/building-a-leading-observability-practice.pdf https://www.splunk.com/en_us/pdfs/gated/ebooks/building-a-modern-security-program.pdf Nosso grupo oficial da Splunk: https://usergroups.splunk.com/sao-paulo-splunk-user-group/

splunksoarcybersecurity
PMSM-Motor-Control : A research about FOC
PMSM-Motor-Control : A research about FOCPMSM-Motor-Control : A research about FOC
PMSM-Motor-Control : A research about FOC

This is research about a process called field-oriented control (FOC) that is used to control the pmsm motor.

#pmsmfoc
Appium On Real Devices - iOS
© Martin Schneider, mart.schneider@gmail.com
1. cd
/usr/local/lib/node_modules/appium/node_modules/appium-
xcuitest-driver/WebDriverAgent
2. mkdir -p Resources/WebDriverAgent.bundle
3. /bin/bash ./Scripts/bootstrap.sh -d
4. brew install carthage
5. brew install libimobiledevice --HEAD
6. npm install -g ios-deploy
7. UI Automation enabled on iOS device
8. Xcode has proper code sign enabled
http://appium.io/docs/en/drivers/ios-xcuitest-real-devices/
Which one I need?
© Martin Schneider, mart.schneider@gmail.com
Cloud automation
Next question: How can we scale this?
© Martin Schneider, mart.schneider@gmail.com

Recommended for you

Chlorine and Nitric Acid application, properties, impacts.pptx
Chlorine and Nitric Acid application, properties, impacts.pptxChlorine and Nitric Acid application, properties, impacts.pptx
Chlorine and Nitric Acid application, properties, impacts.pptx

Chlorine and Nitric acid

Response & Safe AI at Summer School of AI at IIITH
Response & Safe AI at Summer School of AI at IIITHResponse & Safe AI at Summer School of AI at IIITH
Response & Safe AI at Summer School of AI at IIITH

Talk covering Guardrails , Jailbreak, What is an alignment problem? RLHF, EU AI Act, Machine & Graph unlearning, Bias, Inconsistency, Probing, Interpretability, Bias

machine learningchatgptaisafety
L-3536-Cost Benifit Analysis in ESIA.pptx
L-3536-Cost Benifit Analysis in ESIA.pptxL-3536-Cost Benifit Analysis in ESIA.pptx
L-3536-Cost Benifit Analysis in ESIA.pptx

..

Next question: How can we scale this?
© Martin Schneider, mart.schneider@gmail.com
On premise vs. cloud
● Full control
○ Number of devices
○ Types of devices
○ Software libraries
○ ...
● No maintenance required
● Fixed costs
● Support
● Maintenance
○ replace devices
○ fix issues
○ infrastructure
○ ...
● Less flexibility
○ Available devices
○ Software update cycle? (Appium,
Java)
© Martin Schneider, mart.schneider@gmail.com
Two approaches towards cloud testing
#1: Client-side execution
Step 1: Upload your APP to the cloud
Step 2: Create a WebDriver instance
capabilities.setCapability("app", appUrl);
new AppiumDriver("http://cloud.com/wd/hub", capabilities);
Step 3: Execute your tests as before
For example, Browserstack, Saucelabs, pCloudy...
© Martin Schneider, mart.schneider@gmail.com
Two approaches towards cloud testing
#2: Server-side execution
Step 1: Upload your APP to the cloud
Step 2: Package and upload your tests to the cloud
Step 3: Tests get executed on the cloud
For example, AWS Devicefarm (public cloud)
© Martin Schneider, mart.schneider@gmail.com

Recommended for you

1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT
1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT
1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT

1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT

1239_2.pdf for procurement
kiln burning and kiln burner system for clinker
kiln burning and kiln burner system for clinkerkiln burning and kiln burner system for clinker
kiln burning and kiln burner system for clinker

Kiln

Conservation of Taksar through Economic Regeneration
Conservation of Taksar through Economic RegenerationConservation of Taksar through Economic Regeneration
Conservation of Taksar through Economic Regeneration

This was our 9th Sem Design Studio Project, introduced as Conservation of Taksar Bazar, Bhojpur, an ancient city famous for Taksar- Making Coins. Taksar Bazaar has a civilization of Newars shifted from Patan, with huge socio-economic and cultural significance having a settlement of about 300 years. But in the present scenario, Taksar Bazar has lost its charm and importance, due to various reasons like, migration, unemployment, shift of economic activities to Bhojpur and many more. The scenario was so pityful that when we went to make inventories, take survey and study the site, the people and the context, we barely found any youth of our age! Many houses were vacant, the earthquake devasted and ruined heritages. Conservation of those heritages, ancient marvels,a nd history was in dire need, so we proposed the Conservation of Taksar through economic regeneration because the lack of economy was the main reason for the people to leave the settlement and the reason for the overall declination.

architectureconservationregeneration
Client- vs. server-side execution
● Easier migration
○ Execution flow remains the same
○ Reporting and CI remain the same
● More control
○ Software updates on the client side
○ easier to use a mixed/hybrid mode
(=use different cloud providers or
local + cloud)
● Performance (maybe)
● Network latency ● Trust and compliance
● Integration overhead
○ Test results and reporting
○ Network challenges
© Martin Schneider, mart.schneider@gmail.com
Factors to consider
What’s your use-case?
● Devices
○ specific models, manufacturers, OS versions
● Parallelisation
○ How to distribute n tests across m devices efficiently (each test runs once)?
○ How to run n tests on m devices in parallel (each test runs m times)?
● Time constraints, execution speed, waiting times
○ run tests once a day (“nightly tests”) → not time-critical
○ run tests multiple times a day to verify changes → highly time-critical
● Client- vs. server execution mode
● API support
● Cost and pricing models
● Future use-cases
© Martin Schneider, mart.schneider@gmail.com
Device models
● In the US Apple and Samsung cover 81% of the market (UK 87%,
Singapore 82%, Australia 89% etc.)
● What about Xiaomi, Oppo, Vivo, Lyf...?
© Martin Schneider, mart.schneider@gmail.com
Device market share in India
© Martin Schneider, mart.schneider@gmail.com
Source: https://deviceatlas.com/

Recommended for you

CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato
CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE DonatoCONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato
CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato

"Le potenzialità del Digital Twin per il settore Water"

Unit 1 Information Storage and Retrieval
Unit 1 Information Storage and RetrievalUnit 1 Information Storage and Retrieval
Unit 1 Information Storage and Retrieval

Introduction to information retrieval, Major challenges in IR

Understanding Cybersecurity Breaches: Causes, Consequences, and Prevention
Understanding Cybersecurity Breaches: Causes, Consequences, and PreventionUnderstanding Cybersecurity Breaches: Causes, Consequences, and Prevention
Understanding Cybersecurity Breaches: Causes, Consequences, and Prevention

Cybersecurity breaches are a growing threat in today’s interconnected digital landscape, affecting individuals, businesses, and governments alike. These breaches compromise sensitive information and erode trust in online services and systems. Understanding the causes, consequences, and prevention strategies of cybersecurity breaches is crucial to protect against these pervasive risks. Cybersecurity breaches refer to unauthorized access, manipulation, or destruction of digital information or systems. They can occur through various means such as malware, phishing attacks, insider threats, and vulnerabilities in software or hardware. Once a breach happens, cybercriminals can exploit the compromised data for financial gain, espionage, or sabotage. Causes of breaches include software and hardware vulnerabilities, phishing attacks, insider threats, weak passwords, and a lack of security awareness. The consequences of cybersecurity breaches are severe. Financial loss is a significant impact, as organizations face theft of funds, legal fees, and repair costs. Breaches also damage reputations, leading to a loss of trust among customers, partners, and stakeholders. Regulatory penalties are another consequence, with hefty fines imposed for non-compliance with data protection regulations. Intellectual property theft undermines innovation and competitiveness, while disruptions of critical services like healthcare and utilities impact public safety and well-being.

cybersecurity breachesdata securityphishing attacks
Device models
● Huawei (13,3%)
surpassed Apple
(11,9%) in market
share in Q2/2018
● Q1/2019: 19% global
market share
© Martin Schneider, mart.schneider@gmail.com
Device models
Market specifics
● India: 20% Xiaomi (#3) = 2/3 are neither Apple nor Samsung
● Myanmar (2018): 19% Oppo (#2), 18% Vivo (#3), 13% Xiaomi (#4), 11%
Huawei (#5) = 70% not Apple and Samsung
● Pakistan: 11% QMobile (#2)
● Bangladesh: 14% Symphony (#2)
Sources:
https://www.gartner.com/en/newsroom/press-releases/2018-08-28-gartner-says-huawei-secured-no-2-
worldwide-smartphone-vendor-spot-surpassing-apple-in-second-quarter, https://deviceatlas.com/
© Martin Schneider, mart.schneider@gmail.com
Device models
● AWS Device Farm doesn't have any Huawei, Xiaomi, Oppo or Vivo models
(in their public cloud)
● Browserstack only supports Samsung, Google and Apple phones (and one
OnePlus model)
Sources:
https://www.gartner.com/en/newsroom/press-releases/2018-08-28-gartner-says-huawei-secured-no-2-
worldwide-smartphone-vendor-spot-surpassing-apple-in-second-quarter, https://deviceatlas.com,
https://www.browserstack.com/list-of-browsers-and-platforms/app_automate, http://awsdevicefarm.info
© Martin Schneider, mart.schneider@gmail.com
Demos
We will run the same login test on AWS Devicefarm, Browserstack and locally.
AWS Devicefarm
● package the test configuration into a test spec and upload to AWS
● upload the APK file to AWS
● package our tests (+framework) and upload to AWS
● select an available device (using device filters)
● execute the tests and process the results
Browserstack
● upload the APK file to Browserstack
● configure the execution (this includes the device selection) using Capabilities
● execute the tests and process the results
www.justtestlah.qa
https://medium.com/@mart.schneider/mobile-test-automation-using-aws-device-farm-6bcf825fa27d
© Martin Schneider, mart.schneider@gmail.com

Recommended for you

21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx
21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx
21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx

Notes of Construction management and entrepreneurship

construction management
OCS Training - Rig Equipment Inspection - Advanced 5 Days_IADC.pdf
OCS Training - Rig Equipment Inspection - Advanced 5 Days_IADC.pdfOCS Training - Rig Equipment Inspection - Advanced 5 Days_IADC.pdf
OCS Training - Rig Equipment Inspection - Advanced 5 Days_IADC.pdf

OCS Training Institute is pleased to co-operate with a Global provider of Rig Inspection/Audits, Commission-ing, Compliance & Acceptance as well as & Engineering for Offshore Drilling Rigs, to deliver Drilling Rig Inspec-tion Workshops (RIW) which teaches the inspection & maintenance procedures required to ensure equipment integrity. Candidates learn to implement the relevant standards & understand industry requirements so that they can verify the condition of a rig’s equipment & improve safety, thus reducing the number of accidents and protecting the asset.

traininginspectiontrainingcourse
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model SafeBangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe

For Ad post Contact : adityaroy0215@gmail.com Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe

Appium tips and tricks
#1 Network Conditions
● Toggle Airplane - driver.toggleAirplaneMode ();
● Toggle Data - driver.toggleData();
● Toggle Wifi - driver.toggleWifi();
#2 Android Emulator commands
● Send SMS -
driver.sendSMS("555-123-4567", "Hey?");
● GSM Call -
driver.makeGsmCall("5551234567", GsmCallActions.CALL);
● GSM Signal -
driver.setGsmSignalStrength(GsmSignalStrength.GOOD);
● Geo Location -
driver.setLocation(new Location(49, 123, 10));
#3 Dealing With An Element When Visibility Is False
// first, find our element
WebElement ref = wait
.until(ExpectedConditions .presenceOfElementLocated (element));
// get the location and dimensions of the reference element, and find its
center point
Rectangle rect = ref.getRect();
int refElMidX = rect.getX() + rect.getWidth() / 2;
int refElMidY = rect.getY() + rect.getHeight() / 2;
// set the center point of our desired element; w
int desiredElMidX = refElMidX;
int desiredElMidY = refElMidY - rect.getHeight();
// perform the TouchAction that will tap the desired point
TouchAction action = new TouchAction<>(driver);
action.press(PointOption.point(desiredElMidX, desiredElMidY ));
action.waitAction(WaitOptions.waitOptions(Duration.ofMillis(500)));
action.release();
action.perform();

Recommended for you

Unblocking The Main Thread - Solving ANRs and Frozen Frames
Unblocking The Main Thread - Solving ANRs and Frozen FramesUnblocking The Main Thread - Solving ANRs and Frozen Frames
Unblocking The Main Thread - Solving ANRs and Frozen Frames

In the realm of Android development, the main thread is our stage, but too often, it becomes a battleground where performance issues arise, leading to ANRS, frozen frames, and sluggish Uls. As we strive for excellence in user experience, understanding and optimizing the main thread becomes essential to prevent these common perforrmance bottlenecks. We have strategies and best practices for keeping the main thread uncluttered. We'll examine the root causes of performance issues and techniques for monitoring and improving main thread health as wel as app performance. In this talk, participants will walk away with practical knowledge on enhancing app performance by mastering the main thread. We'll share proven approaches to eliminate real-life ANRS and frozen frames to build apps that deliver butter smooth experience.

androidperformance
Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...
Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...
Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...

Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air Mobility

Exploring Deep Learning Models for Image Recognition: A Comparative Review
Exploring Deep Learning Models for Image Recognition: A Comparative ReviewExploring Deep Learning Models for Image Recognition: A Comparative Review
Exploring Deep Learning Models for Image Recognition: A Comparative Review

Image recognition, which comes under Artificial Intelligence (AI) is a critical aspect of computer vision, enabling computers or other computing devices to identify and categorize objects within images. Among numerous fields of life, food processing is an important area, in which image processing plays a vital role, both for producers and consumers. This study focuses on the binary classification of strawberries, where images are sorted into one of two categories. We Utilized a dataset of strawberry images for this study; we aim to determine the effectiveness of different models in identifying whether an image contains strawberries. This research has practical applications in fields such as agriculture and quality control. We compared various popular deep learning models, including MobileNetV2, Convolutional Neural Networks (CNN), and DenseNet121, for binary classification of strawberry images. The accuracy achieved by MobileNetV2 is 96.7%, CNN is 99.8%, and DenseNet121 is 93.6%. Through rigorous testing and analysis, our results demonstrate that CNN outperforms the other models in this task. In the future, the deep learning models can be evaluated on a richer and larger number of images (datasets) for better/improved results.

image recognitiondeep learning
#4 Speeding Up Your Tests
● Deeplinks
driver.get("theapp://login/" + AUTH_USER + "/" + AUTH_PASS);
● OptionalIntentArguments
caps.setCapability("optionalInentArguments", String.format("-e "username"
"%s" -e "password" "%s"", AUTH_USER, AUTH_PASS));
#5 Fine Tuning The Capabilities - Cross Platform
● Cross Platform
○ noReset
○ fullReset
○ isHeadless
#6 Fine Tuning The Capabilities - Android
● Android
○ disableAndroidWatchers
○ autoGrantPermissions
○ skipUnlock
○ ignoreUnimportantViews
#7 Fine Tuning The Capabilities - iOS
● iOS
○ usePrebuildWDA and derivedDataPath
○ useJSONSource
○ iosInstallPause
○ maxTypingFrequency
○ realDeviceScreenShotter
○ simpleIsVisibleCheck

Recommended for you

21EC63_Module1B.pptx VLSI design 21ec63 MOS TRANSISTOR THEORY
21EC63_Module1B.pptx VLSI design 21ec63 MOS TRANSISTOR THEORY21EC63_Module1B.pptx VLSI design 21ec63 MOS TRANSISTOR THEORY
21EC63_Module1B.pptx VLSI design 21ec63 MOS TRANSISTOR THEORY

VLSI design 21ec63 MOS TRANSISTOR THEORY

Natural Is The Best: Model-Agnostic Code Simplification for Pre-trained Large...
Natural Is The Best: Model-Agnostic Code Simplification for Pre-trained Large...Natural Is The Best: Model-Agnostic Code Simplification for Pre-trained Large...
Natural Is The Best: Model-Agnostic Code Simplification for Pre-trained Large...

Pre-trained Large Language Models (LLM) have achieved remarkable successes in several domains. However, code-oriented LLMs are often heavy in computational complexity, and quadratically with the length of the input code sequence. Toward simplifying the input program of an LLM, the state-of-the-art approach has the strategies to filter the input code tokens based on the attention scores given by the LLM. The decision to simplify the input program should not rely on the attention patterns of an LLM, as these patterns are influenced by both the model architecture and the pre-training dataset. Since the model and dataset are part of the solution domain, not the problem domain where the input program belongs, the outcome may differ when the model is trained on a different dataset. We propose SlimCode, a model-agnostic code simplification solution for LLMs that depends on the nature of input code tokens. As an empirical study on the LLMs including CodeBERT, CodeT5, and GPT-4 for two main tasks: code search and summarization. We reported that 1) the reduction ratio of code has a linear-like relation with the saving ratio on training time, 2) the impact of categorized tokens on code simplification can vary significantly, 3) the impact of categorized tokens on code simplification is task-specific but model-agnostic, and 4) the above findings hold for the paradigm–prompt engineering and interactive in-context learning and this study can save reduce the cost of invoking GPT-4 by 24%per API query. Importantly, SlimCode simplifies the input code with its greedy strategy and can obtain at most 133 times faster than the state-of-the-art technique with a significant improvement. This paper calls for a new direction on code-based, model-agnostic code simplification solutions to further empower LLMs.

code simplification
IS Code SP 23: Handbook on concrete mixes
IS Code SP 23: Handbook  on concrete mixesIS Code SP 23: Handbook  on concrete mixes
IS Code SP 23: Handbook on concrete mixes

SP-23: Hand Bank on Concrete Mixes required at the time designing

sp-23: hand bank of concrete
#8 Testing App Upgrades
Android
driver.installApp("/path/to/apk" );
driver.startActivity(activity);
iOS
HashMap<String, String> bundleArgs = new HashMap<>();
bundleArgs.put("bundleId", BUNDLE_ID);
driver.executeScript("mobile: terminateApp" , bundleArgs);
HashMap<String, String> installArgs = new HashMap<>();
installArgs.put("app", appUpgradeVersion );
driver.executeScript("mobile: installApp" , installArgs);
driver.executeScript("mobile: launchApp" , bundleArgs);
#9 Switching Between Apps
● Android
driver.startActivity(settingsAppPackageName , settingsAppActivityName );
● iOS
// launch the photos app (with the special bundle id seen below)
HashMap<String, Object> args = new HashMap<>();
args.put("bundleId", "com.apple.mobileslideshow" );
driver.executeScript("mobile: launchApp" , args);
// re-activate that AUT (in this case The App)
args.put("bundleId", "io.cloudgrey.the-app" );
driver.executeScript("mobile: activateApp" , args);
#10 Testing The Push Notifications
1. Kill The App driver.terminateApp(bundleId or pkg );
2. Open The Notification Pannel
a. Android driver.openNotifications ();
b. iOS Swipe From Top Down to show the notification centre
3. Wait For Push Notification Content
4. Close The Panel and Relaunch The App
driver.activateApp(bundleId or pkg );
#11 Automating Custom iOS Alerts
wait.until(ExpectedConditions .alertIsPresent ());
HashMap<String, String> args = new HashMap<>();
args.put("action", "getButtons");
List<String> buttons = (List<String>)driver.executeScript("mobile:
alert", args);
// find the text of the button which isn't 'OK' or 'Cancel'
String buttonLabel = null;
for (String button : buttons) {
if (button.equals("OK") || button.equals("Cancel")) {
continue;}
buttonLabel = button;}
if (buttonLabel == null) {
throw new Error("Did not get a third alert button as we were
expecting");
}
args.put("action", "accept");
args.put("buttonLabel", buttonLabel);
driver.executeScript("mobile: alert" , args);

Recommended for you

#12 Automating A Picker Wheel On iOS
1. Using SendKeys
pickerWheelElement.sendKeys("March");
2. Picker Wheel Value
HashMap<String, Object> params = new HashMap<>();
params.put("order", "next");
params.put("offset", 0.15);
params.put("element", ((RemoteWebElement)
pickerWheelElement).getId());
driver.executeScript("mobile:
selectPickerWheelValue", params);
#13 Video Recording The Test Execution
IOSStartScreenRecordingOptions
iOSStartScreenRecordingOptions =new
IOSStartScreenRecordingOptions().withVideoQuality(IOSStartSc
reenRecordingOptions.VideoQuality.HIGH).withTimeLimit(Durati
on.ofSeconds(SCREEN_RECORD_DURATION));
driver.startRecordingScreen(iOSStartScreenRecordingOptions);
record = ((IOSDriver) driver).stopRecordingScreen();
byte[] decode = Base64.getDecoder().decode(record);
File videoFile =new File(new
StringBuilder().append(“MyVideo.Mp4”).toString());
FileUtils.writeByteArrayToFile(videoFile, decode);
#14 Parallel And Distributed Testing
● Running multiple Appium servers, and sending one session to each server
● Running one Appium server, and sending multiple sessions to it
● Running one or more Appium servers behind the Selenium Grid Hub, and
sending all sessions to the Grid Hub
● Leveraging a cloud provider (which itself is running many Appium servers,
most likely behind some single gateway)
#15 Desktop App Automation
● Appium for Mac - https://github.com/appium/appium-for-mac
● WinAppDriver - https://github.com/Microsoft/WinAppDriver

Recommended for you

Quiz Time
Go to https://kahoot.it
References
● http://appium.io
● https://appiumpro.com/editions
● https://github.com/SrinivasanTarget/awesome-appium
● https://github.com/appium/appium/tree/master/docs/en/advanced-concepts
● https://github.com/singapore-appium-meetup/meetups
● https://www.justtestlah.qa

More Related Content

What's hot

Mobile Test Automation - Appium
Mobile Test Automation - AppiumMobile Test Automation - Appium
Mobile Test Automation - Appium
Maria Machlowska
 
Android & iOS Automation Using Appium
Android & iOS Automation Using AppiumAndroid & iOS Automation Using Appium
Android & iOS Automation Using Appium
Mindfire Solutions
 
Testing Native iOS Apps with Appium
Testing Native iOS Apps with AppiumTesting Native iOS Apps with Appium
Testing Native iOS Apps with Appium
Sauce Labs
 
Appium
AppiumAppium
What's New With Appium? From 1.0 to Now
What's New With Appium? From 1.0 to NowWhat's New With Appium? From 1.0 to Now
What's New With Appium? From 1.0 to Now
Sauce Labs
 
Using Selenium to Test Native Apps (Wait, you can do that?)
Using Selenium to Test Native Apps (Wait, you can do that?)Using Selenium to Test Native Apps (Wait, you can do that?)
Using Selenium to Test Native Apps (Wait, you can do that?)
Sauce Labs
 
Appium@Work at PAYBACK
Appium@Work at PAYBACKAppium@Work at PAYBACK
Appium@Work at PAYBACK
Marcel Gehlen
 
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on WebinarParallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
Bitbar
 
Appium ppt
Appium pptAppium ppt
Appium ppt
natashasweety7
 
Appium Interview Questions and Answers | Edureka
Appium Interview Questions and Answers | EdurekaAppium Interview Questions and Answers | Edureka
Appium Interview Questions and Answers | Edureka
Edureka!
 
Mobile Automation with Appium
Mobile Automation with AppiumMobile Automation with Appium
Mobile Automation with Appium
Manoj Kumar Kumar
 
Appium: Mobile Automation Made Awesome
Appium: Mobile Automation Made AwesomeAppium: Mobile Automation Made Awesome
Appium: Mobile Automation Made Awesome
Netcetera
 
Vietnam qa meetup
Vietnam qa meetupVietnam qa meetup
Vietnam qa meetup
Syam Sasi
 
Automated UI Testing Frameworks
Automated UI Testing FrameworksAutomated UI Testing Frameworks
Automated UI Testing Frameworks
TestObject - Mobile Testing
 
Appium - test automation for mobile apps
Appium - test automation for mobile appsAppium - test automation for mobile apps
Appium - test automation for mobile apps
Aleksejs Trescalins
 
Cross Platform Appium Tests: How To
Cross Platform Appium Tests: How ToCross Platform Appium Tests: How To
Cross Platform Appium Tests: How To
GlobalLogic Ukraine
 
Appium
AppiumAppium
Automation Testing With Appium
Automation Testing With AppiumAutomation Testing With Appium
Automation Testing With Appium
Knoldus Inc.
 
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
Wim Selles
 
Introduction To Appium With Robotframework
Introduction To Appium With RobotframeworkIntroduction To Appium With Robotframework
Introduction To Appium With Robotframework
Syam Sasi
 

What's hot (20)

Mobile Test Automation - Appium
Mobile Test Automation - AppiumMobile Test Automation - Appium
Mobile Test Automation - Appium
 
Android & iOS Automation Using Appium
Android & iOS Automation Using AppiumAndroid & iOS Automation Using Appium
Android & iOS Automation Using Appium
 
Testing Native iOS Apps with Appium
Testing Native iOS Apps with AppiumTesting Native iOS Apps with Appium
Testing Native iOS Apps with Appium
 
Appium
AppiumAppium
Appium
 
What's New With Appium? From 1.0 to Now
What's New With Appium? From 1.0 to NowWhat's New With Appium? From 1.0 to Now
What's New With Appium? From 1.0 to Now
 
Using Selenium to Test Native Apps (Wait, you can do that?)
Using Selenium to Test Native Apps (Wait, you can do that?)Using Selenium to Test Native Apps (Wait, you can do that?)
Using Selenium to Test Native Apps (Wait, you can do that?)
 
Appium@Work at PAYBACK
Appium@Work at PAYBACKAppium@Work at PAYBACK
Appium@Work at PAYBACK
 
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on WebinarParallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
 
Appium ppt
Appium pptAppium ppt
Appium ppt
 
Appium Interview Questions and Answers | Edureka
Appium Interview Questions and Answers | EdurekaAppium Interview Questions and Answers | Edureka
Appium Interview Questions and Answers | Edureka
 
Mobile Automation with Appium
Mobile Automation with AppiumMobile Automation with Appium
Mobile Automation with Appium
 
Appium: Mobile Automation Made Awesome
Appium: Mobile Automation Made AwesomeAppium: Mobile Automation Made Awesome
Appium: Mobile Automation Made Awesome
 
Vietnam qa meetup
Vietnam qa meetupVietnam qa meetup
Vietnam qa meetup
 
Automated UI Testing Frameworks
Automated UI Testing FrameworksAutomated UI Testing Frameworks
Automated UI Testing Frameworks
 
Appium - test automation for mobile apps
Appium - test automation for mobile appsAppium - test automation for mobile apps
Appium - test automation for mobile apps
 
Cross Platform Appium Tests: How To
Cross Platform Appium Tests: How ToCross Platform Appium Tests: How To
Cross Platform Appium Tests: How To
 
Appium
AppiumAppium
Appium
 
Automation Testing With Appium
Automation Testing With AppiumAutomation Testing With Appium
Automation Testing With Appium
 
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
 
Introduction To Appium With Robotframework
Introduction To Appium With RobotframeworkIntroduction To Appium With Robotframework
Introduction To Appium With Robotframework
 

Similar to Appium workshop technopark trivandrum

Dive into Angular, part 5: Experience
Dive into Angular, part 5: ExperienceDive into Angular, part 5: Experience
Dive into Angular, part 5: Experience
Oleksii Prohonnyi
 
A Comprehensive Guide to Conducting Test Automation Using Appium & Cucumber o...
A Comprehensive Guide to Conducting Test Automation Using Appium & Cucumber o...A Comprehensive Guide to Conducting Test Automation Using Appium & Cucumber o...
A Comprehensive Guide to Conducting Test Automation Using Appium & Cucumber o...
flufftailshop
 
Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017
Matt Raible
 
Building And Executing Test Cases with Appium and Various Test Frameworks.pdf
Building And Executing Test Cases with Appium and Various Test Frameworks.pdfBuilding And Executing Test Cases with Appium and Various Test Frameworks.pdf
Building And Executing Test Cases with Appium and Various Test Frameworks.pdf
pCloudy
 
Good practices for debugging Selenium and Appium tests
Good practices for debugging Selenium and Appium testsGood practices for debugging Selenium and Appium tests
Good practices for debugging Selenium and Appium tests
Abhijeet Vaikar
 
Java Test Automation for REST, Web and Mobile
Java Test Automation for REST, Web and MobileJava Test Automation for REST, Web and Mobile
Java Test Automation for REST, Web and Mobile
Elias Nogueira
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for Java
Lars Vogel
 
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...
COMAQA.BY
 
Microservices for the Masses with Spring Boot, JHipster, and OAuth - Jforum S...
Microservices for the Masses with Spring Boot, JHipster, and OAuth - Jforum S...Microservices for the Masses with Spring Boot, JHipster, and OAuth - Jforum S...
Microservices for the Masses with Spring Boot, JHipster, and OAuth - Jforum S...
Matt Raible
 
An Overview of Angular 4
An Overview of Angular 4 An Overview of Angular 4
Spring Boot
Spring BootSpring Boot
Spring Boot
Jaran Flaath
 
Appium testing api
Appium testing apiAppium testing api
Appium testing api
b4usolution .
 
Ashish Baraiya
Ashish BaraiyaAshish Baraiya
Ashish Baraiya
Ashish Baraiya
 
React django
React djangoReact django
React django
Heber Silva
 
Sst hackathon express
Sst hackathon expressSst hackathon express
Sst hackathon express
Aeshan Wijetunge
 
Mobile automation using selenium cucumber & appium
Mobile automation using selenium cucumber & appiumMobile automation using selenium cucumber & appium
Mobile automation using selenium cucumber & appium
Selenium Cucumber
 
How to kill test flake in appium
How to kill test flake in appiumHow to kill test flake in appium
How to kill test flake in appium
Gaurav Singh
 
Web Development in Django
Web Development in DjangoWeb Development in Django
Web Development in Django
Lakshman Prasad
 
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfA Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
kalichargn70th171
 
Unit testing for ext js apps using sencha test - Walkingtree Technologies
Unit testing for ext js apps using sencha test - Walkingtree TechnologiesUnit testing for ext js apps using sencha test - Walkingtree Technologies
Unit testing for ext js apps using sencha test - Walkingtree Technologies
Walking Tree Technologies
 

Similar to Appium workshop technopark trivandrum (20)

Dive into Angular, part 5: Experience
Dive into Angular, part 5: ExperienceDive into Angular, part 5: Experience
Dive into Angular, part 5: Experience
 
A Comprehensive Guide to Conducting Test Automation Using Appium & Cucumber o...
A Comprehensive Guide to Conducting Test Automation Using Appium & Cucumber o...A Comprehensive Guide to Conducting Test Automation Using Appium & Cucumber o...
A Comprehensive Guide to Conducting Test Automation Using Appium & Cucumber o...
 
Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017
 
Building And Executing Test Cases with Appium and Various Test Frameworks.pdf
Building And Executing Test Cases with Appium and Various Test Frameworks.pdfBuilding And Executing Test Cases with Appium and Various Test Frameworks.pdf
Building And Executing Test Cases with Appium and Various Test Frameworks.pdf
 
Good practices for debugging Selenium and Appium tests
Good practices for debugging Selenium and Appium testsGood practices for debugging Selenium and Appium tests
Good practices for debugging Selenium and Appium tests
 
Java Test Automation for REST, Web and Mobile
Java Test Automation for REST, Web and MobileJava Test Automation for REST, Web and Mobile
Java Test Automation for REST, Web and Mobile
 
Google App Engine for Java
Google App Engine for JavaGoogle App Engine for Java
Google App Engine for Java
 
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...
Тестирование мобильных приложений используя облачные сервисы. TestDroid, Test...
 
Microservices for the Masses with Spring Boot, JHipster, and OAuth - Jforum S...
Microservices for the Masses with Spring Boot, JHipster, and OAuth - Jforum S...Microservices for the Masses with Spring Boot, JHipster, and OAuth - Jforum S...
Microservices for the Masses with Spring Boot, JHipster, and OAuth - Jforum S...
 
An Overview of Angular 4
An Overview of Angular 4 An Overview of Angular 4
An Overview of Angular 4
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Appium testing api
Appium testing apiAppium testing api
Appium testing api
 
Ashish Baraiya
Ashish BaraiyaAshish Baraiya
Ashish Baraiya
 
React django
React djangoReact django
React django
 
Sst hackathon express
Sst hackathon expressSst hackathon express
Sst hackathon express
 
Mobile automation using selenium cucumber & appium
Mobile automation using selenium cucumber & appiumMobile automation using selenium cucumber & appium
Mobile automation using selenium cucumber & appium
 
How to kill test flake in appium
How to kill test flake in appiumHow to kill test flake in appium
How to kill test flake in appium
 
Web Development in Django
Web Development in DjangoWeb Development in Django
Web Development in Django
 
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfA Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
 
Unit testing for ext js apps using sencha test - Walkingtree Technologies
Unit testing for ext js apps using sencha test - Walkingtree TechnologiesUnit testing for ext js apps using sencha test - Walkingtree Technologies
Unit testing for ext js apps using sencha test - Walkingtree Technologies
 

Recently uploaded

Evento anual Splunk .conf24 Highlights recap
Evento anual Splunk .conf24 Highlights recapEvento anual Splunk .conf24 Highlights recap
Evento anual Splunk .conf24 Highlights recap
Rafael Santos
 
PMSM-Motor-Control : A research about FOC
PMSM-Motor-Control : A research about FOCPMSM-Motor-Control : A research about FOC
PMSM-Motor-Control : A research about FOC
itssurajthakur06
 
Chlorine and Nitric Acid application, properties, impacts.pptx
Chlorine and Nitric Acid application, properties, impacts.pptxChlorine and Nitric Acid application, properties, impacts.pptx
Chlorine and Nitric Acid application, properties, impacts.pptx
yadavsuyash008
 
Response & Safe AI at Summer School of AI at IIITH
Response & Safe AI at Summer School of AI at IIITHResponse & Safe AI at Summer School of AI at IIITH
Response & Safe AI at Summer School of AI at IIITH
IIIT Hyderabad
 
L-3536-Cost Benifit Analysis in ESIA.pptx
L-3536-Cost Benifit Analysis in ESIA.pptxL-3536-Cost Benifit Analysis in ESIA.pptx
L-3536-Cost Benifit Analysis in ESIA.pptx
naseki5964
 
1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT
1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT
1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT
Mani Krishna Sarkar
 
kiln burning and kiln burner system for clinker
kiln burning and kiln burner system for clinkerkiln burning and kiln burner system for clinker
kiln burning and kiln burner system for clinker
hamedmustafa094
 
Conservation of Taksar through Economic Regeneration
Conservation of Taksar through Economic RegenerationConservation of Taksar through Economic Regeneration
Conservation of Taksar through Economic Regeneration
PriyankaKarn3
 
CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato
CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE DonatoCONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato
CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato
Servizi a rete
 
Unit 1 Information Storage and Retrieval
Unit 1 Information Storage and RetrievalUnit 1 Information Storage and Retrieval
Unit 1 Information Storage and Retrieval
KishorMahale5
 
Understanding Cybersecurity Breaches: Causes, Consequences, and Prevention
Understanding Cybersecurity Breaches: Causes, Consequences, and PreventionUnderstanding Cybersecurity Breaches: Causes, Consequences, and Prevention
Understanding Cybersecurity Breaches: Causes, Consequences, and Prevention
Bert Blevins
 
21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx
21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx
21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx
sanabts249
 
OCS Training - Rig Equipment Inspection - Advanced 5 Days_IADC.pdf
OCS Training - Rig Equipment Inspection - Advanced 5 Days_IADC.pdfOCS Training - Rig Equipment Inspection - Advanced 5 Days_IADC.pdf
OCS Training - Rig Equipment Inspection - Advanced 5 Days_IADC.pdf
Muanisa Waras
 
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model SafeBangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
bookhotbebes1
 
Unblocking The Main Thread - Solving ANRs and Frozen Frames
Unblocking The Main Thread - Solving ANRs and Frozen FramesUnblocking The Main Thread - Solving ANRs and Frozen Frames
Unblocking The Main Thread - Solving ANRs and Frozen Frames
Sinan KOZAK
 
Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...
Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...
Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...
VICTOR MAESTRE RAMIREZ
 
Exploring Deep Learning Models for Image Recognition: A Comparative Review
Exploring Deep Learning Models for Image Recognition: A Comparative ReviewExploring Deep Learning Models for Image Recognition: A Comparative Review
Exploring Deep Learning Models for Image Recognition: A Comparative Review
sipij
 
21EC63_Module1B.pptx VLSI design 21ec63 MOS TRANSISTOR THEORY
21EC63_Module1B.pptx VLSI design 21ec63 MOS TRANSISTOR THEORY21EC63_Module1B.pptx VLSI design 21ec63 MOS TRANSISTOR THEORY
21EC63_Module1B.pptx VLSI design 21ec63 MOS TRANSISTOR THEORY
PradeepKumarSK3
 
Natural Is The Best: Model-Agnostic Code Simplification for Pre-trained Large...
Natural Is The Best: Model-Agnostic Code Simplification for Pre-trained Large...Natural Is The Best: Model-Agnostic Code Simplification for Pre-trained Large...
Natural Is The Best: Model-Agnostic Code Simplification for Pre-trained Large...
YanKing2
 
IS Code SP 23: Handbook on concrete mixes
IS Code SP 23: Handbook  on concrete mixesIS Code SP 23: Handbook  on concrete mixes
IS Code SP 23: Handbook on concrete mixes
Mani Krishna Sarkar
 

Recently uploaded (20)

Evento anual Splunk .conf24 Highlights recap
Evento anual Splunk .conf24 Highlights recapEvento anual Splunk .conf24 Highlights recap
Evento anual Splunk .conf24 Highlights recap
 
PMSM-Motor-Control : A research about FOC
PMSM-Motor-Control : A research about FOCPMSM-Motor-Control : A research about FOC
PMSM-Motor-Control : A research about FOC
 
Chlorine and Nitric Acid application, properties, impacts.pptx
Chlorine and Nitric Acid application, properties, impacts.pptxChlorine and Nitric Acid application, properties, impacts.pptx
Chlorine and Nitric Acid application, properties, impacts.pptx
 
Response & Safe AI at Summer School of AI at IIITH
Response & Safe AI at Summer School of AI at IIITHResponse & Safe AI at Summer School of AI at IIITH
Response & Safe AI at Summer School of AI at IIITH
 
L-3536-Cost Benifit Analysis in ESIA.pptx
L-3536-Cost Benifit Analysis in ESIA.pptxL-3536-Cost Benifit Analysis in ESIA.pptx
L-3536-Cost Benifit Analysis in ESIA.pptx
 
1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT
1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT
1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT
 
kiln burning and kiln burner system for clinker
kiln burning and kiln burner system for clinkerkiln burning and kiln burner system for clinker
kiln burning and kiln burner system for clinker
 
Conservation of Taksar through Economic Regeneration
Conservation of Taksar through Economic RegenerationConservation of Taksar through Economic Regeneration
Conservation of Taksar through Economic Regeneration
 
CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato
CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE DonatoCONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato
CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato
 
Unit 1 Information Storage and Retrieval
Unit 1 Information Storage and RetrievalUnit 1 Information Storage and Retrieval
Unit 1 Information Storage and Retrieval
 
Understanding Cybersecurity Breaches: Causes, Consequences, and Prevention
Understanding Cybersecurity Breaches: Causes, Consequences, and PreventionUnderstanding Cybersecurity Breaches: Causes, Consequences, and Prevention
Understanding Cybersecurity Breaches: Causes, Consequences, and Prevention
 
21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx
21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx
21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx
 
OCS Training - Rig Equipment Inspection - Advanced 5 Days_IADC.pdf
OCS Training - Rig Equipment Inspection - Advanced 5 Days_IADC.pdfOCS Training - Rig Equipment Inspection - Advanced 5 Days_IADC.pdf
OCS Training - Rig Equipment Inspection - Advanced 5 Days_IADC.pdf
 
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model SafeBangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
 
Unblocking The Main Thread - Solving ANRs and Frozen Frames
Unblocking The Main Thread - Solving ANRs and Frozen FramesUnblocking The Main Thread - Solving ANRs and Frozen Frames
Unblocking The Main Thread - Solving ANRs and Frozen Frames
 
Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...
Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...
Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...
 
Exploring Deep Learning Models for Image Recognition: A Comparative Review
Exploring Deep Learning Models for Image Recognition: A Comparative ReviewExploring Deep Learning Models for Image Recognition: A Comparative Review
Exploring Deep Learning Models for Image Recognition: A Comparative Review
 
21EC63_Module1B.pptx VLSI design 21ec63 MOS TRANSISTOR THEORY
21EC63_Module1B.pptx VLSI design 21ec63 MOS TRANSISTOR THEORY21EC63_Module1B.pptx VLSI design 21ec63 MOS TRANSISTOR THEORY
21EC63_Module1B.pptx VLSI design 21ec63 MOS TRANSISTOR THEORY
 
Natural Is The Best: Model-Agnostic Code Simplification for Pre-trained Large...
Natural Is The Best: Model-Agnostic Code Simplification for Pre-trained Large...Natural Is The Best: Model-Agnostic Code Simplification for Pre-trained Large...
Natural Is The Best: Model-Agnostic Code Simplification for Pre-trained Large...
 
IS Code SP 23: Handbook on concrete mixes
IS Code SP 23: Handbook  on concrete mixesIS Code SP 23: Handbook  on concrete mixes
IS Code SP 23: Handbook on concrete mixes
 

Appium workshop technopark trivandrum

  • 1. Appium workshop Syam Sasi Martin Schneider Technopark Trivandrum, 18.05.2019
  • 3. About us Syam Sasi Senior Software Engineer @ Carousell https://about.me/syamsasi Martin Schneider Senior Software Engineer @ Carousell mart.schneider@gmail.com
  • 6. A brief (overly simplified) history of UI test automation 1993: QA Partner (Segue Software) 1996: QA Partner → Silk Test 2004: Selenium created at ThoughtWorks (Jason Huggins) 2005: Robot Framework (Pekka Klärck) 2006: Borland acquires Silk Test 2007: WebDriver (Simon Stewart) 2008: Selenium Grid 2008: Cucumber (Aslak Hellesøy) 2009: Selenium + WebDriver = Selenium 2.0 2009: MicroFocus acquires Borland 2009: Silk4J 2011: iOS Auto (Dan Cuellar) 2013: Espresso 2014: Appium 1.0 (Saucelabs) 2017: Silk Webdriver © Martin Schneider, mart.schneider@gmail.com
  • 7. The history of Appium 2011: Dan Cuellar creates iOSAuto, a tool for iOS automation written in C# 2012: Dan presents Appium during a Lightning Talk at the 2012 Selenium Conference in London 2012: Dan rewrites appium in Python and open-sources it under the Apache 2 license 2012: Cooperation with Jason Huggins (Selenium co-founder) starts 2013: Saucelabs starts backing Appium 2013: Appium is rewritten using node.js 2013: Android support is added → first truly platform-independent mobile testing framework 2014: Appium 1.0 is released 2016: Drivers for Windows desktop and youi.tv automation are added 2016: Appium is donated to the JS Foundation The journey continues! http://appium.io/history.html https://github.com/appium http://appium.io/ © Martin Schneider, mart.schneider@gmail.com
  • 8. Coffee break reading material ;-) https://www.infoq.com/news/2018/04/cucumber -bdd-ten-years https://www.seleniumhq.org/about/history.jsp http://appium.io/history.html © Martin Schneider, mart.schneider@gmail.com
  • 10. Appium philosophy 1. You shouldn't have to recompile your app or modify it in any way in order to automate it. 2. You shouldn't be locked into a specific language or framework to write and run your tests. 3. A mobile automation framework shouldn't reinvent the wheel when it comes to automation APIs. 4. A mobile automation framework should be open source, in spirit and practice as well as in name!
  • 14. Appium architecture Appium client Appium server JSONWP ● Client-server architecture ● Server is written in node.js ● Clients are available for all major programming languages UIAutomator 2 XCUITest
  • 15. Selenium WebDriver driver = new FirefoxDriver(); driver.get("http://www.google.com"); WebElement element = driver.findElement(By.name("q")); element.sendKeys("Appium Meet-up"); element.submit(); ...
  • 16. Appium AppiumDriver driver = driver = new AppiumDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities); IOSElement element = driver.findElement(By.name("search")); element.sendKeys("Appium Meet-up"); element.submit(); ...
  • 18. Appium vs. native frameworks ● Appium is highly portable. ● We can use the same tool to automate Android, iOS, Web (with Selenium) and Windows Desktop applications → multi-platform test frameworks. ● Appium is slower than native automation. ● There is an overhead that comes with the client/server architecture.
  • 19. Appium basics Our first Appium test: ● /appium-demo/src/test/java/io/github/martinschneider/appium/android/CounterTest01.java ● /appium-demo/src/test/java/io/github/martinschneider/appium/android/CounterTest02.java
  • 22. General Capabilities automationName - XCUITest or UiAutomator2 platformName - iOS or Android platformVersion - 7.0, 11.0 deviceName - iPhone6, Samsung Galaxy S8 app - /path/to/apk, app or ipa fullReset - true or false newCommandTimeout - in seconds
  • 24. Why Appium Desktop? ● Inspect Android and iOS App UI ● Search for a mobile element ● Record the actions
  • 26. Inspecting Android App 1. Run appium command in command prompt/terminal 2. Open Appium Desktop 3. Click on Appium > New Session Window 4. Enter the following capabilities and save Note: Pixel is the name of the emulator { "platformName":"android", "deviceName":"Pixel", "automationName":"UiAutomator2", "app":"/path/to/apk/file", "avd","Pixel" }
  • 28. Android locator types ● accessibility ● id ● xpath ● class ● uiAutomator ● image http://appium.io/docs/en/commands/element/find-elements/ https://saucelabs.com/blog/advanced-locator-strategies
  • 29. Android locator types ● /appium-demo/src/test/java/io/github/martinschneider/appium/android/CounterTest03.java ● /appium-demo/src/test/java/io/github/martinschneider/appium/android/CounterTest04.java
  • 31. Appium inspector { "platformName" : "android", "appPackage": "com.thecarousell.Carousell" , "appActivity": "com.thecarousell.Carousell.activities.EntryActivity" , "appPath": "/Users/martinschneider/carousell.apk", "deviceName" : "test", }
  • 33. Macaca inspector ● https://macacajs.github.io/app-inspector/ ● npm i app-inspector -g ● adb devices ● app-inspector -u YOUR-DEVICE-ID ● http://10.0.1.117:5678 ● Does not require Appium or an Appium session
  • 34. Macaca inspector ● https://macacajs.github.io/app-inspector/ ● npm i app-inspector -g ● app-inspector -u YOUR-DEVICE-ID ● http://10.0.1.117:5678/
  • 36. Waiting strategies ● /appium-demo/src/test/java/io/github/martinschneider/appium/android/LoginTest01.java ● /appium-demo/src/test/java/io/github/martinschneider/appium/android/LoginTest02.java ● /appium-demo/src/test/java/io/github/martinschneider/appium/android/LoginTest03.java ● /appium-demo/src/test/java/io/github/martinschneider/appium/android/LoginTest04.java
  • 37. Static wait Thread.sleep(3000); ● Fixed duration for every execution ○ either too long (waste of execution time) ○ or too short (test will still fail) ● Remember: Test behave differently ○ on different environments ○ under different network conditions ○ etc. ● Just ugly and wrong! Avoid at all costs! © Martin Schneider, mart.schneider@gmail.com
  • 38. Implicit wait driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); ● Will wait up to the specified time for every element. ● Speeds up test execution locally but also slows down overall test execution because it is a global setting (no ability to fail fast)! ● Better than static waits but still not quite convenient enough…. © Martin Schneider, mart.schneider@gmail.com
  • 39. WebDriverWait wait = new WebDriverWait(driver, 10); wait.until(presenceOfElementLocated(goToLogin)) .click(); wait.until(presenceOfElementLocated(username)) .sendKeys(username); ● Waits until a condition is met. ● This isn’t limited to visibility. ● We can implement custom conditions. ● We can use different timeouts for different use-cases! Explicit wait © Martin Schneider, mart.schneider@gmail.com
  • 41. The X Y Coordinates
  • 42. The Touch Action Class ● /appium-demo/src/test/java/io/github/martinschneider/appium/android/swipe/SwipeTest.java 1. Touch Action *press*release*moveTo*tap*wait*longPress.cancel.perform TouchAction().press(el1).moveTo(el2).release(); 2. Multi Touch action1 = TouchAction().tap(el1); action2 = TouchAction().tap(el2); MultiAction().add(action1).add(action2).perform();
  • 44. Page objects © Martin Schneider, mart.schneider@gmail.com ● De-facto standard design pattern in UI test automation. ● A page object is an object-oriented class that serves as an interface to a page/screen of your AUT. ● Goals: enhance maintenance, avoid code duplication ● Ideally one page object per page/screen/dialog/component. ● Tests don’t care about the layout and locators of your app. They just interact with page objects. ● We can use mechanisms like Dependency Injection to simplify the use of page objects.
  • 45. Theory is boring... ● /appium-demo/src/test/java/io/github/martinschneider/appium/android/LoginTest05.java ● /appium-demo/src/test/java/io/github/martinschneider/appium/android/LoginTest06.java ● /appium-demo/src/test/java/io/github/martinschneider/appium/android/LoginTest07.java
  • 46. How to design a test framework? Some thoughts
  • 47. How to design a test framework? © Martin Schneider, mart.schneider@gmail.com ● Don’t re-invent the wheel but combine existing tools in a way that best fit your use-case. ● Always keep re-usability, adaptability, extensibility and scalability in mind. ● A quick (and “dirty”) PoC is a start but what’s your use-case in 6 months / 1 year / 5 years… Is your design ready for the change? ● → Have a vision and lay the foundation accordingly. ● Good design now = less refactoring later. ● Test automation requires software engineers (test engineer = engineer). ● Apply the same (or better) practices you have for building the solutions you sell to your customers, always lead by example (quality!). ● Powerful under the hood but super-easy to use. ● A framework is cool but don’t forget the culture in which it is used. https://www.linkedin.com/in/martin-schneider
  • 48. How to design a test framework? © Martin Schneider, mart.schneider@gmail.com Core framework Business model Page objects and DTOs Tests Testdata Cloud integration 3rd party integrations Test helper API layer EXAMPLE Robot
  • 50. Locator Strategy for iOS Accessibility ID driver.findElement(MobileBy.AccessibilityID ("foo")); iOS NS Predicates driver.findElementByIosNsPredicate (tableViews()[1].cells().firstWithPr edicate("label == 'Olivia' " )); iOS Class Chain driver.findElement(MobileBy.iOSClassChain("**/XCUIElementTypeCell[`nam e BEGINSWITH " C"`]/XCUIElementTypeButton[10]" )); ● /appium-demo/src/test/java/io/github/martinschneider/appium/ios/IOSTest.java
  • 51. Real device vs. simulators/emulators
  • 52. Appium On Real Devices - Android © Martin Schneider, mart.schneider@gmail.com 1. Enable USB Debugging 2. Connect the device using usb 3. Note down the udid 4. Device is detected when run the adb devices command https://developer.android.com/studio/debug/dev-options
  • 53. Appium On Real Devices - iOS © Martin Schneider, mart.schneider@gmail.com 1. cd /usr/local/lib/node_modules/appium/node_modules/appium- xcuitest-driver/WebDriverAgent 2. mkdir -p Resources/WebDriverAgent.bundle 3. /bin/bash ./Scripts/bootstrap.sh -d 4. brew install carthage 5. brew install libimobiledevice --HEAD 6. npm install -g ios-deploy 7. UI Automation enabled on iOS device 8. Xcode has proper code sign enabled http://appium.io/docs/en/drivers/ios-xcuitest-real-devices/
  • 54. Which one I need? © Martin Schneider, mart.schneider@gmail.com
  • 56. Next question: How can we scale this? © Martin Schneider, mart.schneider@gmail.com
  • 57. Next question: How can we scale this? © Martin Schneider, mart.schneider@gmail.com
  • 58. On premise vs. cloud ● Full control ○ Number of devices ○ Types of devices ○ Software libraries ○ ... ● No maintenance required ● Fixed costs ● Support ● Maintenance ○ replace devices ○ fix issues ○ infrastructure ○ ... ● Less flexibility ○ Available devices �� Software update cycle? (Appium, Java) © Martin Schneider, mart.schneider@gmail.com
  • 59. Two approaches towards cloud testing #1: Client-side execution Step 1: Upload your APP to the cloud Step 2: Create a WebDriver instance capabilities.setCapability("app", appUrl); new AppiumDriver("http://cloud.com/wd/hub", capabilities); Step 3: Execute your tests as before For example, Browserstack, Saucelabs, pCloudy... © Martin Schneider, mart.schneider@gmail.com
  • 60. Two approaches towards cloud testing #2: Server-side execution Step 1: Upload your APP to the cloud Step 2: Package and upload your tests to the cloud Step 3: Tests get executed on the cloud For example, AWS Devicefarm (public cloud) © Martin Schneider, mart.schneider@gmail.com
  • 61. Client- vs. server-side execution ● Easier migration ○ Execution flow remains the same ○ Reporting and CI remain the same ● More control ○ Software updates on the client side ○ easier to use a mixed/hybrid mode (=use different cloud providers or local + cloud) ● Performance (maybe) ● Network latency ● Trust and compliance ● Integration overhead ○ Test results and reporting ○ Network challenges © Martin Schneider, mart.schneider@gmail.com
  • 62. Factors to consider What’s your use-case? ● Devices ○ specific models, manufacturers, OS versions ● Parallelisation ○ How to distribute n tests across m devices efficiently (each test runs once)? ○ How to run n tests on m devices in parallel (each test runs m times)? ● Time constraints, execution speed, waiting times ○ run tests once a day (“nightly tests”) → not time-critical ○ run tests multiple times a day to verify changes → highly time-critical ● Client- vs. server execution mode ● API support ● Cost and pricing models ● Future use-cases © Martin Schneider, mart.schneider@gmail.com
  • 63. Device models ● In the US Apple and Samsung cover 81% of the market (UK 87%, Singapore 82%, Australia 89% etc.) ● What about Xiaomi, Oppo, Vivo, Lyf...? © Martin Schneider, mart.schneider@gmail.com
  • 64. Device market share in India © Martin Schneider, mart.schneider@gmail.com Source: https://deviceatlas.com/
  • 65. Device models ● Huawei (13,3%) surpassed Apple (11,9%) in market share in Q2/2018 ● Q1/2019: 19% global market share © Martin Schneider, mart.schneider@gmail.com
  • 66. Device models Market specifics ● India: 20% Xiaomi (#3) = 2/3 are neither Apple nor Samsung ● Myanmar (2018): 19% Oppo (#2), 18% Vivo (#3), 13% Xiaomi (#4), 11% Huawei (#5) = 70% not Apple and Samsung ● Pakistan: 11% QMobile (#2) ● Bangladesh: 14% Symphony (#2) Sources: https://www.gartner.com/en/newsroom/press-releases/2018-08-28-gartner-says-huawei-secured-no-2- worldwide-smartphone-vendor-spot-surpassing-apple-in-second-quarter, https://deviceatlas.com/ © Martin Schneider, mart.schneider@gmail.com
  • 67. Device models ● AWS Device Farm doesn't have any Huawei, Xiaomi, Oppo or Vivo models (in their public cloud) ● Browserstack only supports Samsung, Google and Apple phones (and one OnePlus model) Sources: https://www.gartner.com/en/newsroom/press-releases/2018-08-28-gartner-says-huawei-secured-no-2- worldwide-smartphone-vendor-spot-surpassing-apple-in-second-quarter, https://deviceatlas.com, https://www.browserstack.com/list-of-browsers-and-platforms/app_automate, http://awsdevicefarm.info © Martin Schneider, mart.schneider@gmail.com
  • 68. Demos We will run the same login test on AWS Devicefarm, Browserstack and locally. AWS Devicefarm ● package the test configuration into a test spec and upload to AWS ● upload the APK file to AWS ● package our tests (+framework) and upload to AWS ● select an available device (using device filters) ● execute the tests and process the results Browserstack ● upload the APK file to Browserstack ● configure the execution (this includes the device selection) using Capabilities ● execute the tests and process the results www.justtestlah.qa https://medium.com/@mart.schneider/mobile-test-automation-using-aws-device-farm-6bcf825fa27d © Martin Schneider, mart.schneider@gmail.com
  • 69. Appium tips and tricks
  • 70. #1 Network Conditions ● Toggle Airplane - driver.toggleAirplaneMode (); ● Toggle Data - driver.toggleData(); ● Toggle Wifi - driver.toggleWifi();
  • 71. #2 Android Emulator commands ● Send SMS - driver.sendSMS("555-123-4567", "Hey?"); ● GSM Call - driver.makeGsmCall("5551234567", GsmCallActions.CALL); ● GSM Signal - driver.setGsmSignalStrength(GsmSignalStrength.GOOD); ● Geo Location - driver.setLocation(new Location(49, 123, 10));
  • 72. #3 Dealing With An Element When Visibility Is False // first, find our element WebElement ref = wait .until(ExpectedConditions .presenceOfElementLocated (element)); // get the location and dimensions of the reference element, and find its center point Rectangle rect = ref.getRect(); int refElMidX = rect.getX() + rect.getWidth() / 2; int refElMidY = rect.getY() + rect.getHeight() / 2; // set the center point of our desired element; w int desiredElMidX = refElMidX; int desiredElMidY = refElMidY - rect.getHeight(); // perform the TouchAction that will tap the desired point TouchAction action = new TouchAction<>(driver); action.press(PointOption.point(desiredElMidX, desiredElMidY )); action.waitAction(WaitOptions.waitOptions(Duration.ofMillis(500))); action.release(); action.perform();
  • 73. #4 Speeding Up Your Tests ● Deeplinks driver.get("theapp://login/" + AUTH_USER + "/" + AUTH_PASS); ● OptionalIntentArguments caps.setCapability("optionalInentArguments", String.format("-e "username" "%s" -e "password" "%s"", AUTH_USER, AUTH_PASS));
  • 74. #5 Fine Tuning The Capabilities - Cross Platform ● Cross Platform ○ noReset ○ fullReset ○ isHeadless
  • 75. #6 Fine Tuning The Capabilities - Android ● Android ○ disableAndroidWatchers ○ autoGrantPermissions ○ skipUnlock ○ ignoreUnimportantViews
  • 76. #7 Fine Tuning The Capabilities - iOS ● iOS ○ usePrebuildWDA and derivedDataPath ○ useJSONSource ○ iosInstallPause ○ maxTypingFrequency ○ realDeviceScreenShotter ○ simpleIsVisibleCheck
  • 77. #8 Testing App Upgrades Android driver.installApp("/path/to/apk" ); driver.startActivity(activity); iOS HashMap<String, String> bundleArgs = new HashMap<>(); bundleArgs.put("bundleId", BUNDLE_ID); driver.executeScript("mobile: terminateApp" , bundleArgs); HashMap<String, String> installArgs = new HashMap<>(); installArgs.put("app", appUpgradeVersion ); driver.executeScript("mobile: installApp" , installArgs); driver.executeScript("mobile: launchApp" , bundleArgs);
  • 78. #9 Switching Between Apps ● Android driver.startActivity(settingsAppPackageName , settingsAppActivityName ); ● iOS // launch the photos app (with the special bundle id seen below) HashMap<String, Object> args = new HashMap<>(); args.put("bundleId", "com.apple.mobileslideshow" ); driver.executeScript("mobile: launchApp" , args); // re-activate that AUT (in this case The App) args.put("bundleId", "io.cloudgrey.the-app" ); driver.executeScript("mobile: activateApp" , args);
  • 79. #10 Testing The Push Notifications 1. Kill The App driver.terminateApp(bundleId or pkg ); 2. Open The Notification Pannel a. Android driver.openNotifications (); b. iOS Swipe From Top Down to show the notification centre 3. Wait For Push Notification Content 4. Close The Panel and Relaunch The App driver.activateApp(bundleId or pkg );
  • 80. #11 Automating Custom iOS Alerts wait.until(ExpectedConditions .alertIsPresent ()); HashMap<String, String> args = new HashMap<>(); args.put("action", "getButtons"); List<String> buttons = (List<String>)driver.executeScript("mobile: alert", args); // find the text of the button which isn't 'OK' or 'Cancel' String buttonLabel = null; for (String button : buttons) { if (button.equals("OK") || button.equals("Cancel")) { continue;} buttonLabel = button;} if (buttonLabel == null) { throw new Error("Did not get a third alert button as we were expecting"); } args.put("action", "accept"); args.put("buttonLabel", buttonLabel); driver.executeScript("mobile: alert" , args);
  • 81. #12 Automating A Picker Wheel On iOS 1. Using SendKeys pickerWheelElement.sendKeys("March"); 2. Picker Wheel Value HashMap<String, Object> params = new HashMap<>(); params.put("order", "next"); params.put("offset", 0.15); params.put("element", ((RemoteWebElement) pickerWheelElement).getId()); driver.executeScript("mobile: selectPickerWheelValue", params);
  • 82. #13 Video Recording The Test Execution IOSStartScreenRecordingOptions iOSStartScreenRecordingOptions =new IOSStartScreenRecordingOptions().withVideoQuality(IOSStartSc reenRecordingOptions.VideoQuality.HIGH).withTimeLimit(Durati on.ofSeconds(SCREEN_RECORD_DURATION)); driver.startRecordingScreen(iOSStartScreenRecordingOptions); record = ((IOSDriver) driver).stopRecordingScreen(); byte[] decode = Base64.getDecoder().decode(record); File videoFile =new File(new StringBuilder().append(“MyVideo.Mp4”).toString()); FileUtils.writeByteArrayToFile(videoFile, decode);
  • 83. #14 Parallel And Distributed Testing ● Running multiple Appium servers, and sending one session to each server ● Running one Appium server, and sending multiple sessions to it ● Running one or more Appium servers behind the Selenium Grid Hub, and sending all sessions to the Grid Hub ● Leveraging a cloud provider (which itself is running many Appium servers, most likely behind some single gateway)
  • 84. #15 Desktop App Automation ● Appium for Mac - https://github.com/appium/appium-for-mac ● WinAppDriver - https://github.com/Microsoft/WinAppDriver
  • 85. Quiz Time Go to https://kahoot.it
  • 86. References ● http://appium.io ● https://appiumpro.com/editions ● https://github.com/SrinivasanTarget/awesome-appium ● https://github.com/appium/appium/tree/master/docs/en/advanced-concepts ● https://github.com/singapore-appium-meetup/meetups ● https://www.justtestlah.qa