SlideShare une entreprise Scribd logo
1  sur  72
Télécharger pour lire hors ligne
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
somkiat.cc
Test Automation Meetup
#1
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
http://blog.crisp.se/wp-content/uploads/2013/08/20130820-What-is-Agile.pdf
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
Testing is Activity
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
Show your testing activity
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
http://blog.crisp.se/wp-content/uploads/2013/08/20130820-What-is-Agile.pdf
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
Testing early & often
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
ทดสอบกันอย่างไร ?
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
http://testingtweaks.com/what-is-angile-testing/
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
Mobile app ?
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
https://developer.android.com/about/dashboards/index.html
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
ทดสอบกันอย่างไร ?
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
One phone to rule them all !!
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
มี๤ิ่งดี ๆ มานําเสนอ !!
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
UI Automator
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
Android Testing Support Library
UI Automator
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
https://google.github.io/android-testing-support-library/docs/espresso/index.html
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
UI testing
ทําให้แน่ใจว่า App ใ๡้งานได้
บน device ต่าง ๆ
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
UI testing
Looks good but can’t use !!
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
UI testing
ต้องการทดสอบการทํางานของ Activity
ใ๡้เวลาการทดสอบนาน
จํานวนการทดสอบมีเท่าที่จําเป็น
บริษัท สยาม๡ํานาญกิจ จํากัด และเพื่อนพ้องน้องพี่
Espresso ?
Android Testing Support Library
Simulate user interactions
Automatic synchronization of test action
with app UI
บริษัท สยาม๡ํานาญกิจ จํากัด และเพื่อนพ้องน้องพี่
Espresso components
ViewMatcher
ViewAction
ViewAssertion
บริษัท สยาม๡ํานาญกิจ จํากัด และเพื่อนพ้องน้องพี่
Espresso
onView(ViewMatcher)
.perform(ViewAction)
.check(ViewAssertion)
บริษัท สยาม๡ํานาญกิจ จํากัด และเพื่อนพ้องน้องพี่
Hello Espresso
onView(ViewMatcher)
.perform(ViewAction)
.check(ViewAssertion)
บริษัท สยาม๡ํานาญกิจ จํากัด และเพื่อนพ้องน้องพี่
ViewMatcher
onView(withId(R.id.greet_button))
.perform(ViewAction)
.check(ViewAssertion)
บริษัท สยาม๡ํานาญกิจ จํากัด และเพื่อนพ้องน้องพี่
ViewAction
onView(withId(R.id.greet_button))
.perform(click())
.check(ViewAssertion)
บริษัท สยาม๡ํานาญกิจ จํากัด และเพื่อนพ้องน้องพี่
ViewAssertion
onView(withId(R.id.greet_button))
.perform(click())
.check(matches(withText(“สวัสดี”)))
บริษัท สยาม๡ํานาญกิจ จํากัด และเพื่อนพ้องน้องพี่
ViewAssertion
onView(withId(R.id.state_button))
.perform(click())
.check(matches(not(isEnabled())))
บริษัท สยาม๡ํานาญกิจ จํากัด และเพื่อนพ้องน้องพี่
Hamcrest
onView(withId(R.id.state_button))
.perform(click())
.check(matches(not(isEnabled())))
บริษัท สยาม๡ํานาญกิจ จํากัด และเพื่อนพ้องน้องพี่
Run test
$./gradlew clean cAT
บริษัท สยาม๡ํานาญกิจ จํากัด และเพื่อนพ้องน้องพี่
Show report
บริษัท สยาม๡ํานาญกิจ จํากัด และเพื่อนพ้องน้องพี่
Show coverage report
บริษัท สยาม๡ํานาญกิจ จํากัด และเพื่อนพ้องน้องพี่
บริษัท สยาม๡ํานาญกิจ จํากัด และเพื่อนพ้องน้องพี่
Rotate screen
บริษัท สยาม๡ํานาญกิจ จํากัด และเพื่อนพ้องน้องพี่
Listview
บริษัท สยาม๡ํานาญกิจ จํากัด และเพื่อนพ้องน้องพี่
Espresso with onData
onData(ObjectMatcher)
.DataOptions
.perform(ViewAction)
.check(ViewAssertion)
บริษัท สยาม๡ํานาญกิจ จํากัด และเพื่อนพ้องน้องพี่
บริษัท สยาม๡ํานาญกิจ จํากัด และเพื่อนพ้องน้องพี่
Espresso cheatsheet
https://google.github.io/android-testing-support-library/docs/espresso/cheatsheet/index.html
บริษัท สยาม๡ํานาญกิจ จํากัด และเพื่อนพ้องน้องพี่
Hamcrest cheatsheet
http://www.marcphilipp.de/downloads/posts/2013-01-02-hamcrest-quick-reference/Hamcrest-1.3.pdf
บริษัท สยาม๡ํานาญกิจ จํากัด และเพื่อนพ้องน้องพี่
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
ต้องการบันทึก screenshot ล่ะ ?
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
https://github.com/fastlane/fastlane/tree/master/screengrab#readme
บริษัท สยาม๡ํานาญกิจ จํากัด และเพื่อนพ้องน้องพี่
More testing
Monkey testing
http://developer.android.com/tools/help/monkey.html
บริษัท สยาม๡ํานาญกิจ จํากัด และเพื่อนพ้องน้องพี่
Monkey testing
Stress testing
Command line tool
Random events
บริษัท สยาม๡ํานาญกิจ จํากัด และเพื่อนพ้องน้องพี่
How to use ?
$adb shell monkey -p <your package> -v <# of events>
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
Small step
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
L E G A C Y C O D E
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
ครอบครัวสยาม๡ํานาญกิจ และเพื่อนพ้องน้องพี่
https://www.eventpop.me/e/549

Contenu connexe

En vedette

หนึ่ง สอง Automate
หนึ่ง สอง Automateหนึ่ง สอง Automate
หนึ่ง สอง AutomateSomkiat Puisungnoen
 
Automated testing for Android application
Automated testing for Android applicationAutomated testing for Android application
Automated testing for Android applicationSomkiat Puisungnoen
 
Common Entrepreneur Mistakes
Common Entrepreneur MistakesCommon Entrepreneur Mistakes
Common Entrepreneur MistakesBart Greenberg
 
Kaplowitch equity dos and donts
Kaplowitch equity dos and dontsKaplowitch equity dos and donts
Kaplowitch equity dos and dontsBFBootcamp
 
Employee equity incentives
Employee equity incentivesEmployee equity incentives
Employee equity incentivesBart Greenberg
 
Startups: Attracting and Retaining Talent (updated 3/6/13)
Startups: Attracting and Retaining Talent (updated 3/6/13)Startups: Attracting and Retaining Talent (updated 3/6/13)
Startups: Attracting and Retaining Talent (updated 3/6/13)Patrick Seaman
 
Building A Stable, Fundable Startup
Building A Stable, Fundable StartupBuilding A Stable, Fundable Startup
Building A Stable, Fundable Startupportlandten
 
Guaranteed vs Incentive Pay - What's the Right Balance?
Guaranteed vs Incentive Pay - What's the Right Balance?Guaranteed vs Incentive Pay - What's the Right Balance?
Guaranteed vs Incentive Pay - What's the Right Balance?The VisionLink Advisory Group
 
Succession Planning using Equity Incentive Plan and ESOPs
Succession Planning using Equity Incentive Plan and ESOPsSuccession Planning using Equity Incentive Plan and ESOPs
Succession Planning using Equity Incentive Plan and ESOPswifilawgroup
 
10 Movies Every Entrepreneur Should Watch
10 Movies Every Entrepreneur Should Watch10 Movies Every Entrepreneur Should Watch
10 Movies Every Entrepreneur Should WatchLawTrades
 
Negotiating as Consultant
Negotiating as ConsultantNegotiating as Consultant
Negotiating as ConsultantJamie Lee
 
Converting Employees to Owners: Employee Share Purchase Plans
Converting Employees to Owners: Employee Share Purchase PlansConverting Employees to Owners: Employee Share Purchase Plans
Converting Employees to Owners: Employee Share Purchase PlansNow Dentons
 
How to Divide the Pie? Dynamic Equity Share by Mike Moyer
How to Divide the Pie? Dynamic Equity Share by Mike Moyer How to Divide the Pie? Dynamic Equity Share by Mike Moyer
How to Divide the Pie? Dynamic Equity Share by Mike Moyer Ed Kuiters
 
Startup Equity - Startup summer camp, 2014
Startup Equity - Startup summer camp, 2014Startup Equity - Startup summer camp, 2014
Startup Equity - Startup summer camp, 2014Pankaj Saharan
 

En vedette (17)

Design pattern with Java 8
Design pattern with Java 8Design pattern with Java 8
Design pattern with Java 8
 
หนึ่ง สอง Automate
หนึ่ง สอง Automateหนึ่ง สอง Automate
หนึ่ง สอง Automate
 
Automated testing for Android application
Automated testing for Android applicationAutomated testing for Android application
Automated testing for Android application
 
If-If-If-If
If-If-If-IfIf-If-If-If
If-If-If-If
 
Common Entrepreneur Mistakes
Common Entrepreneur MistakesCommon Entrepreneur Mistakes
Common Entrepreneur Mistakes
 
Kaplowitch equity dos and donts
Kaplowitch equity dos and dontsKaplowitch equity dos and donts
Kaplowitch equity dos and donts
 
Employee equity incentives
Employee equity incentivesEmployee equity incentives
Employee equity incentives
 
Startups: Attracting and Retaining Talent (updated 3/6/13)
Startups: Attracting and Retaining Talent (updated 3/6/13)Startups: Attracting and Retaining Talent (updated 3/6/13)
Startups: Attracting and Retaining Talent (updated 3/6/13)
 
Building A Stable, Fundable Startup
Building A Stable, Fundable StartupBuilding A Stable, Fundable Startup
Building A Stable, Fundable Startup
 
Guaranteed vs Incentive Pay - What's the Right Balance?
Guaranteed vs Incentive Pay - What's the Right Balance?Guaranteed vs Incentive Pay - What's the Right Balance?
Guaranteed vs Incentive Pay - What's the Right Balance?
 
Succession Planning using Equity Incentive Plan and ESOPs
Succession Planning using Equity Incentive Plan and ESOPsSuccession Planning using Equity Incentive Plan and ESOPs
Succession Planning using Equity Incentive Plan and ESOPs
 
10 Movies Every Entrepreneur Should Watch
10 Movies Every Entrepreneur Should Watch10 Movies Every Entrepreneur Should Watch
10 Movies Every Entrepreneur Should Watch
 
Negotiating as Consultant
Negotiating as ConsultantNegotiating as Consultant
Negotiating as Consultant
 
Converting Employees to Owners: Employee Share Purchase Plans
Converting Employees to Owners: Employee Share Purchase PlansConverting Employees to Owners: Employee Share Purchase Plans
Converting Employees to Owners: Employee Share Purchase Plans
 
How to Divide the Pie? Dynamic Equity Share by Mike Moyer
How to Divide the Pie? Dynamic Equity Share by Mike Moyer How to Divide the Pie? Dynamic Equity Share by Mike Moyer
How to Divide the Pie? Dynamic Equity Share by Mike Moyer
 
Startup Equity - Startup summer camp, 2014
Startup Equity - Startup summer camp, 2014Startup Equity - Startup summer camp, 2014
Startup Equity - Startup summer camp, 2014
 
ESOPs LEGAL & PROCEDURAL ASPECTS
ESOPs LEGAL & PROCEDURAL ASPECTSESOPs LEGAL & PROCEDURAL ASPECTS
ESOPs LEGAL & PROCEDURAL ASPECTS
 

Plus de Somkiat Puisungnoen (20)

Next of Java 2022
Next of Java 2022Next of Java 2022
Next of Java 2022
 
Sck spring-reactive
Sck spring-reactiveSck spring-reactive
Sck spring-reactive
 
Part 2 :: Spring Boot testing
Part 2 :: Spring Boot testingPart 2 :: Spring Boot testing
Part 2 :: Spring Boot testing
 
vTalk#1 Microservices with Spring Boot
vTalk#1 Microservices with Spring BootvTalk#1 Microservices with Spring Boot
vTalk#1 Microservices with Spring Boot
 
Lesson learned from React native and Flutter
Lesson learned from React native and FlutterLesson learned from React native and Flutter
Lesson learned from React native and Flutter
 
devops
devops devops
devops
 
Angular :: basic tuning performance
Angular :: basic tuning performanceAngular :: basic tuning performance
Angular :: basic tuning performance
 
Shared code between projects
Shared code between projectsShared code between projects
Shared code between projects
 
Distributed Tracing
Distributed Tracing Distributed Tracing
Distributed Tracing
 
Manage data of service
Manage data of serviceManage data of service
Manage data of service
 
RobotFramework Meetup at Thailand #2
RobotFramework Meetup at Thailand #2RobotFramework Meetup at Thailand #2
RobotFramework Meetup at Thailand #2
 
Visual testing
Visual testingVisual testing
Visual testing
 
Cloud Native App
Cloud Native AppCloud Native App
Cloud Native App
 
Wordpress for Newbie
Wordpress for NewbieWordpress for Newbie
Wordpress for Newbie
 
Sck Agile in Real World
Sck Agile in Real WorldSck Agile in Real World
Sck Agile in Real World
 
Clean you code
Clean you codeClean you code
Clean you code
 
SCK Firestore at CNX
SCK Firestore at CNXSCK Firestore at CNX
SCK Firestore at CNX
 
Unhappiness Developer
Unhappiness DeveloperUnhappiness Developer
Unhappiness Developer
 
The Beauty of BAD code
The Beauty of  BAD codeThe Beauty of  BAD code
The Beauty of BAD code
 
React in the right way
React in the right wayReact in the right way
React in the right way
 

Automation test for Android