SlideShare una empresa de Scribd logo
1 de 78
Descargar para leer sin conexión
Android
          Developer
          Testing

               Developers Summit 2012
12   2   17
                                                         /
                              @snsk
                 Android             / NPO     ASTER
                                                        WG /
                            ACCESS



     
                                 @nowsprinting
              




                                      Developers Summit 2012
12   2   17
 Model
                               @mike_neck
                 Android                                               Java
                  Javascript   Groovy                            SIer




                                                   SQLite
                            @ussy00
                 Android




     
                                        Developers Summit 2012
12   2   17
Android                            (ATEC)

               Android
                  
                  


              



                          Developers Summit 2012
12   2   17
 (            )    1          MTG
           Android
           ABC              /JaSST LT
           @IT              Android
                            400
               2012/2                423
                               Developers Summit 2012
12   2   17

              
               Android
               Android
                    SDK

          
              
                                  Android
               Android
                           Developers Summit 2012
12   2     Testter
         17

               Sponsored by


           @IT


           CI


                          Developers Summit 2012
12   2   17
•
          o https://sites.google.com/site/
              androidtestclub/members
     •                        →Testter
          o https://sites.google.com/site/
              androidtestclub/testter
     •
          o https://sites.google.com/site/
              androidtestclub/business-card
                          Developers Summit 2012
12   2   17
Developers Summit 2012
12   2   17
v2.0.J01
                         Developers Summit 2012
12   2   17
Developers Summit 2012
12   2   17
3




         Drive    JUDGE                    Report

              3



                  Developers Summit 2012
12   2   17
Developers Summit 2012
12   2   17
 Robotium
                  View    GUI


               monkeyrunner
               




                            Developers Summit 2012
12   2   17
11        /



                   Developers Summit 2012
12   2   17
View                               1/3

               ActivityInstrumentationTestCase2
                 Android SDK     android.test           JUnit3
                

               Robotium
                 ↑        Activity

               scirocco
                 ↑

                                Developers Summit 2012
12   2   17
View                              2/3

               NativeDriver
                 By Google. 2011/6                     ASL 2.0
                                JUnit
                
                 apk server-standalone.jar
                 WebDriver, NativeDriver for iOS




                               Developers Summit 2012
12   2   17
View                              3/3

               FoneMonkey
                By Gorilla Logic. 2011/11               GPL v3
                                                 GUI
                         recording/playback
                JUnit            export                TestRunner
                FlaxMonkey, FoneMonkey for iOS




                               Developers Summit 2012
12   2   17
 monkeyrunner
                Android SDK
                                Python
               
                              monkeyrecorder/playback.py
               




                               Developers Summit 2012
12   2   17
 Monkey
                 Android SDK
                

               SIKULI
                
                 PC            Android




                                Developers Summit 2012
12   2   17
 Android Testing Framework
                 AndroidTestCase ActivityUnitTestCase
                 @IT        2           3

               AndroidMock
                 EastMock Android
                 @IT        5       3

               Robolectric
                 JavaVM     Android
                              Developers Summit 2012
12   2   17
GUI




                Developers Summit 2012
12   2   17

                       Android
                  

              
                  
                  


                      Developers Summit 2012
12   2   17

                   Judge
                  

               UI
                                                        UI
                   ActionBar      …


                                Developers Summit 2012
12   2   17




              
                  




                      Developers Summit 2012
12   2   17
Developers Summit 2012
12   2   17
Android

              •   Activity



              •

                                                          (   C


                             )
                                 Developers Summit 2012
12   2   17
Android Activity
              onCreate(Bundle bundle) {
                //
                  //
                  //
                  //              (         )
                  //
              }
                          Developers Summit 2012
12   2   17
Android Activity
              onCreate(Bundle bundle) {
                //
                  //                               →C
                  //                               →M
                  //              (         )      →V
                  //                               →V/C
              }
                          Developers Summit 2012
12   2   17
Android
         OnClickListener
              onClick(View view) {
                //
                  //
                  //               (         )
                  //
              }

                           Developers Summit 2012
12   2   17
Android
         OnClickListener
              onClick(View view) {
                //                                  →C
                  //                                →M
                  //               (         ) →V
                  //                                →V/C
              }

                           Developers Summit 2012
12   2   17
Activity

                    Model

              View
                    Model

                      Developers Summit 2012
12   2   17
Activity



                http://goo.gl/YiH1w



                    Developers Summit 2012
12   2   17
Model
         -
              •

                  o


                  o



              •

                  o


                  o




                      Developers Summit 2012
12   2   17
Android

              •   Database (SQLite3)
              •               (SNS                   )
              •

                  o



                  o



                  o
                      GPS
                            Developers Summit 2012
12   2   17
•   Activity
                  Activity
              •                                       Activity




                             Developers Summit 2012
12   2   17
•   Model           View
              •   Model   View
              •                                      Model   View




                            Developers Summit 2012
12   2   17
Developers Summit 2012
12   2   17
Developers Summit 2012
12   2   17
Developers Summit 2012
12   2   17
•

                  o




              •

                  o   ActivityInsterumentationTestCase2<T
                      extends Activity> setUp


                               Developers Summit 2012
12   2   17
Developers Summit 2012
12   2   17
Developers Summit 2012
12   2   17
•   ActivityInstrumentationTestCase2<T extends
                  Activity> getActivity            Activity
                  onCreate onResume
              •           Activity             Database


              •           Activity                      View




                               Developers Summit 2012
12   2   17
•   ActivityInstrumentationTestCase2<T extends
                  Activity> getActivity            Activity
                  onCreate onResume
              •           Activity             Database


              •           Activity                      View


                   →

                               Developers Summit 2012
12   2   17
                  onCreate




                  Developers Summit 2012
12   2   17
Thread




                  Developers Summit 2012
12   2   17
Activity        Thread
         onCreate




                    Developers Summit 2012
12   2   17
Activity

                 Activity
              Model




                             Developers Summit 2012
12   2   17
Model
         Activity



                    Developers Summit 2012
12   2   17
Developers Summit 2012
12   2   17
Model




              View




                     Developers Summit 2012
12   2   17
ActivityInstrumentation
         TestCase2<T extends Activity>
              •                                    View
              •   Model    View
                   Unit Test
              •   Model
                  Thread   Activity



                               Developers Summit 2012
12   2   17
ActivityInstrumentation
         TestCase2<T extends Activity>
              •                                    View
              •   Model    View
                   Unit Test
              •   Model
                  Thread   Activity



                               Developers Summit 2012
12   2   17
•   Model
                      Thread      Activity



              •
                  o
                                       ×                =   (
                                       )

                               Developers Summit 2012
12   2   17
Android




              Activity



                         Developers Summit 2012
12   2   17
SQLite




                       Developers Summit 2012
12   2   17
 SQL
     @Override
     protected void setUp() throws Exception {
         super.setUp();

          helper = new AllowanceDatabase(new RenamingDelegatingContext(getContext(), "test_"));

          SQLiteDatabase db = helper.getWritableDatabase();
          try {
              db.execSQL("INSERT INTO ALLOWANCE_LOG(LOG_DATE,   AMOUNT)   VALUES(1320000000,   1000);");
              db.execSQL("INSERT INTO ALLOWANCE_LOG(LOG_DATE,   AMOUNT)   VALUES(1330000000,   5000);");
              db.execSQL("INSERT INTO ALLOWANCE_LOG(LOG_DATE,   AMOUNT)   VALUES(1340000000,   10000);");
              db.execSQL("INSERT INTO ALLOWANCE_LOG(LOG_DATE,   AMOUNT)   VALUES(1350000000,   2000);");
              db.execSQL("INSERT INTO ALLOWANCE_LOG(LOG_DATE,   AMOUNT)   VALUES(1360000000,   3000);");
          } finally {
              db.close();
          }
     }




                                           Developers Summit 2012
12   2   17
Fixture Library

              
                     DBUnit (Java)
                     ActiveRecord (Ruby)
                     Test::Fixture::DBI (Perl)
                     fixture (Python)
                     Factory Girl (Ruby)
                     ???? (Android)


                                  Developers Summit 2012
12   2   17
Fixture for Android

               SQLite Fixture Library
                   https://github.com/ussy/sqlite-fixture


              
                              DB
                   RenamingDelegatingContext


                                Developers Summit 2012
12   2   17

     @Override
     protected void setUp() throws Exception {
         super.setUp();

              importData(FileType.Yaml, "AllowanceLogDataTest");
     }




                              Developers Summit 2012
12   2   17
---
     _id: 1
     LOG_DATE: 1320000000
     AMOUNT: 1000
     ---
     _id: 2
     LOG_DATE: 1330000000
     AMOUNT: 5000
     ---
     _id: 3
     LOG_DATE: 1340000000
     AMOUNT: 10000    Developers Summit 2012
12   ---
     2 17
Fixture Library

              
              
              




                  Developers Summit 2012
12   2   17
   API


              




                        Developers Summit 2012
12   2   17
Developers Summit 2012
12   2   17

                  

              




                      Developers Summit 2012
12   2   17
DB




              Developers Summit 2012
12   2   17
                     SQLiteOpenHelper

              https://github.com/ussy/android-dbtest




                  Developers Summit 2012
12   2   17
private Context context;

     protected void setUp() {
         context = new
     RenamingDelegatingContext(getContext(), "test_");

              helper = new SQLiteOpenHelperV1(context);
     }

     public void testMigration() {
         helper = SQLiteOpenHelperFactory.get(context);
         // test code
     }


                              Developers Summit 2012
12   2   17
Developers Summit 2012
12   2   17
CI

              
              




                  Developers Summit 2012
12   2   17
Jenkins




               Developers Summit 2012
12   2   17
Android Emulator Plugin

              
              
               APK
               Android
                  
                   OS

                          Developers Summit 2012
12   2   17
Developers Summit 2012
12   2   17

              


               Jenkins
              


                          Developers Summit 2012
12   2   17
3

           Level1 Automation
               Record Playback
               Liner Script
           Level2 Automation
               Data-driven
               Functional Decomposition
           Level3 Automation
               Keyword Driven
               Model-based

                                  TEST AUTOMATIONBODY OF KNOWLEDGE(TABOK) GUIDEBOOK Version 1.1

                               Developers Summit 2012
12   2   17
3


                     1.



                     2.



                     3.                    *1




                    *1                 3


              Developers Summit 2012
12   2   17
Developers Summit 2012
12   2   17

Más contenido relacionado

La actualidad más candente

Introduction to Android (in-short) - Itvedant, Thane | Mumbai | Navi Mumbai
Introduction to Android (in-short) - Itvedant, Thane | Mumbai | Navi MumbaiIntroduction to Android (in-short) - Itvedant, Thane | Mumbai | Navi Mumbai
Introduction to Android (in-short) - Itvedant, Thane | Mumbai | Navi Mumbai
Itvedant
 

La actualidad más candente (20)

Ii 1500-publishing your android application
Ii 1500-publishing your android applicationIi 1500-publishing your android application
Ii 1500-publishing your android application
 
Android development beginners faq
Android development  beginners faqAndroid development  beginners faq
Android development beginners faq
 
Introduction to Android (in-short) - Itvedant, Thane | Mumbai | Navi Mumbai
Introduction to Android (in-short) - Itvedant, Thane | Mumbai | Navi MumbaiIntroduction to Android (in-short) - Itvedant, Thane | Mumbai | Navi Mumbai
Introduction to Android (in-short) - Itvedant, Thane | Mumbai | Navi Mumbai
 
Android by LAlitha
Android by LAlithaAndroid by LAlitha
Android by LAlitha
 
Android Development: Build Android App from Scratch
Android Development: Build Android App from ScratchAndroid Development: Build Android App from Scratch
Android Development: Build Android App from Scratch
 
Kinect for Windows SDK 21 June 2011
Kinect for Windows SDK 21 June 2011Kinect for Windows SDK 21 June 2011
Kinect for Windows SDK 21 June 2011
 
Android Applications Development
Android Applications DevelopmentAndroid Applications Development
Android Applications Development
 
Android Study Jam - Introduction
Android Study Jam - IntroductionAndroid Study Jam - Introduction
Android Study Jam - Introduction
 
Golang vs node js 2022 which is the better choice for web development (1)
Golang vs node js 2022 which is the better choice for web development (1)Golang vs node js 2022 which is the better choice for web development (1)
Golang vs node js 2022 which is the better choice for web development (1)
 
Android introduction
Android introductionAndroid introduction
Android introduction
 
Android development basics
Android development basicsAndroid development basics
Android development basics
 
Android Apps Development Basic
Android Apps Development BasicAndroid Apps Development Basic
Android Apps Development Basic
 
Android presentation
Android presentationAndroid presentation
Android presentation
 
Android architecture and Additional Components
Android architecture and Additional ComponentsAndroid architecture and Additional Components
Android architecture and Additional Components
 
Seminar on android app development
Seminar on android app developmentSeminar on android app development
Seminar on android app development
 
Android and its feature
Android and its featureAndroid and its feature
Android and its feature
 
Sikuli
SikuliSikuli
Sikuli
 
Introduction To android
Introduction To androidIntroduction To android
Introduction To android
 
Android App Development Intro at ESC SV 2012
Android App Development Intro at ESC SV 2012Android App Development Intro at ESC SV 2012
Android App Development Intro at ESC SV 2012
 
Android Presentation
Android PresentationAndroid Presentation
Android Presentation
 

Destacado

Devsumi2012 攻めの運用の極意
Devsumi2012 攻めの運用の極意Devsumi2012 攻めの運用の極意
Devsumi2012 攻めの運用の極意
Ryosuke IWANAGA
 
CouchDB JP Developers Dummit LT
CouchDB JP Developers Dummit LTCouchDB JP Developers Dummit LT
CouchDB JP Developers Dummit LT
Koji Kawamura
 
20120216 デブサミ 座談会
20120216 デブサミ 座談会20120216 デブサミ 座談会
20120216 デブサミ 座談会
akihiro uehara
 
17 E-5 震災とHackとクラウドと 亀渕分
17 E-5 震災とHackとクラウドと 亀渕分17 E-5 震災とHackとクラウドと 亀渕分
17 E-5 震災とHackとクラウドと 亀渕分
Keiji Kamebuchi
 
10 years devsumi agile and the future
10 years devsumi agile and the future10 years devsumi agile and the future
10 years devsumi agile and the future
Kenji Hiranabe
 
見る前に跳べ 〜ギークの工夫で社会を変えよう〜
見る前に跳べ 〜ギークの工夫で社会を変えよう〜見る前に跳べ 〜ギークの工夫で社会を変えよう〜
見る前に跳べ 〜ギークの工夫で社会を変えよう〜
Takuya Oikawa
 

Destacado (20)

【17-A-2】 10年後も通用する開発環境の秘訣 <デブサミ2012>
【17-A-2】 10年後も通用する開発環境の秘訣 <デブサミ2012>【17-A-2】 10年後も通用する開発環境の秘訣 <デブサミ2012>
【17-A-2】 10年後も通用する開発環境の秘訣 <デブサミ2012>
 
10th Anniversary
10th Anniversary10th Anniversary
10th Anniversary
 
Developer summit continuous deliveryとjenkins
Developer summit   continuous deliveryとjenkinsDeveloper summit   continuous deliveryとjenkins
Developer summit continuous deliveryとjenkins
 
Dev@cloudの実装
Dev@cloudの実装Dev@cloudの実装
Dev@cloudの実装
 
教科書と現場のあいだ
教科書と現場のあいだ教科書と現場のあいだ
教科書と現場のあいだ
 
Devsumi2012 攻めの運用の極意
Devsumi2012 攻めの運用の極意Devsumi2012 攻めの運用の極意
Devsumi2012 攻めの運用の極意
 
CouchDB JP Developers Dummit LT
CouchDB JP Developers Dummit LTCouchDB JP Developers Dummit LT
CouchDB JP Developers Dummit LT
 
私と自分戦略
私と自分戦略私と自分戦略
私と自分戦略
 
moon and strategy
moon and strategymoon and strategy
moon and strategy
 
自分戦略
自分戦略自分戦略
自分戦略
 
Devsumi2012 JGGUG LT
Devsumi2012 JGGUG LTDevsumi2012 JGGUG LT
Devsumi2012 JGGUG LT
 
20120216 デブサミ 座談会
20120216 デブサミ 座談会20120216 デブサミ 座談会
20120216 デブサミ 座談会
 
アジャイルプロセス協議会の紹介
アジャイルプロセス協議会の紹介アジャイルプロセス協議会の紹介
アジャイルプロセス協議会の紹介
 
17 E-5 震災とHackとクラウドと 亀渕分
17 E-5 震災とHackとクラウドと 亀渕分17 E-5 震災とHackとクラウドと 亀渕分
17 E-5 震災とHackとクラウドと 亀渕分
 
TDD研究会 デブサミ2012 コミュニティLT
TDD研究会 デブサミ2012 コミュニティLTTDD研究会 デブサミ2012 コミュニティLT
TDD研究会 デブサミ2012 コミュニティLT
 
10 years devsumi agile and the future
10 years devsumi agile and the future10 years devsumi agile and the future
10 years devsumi agile and the future
 
三周まわったおれたちのアジャイル
三周まわったおれたちのアジャイル三周まわったおれたちのアジャイル
三周まわったおれたちのアジャイル
 
Devsumi2012 倉貫講演資料
Devsumi2012 倉貫講演資料Devsumi2012 倉貫講演資料
Devsumi2012 倉貫講演資料
 
見る前に跳べ 〜ギークの工夫で社会を変えよう〜
見る前に跳べ 〜ギークの工夫で社会を変えよう〜見る前に跳べ 〜ギークの工夫で社会を変えよう〜
見る前に跳べ 〜ギークの工夫で社会を変えよう〜
 
Effective Smartphone UX at GREE
Effective Smartphone UX at GREEEffective Smartphone UX at GREE
Effective Smartphone UX at GREE
 

Similar a 実践Android Developer Testing

Dev Fest X (Sapporo) Android UI Patterns
Dev Fest X (Sapporo) Android UI PatternsDev Fest X (Sapporo) Android UI Patterns
Dev Fest X (Sapporo) Android UI Patterns
Yukio Andoh
 
Android developer webinar-march-2012-mindstormsoftware
Android developer webinar-march-2012-mindstormsoftwareAndroid developer webinar-march-2012-mindstormsoftware
Android developer webinar-march-2012-mindstormsoftware
Romin Irani
 
OAE Developer Bootcamp
OAE Developer BootcampOAE Developer Bootcamp
OAE Developer Bootcamp
Bert Pareyn
 
Dev Fest X (Sapporo) WebGL
Dev Fest X (Sapporo) WebGLDev Fest X (Sapporo) WebGL
Dev Fest X (Sapporo) WebGL
Yukio Andoh
 
Designing an android sensor subsystem costillo 20120214
Designing an android sensor subsystem costillo 20120214Designing an android sensor subsystem costillo 20120214
Designing an android sensor subsystem costillo 20120214
Jen Costillo
 
Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_s...
Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_s...Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_s...
Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_s...
Mathias Seguy
 

Similar a 実践Android Developer Testing (20)

Dev Fest X (Sapporo) Android UI Patterns
Dev Fest X (Sapporo) Android UI PatternsDev Fest X (Sapporo) Android UI Patterns
Dev Fest X (Sapporo) Android UI Patterns
 
Few steps into Android
Few steps into AndroidFew steps into Android
Few steps into Android
 
Some thoughts on DevSummit 2012 including comments and links (PDF)
Some thoughts on DevSummit 2012 including comments and links (PDF)Some thoughts on DevSummit 2012 including comments and links (PDF)
Some thoughts on DevSummit 2012 including comments and links (PDF)
 
Android developer webinar-march-2012-mindstormsoftware
Android developer webinar-march-2012-mindstormsoftwareAndroid developer webinar-march-2012-mindstormsoftware
Android developer webinar-march-2012-mindstormsoftware
 
CyberLink Meets Python
CyberLink Meets PythonCyberLink Meets Python
CyberLink Meets Python
 
OAE Developer Bootcamp
OAE Developer BootcampOAE Developer Bootcamp
OAE Developer Bootcamp
 
Dev Fest X (Sapporo) WebGL
Dev Fest X (Sapporo) WebGLDev Fest X (Sapporo) WebGL
Dev Fest X (Sapporo) WebGL
 
Training android
Training androidTraining android
Training android
 
Spmcasestudy
SpmcasestudySpmcasestudy
Spmcasestudy
 
Android Introduction
Android IntroductionAndroid Introduction
Android Introduction
 
Securing Android Applications
Securing Android ApplicationsSecuring Android Applications
Securing Android Applications
 
Designing an android sensor subsystem costillo 20120214
Designing an android sensor subsystem costillo 20120214Designing an android sensor subsystem costillo 20120214
Designing an android sensor subsystem costillo 20120214
 
Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_s...
Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_s...Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_s...
Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_s...
 
SecurityBSides London - windows phone 7
SecurityBSides London - windows phone 7SecurityBSides London - windows phone 7
SecurityBSides London - windows phone 7
 
Android internals 02 - High-level architecture, version control system (rev_1.1)
Android internals 02 - High-level architecture, version control system (rev_1.1)Android internals 02 - High-level architecture, version control system (rev_1.1)
Android internals 02 - High-level architecture, version control system (rev_1.1)
 
AN ANDROID APP FOR BUILDING STUDENT PROFILES
AN ANDROID APP FOR BUILDING STUDENT PROFILESAN ANDROID APP FOR BUILDING STUDENT PROFILES
AN ANDROID APP FOR BUILDING STUDENT PROFILES
 
Creating Android Apps with PhoneGap
Creating Android Apps with PhoneGapCreating Android Apps with PhoneGap
Creating Android Apps with PhoneGap
 
Android tio manual
Android tio manualAndroid tio manual
Android tio manual
 
Android tio manual
Android tio manualAndroid tio manual
Android tio manual
 
My android
My androidMy android
My android
 

Último

call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Morcall Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
vikas rana
 
KLINIK BATA Jual obat penggugur kandungan 087776558899 ABORSI JANIN KEHAMILAN...
KLINIK BATA Jual obat penggugur kandungan 087776558899 ABORSI JANIN KEHAMILAN...KLINIK BATA Jual obat penggugur kandungan 087776558899 ABORSI JANIN KEHAMILAN...
KLINIK BATA Jual obat penggugur kandungan 087776558899 ABORSI JANIN KEHAMILAN...
Cara Menggugurkan Kandungan 087776558899
 
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka
call Now 9811711561 Cash Payment乂 Call Girls in Dwarkacall Now 9811711561 Cash Payment乂 Call Girls in Dwarka
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka
vikas rana
 
the Husband rolesBrown Aesthetic Cute Group Project Presentation
the Husband rolesBrown Aesthetic Cute Group Project Presentationthe Husband rolesBrown Aesthetic Cute Group Project Presentation
the Husband rolesBrown Aesthetic Cute Group Project Presentation
brynpueblos04
 

Último (14)

2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Dashrath Puri (Delhi)
 
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Palam (Delhi)
 
Call Girls In Mumbai Just Genuine Call ☎ 7738596112✅ Call Girl Andheri East G...
Call Girls In Mumbai Just Genuine Call ☎ 7738596112✅ Call Girl Andheri East G...Call Girls In Mumbai Just Genuine Call ☎ 7738596112✅ Call Girl Andheri East G...
Call Girls In Mumbai Just Genuine Call ☎ 7738596112✅ Call Girl Andheri East G...
 
(Aarini) Russian Call Girls Surat Call Now 8250077686 Surat Escorts 24x7
(Aarini) Russian Call Girls Surat Call Now 8250077686 Surat Escorts 24x7(Aarini) Russian Call Girls Surat Call Now 8250077686 Surat Escorts 24x7
(Aarini) Russian Call Girls Surat Call Now 8250077686 Surat Escorts 24x7
 
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Morcall Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka Mor
 
KLINIK BATA Jual obat penggugur kandungan 087776558899 ABORSI JANIN KEHAMILAN...
KLINIK BATA Jual obat penggugur kandungan 087776558899 ABORSI JANIN KEHAMILAN...KLINIK BATA Jual obat penggugur kandungan 087776558899 ABORSI JANIN KEHAMILAN...
KLINIK BATA Jual obat penggugur kandungan 087776558899 ABORSI JANIN KEHAMILAN...
 
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Mukherjee Nagar (Delhi)
 
(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...
(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...
(Anamika) VIP Call Girls Navi Mumbai Call Now 8250077686 Navi Mumbai Escorts ...
 
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka
call Now 9811711561 Cash Payment乂 Call Girls in Dwarkacall Now 9811711561 Cash Payment乂 Call Girls in Dwarka
call Now 9811711561 Cash Payment乂 Call Girls in Dwarka
 
LC_YouSaidYes_NewBelieverBookletDone.pdf
LC_YouSaidYes_NewBelieverBookletDone.pdfLC_YouSaidYes_NewBelieverBookletDone.pdf
LC_YouSaidYes_NewBelieverBookletDone.pdf
 
2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)
2k Shots ≽ 9205541914 ≼ Call Girls In Jasola (Delhi)
 
the Husband rolesBrown Aesthetic Cute Group Project Presentation
the Husband rolesBrown Aesthetic Cute Group Project Presentationthe Husband rolesBrown Aesthetic Cute Group Project Presentation
the Husband rolesBrown Aesthetic Cute Group Project Presentation
 
Pokemon Go... Unraveling the Conspiracy Theory
Pokemon Go... Unraveling the Conspiracy TheoryPokemon Go... Unraveling the Conspiracy Theory
Pokemon Go... Unraveling the Conspiracy Theory
 
WOMEN EMPOWERMENT women empowerment.pptx
WOMEN EMPOWERMENT women empowerment.pptxWOMEN EMPOWERMENT women empowerment.pptx
WOMEN EMPOWERMENT women empowerment.pptx
 

実践Android Developer Testing

  • 1. Android Developer Testing Developers Summit 2012 12 2 17
  • 2. / @snsk  Android / NPO ASTER WG / ACCESS  @nowsprinting  Developers Summit 2012 12 2 17
  • 3.  Model @mike_neck  Android Java Javascript Groovy SIer  SQLite @ussy00  Android  Developers Summit 2012 12 2 17
  • 4. Android (ATEC)  Android    Developers Summit 2012 12 2 17
  • 5.  ( ) 1 MTG  Android  ABC /JaSST LT  @IT Android  400  2012/2 423 Developers Summit 2012 12 2 17
  • 6.   Android  Android  SDK    Android  Android Developers Summit 2012 12 2  Testter 17
  • 7.  Sponsored by  @IT  CI Developers Summit 2012 12 2 17
  • 8. o https://sites.google.com/site/ androidtestclub/members • →Testter o https://sites.google.com/site/ androidtestclub/testter • o https://sites.google.com/site/ androidtestclub/business-card Developers Summit 2012 12 2 17
  • 10. v2.0.J01 Developers Summit 2012 12 2 17
  • 12. 3 Drive JUDGE Report 3 Developers Summit 2012 12 2 17
  • 14.  Robotium  View GUI  monkeyrunner  Developers Summit 2012 12 2 17
  • 15. 11 / Developers Summit 2012 12 2 17
  • 16. View 1/3  ActivityInstrumentationTestCase2  Android SDK android.test JUnit3   Robotium  ↑ Activity  scirocco  ↑ Developers Summit 2012 12 2 17
  • 17. View 2/3  NativeDriver  By Google. 2011/6 ASL 2.0  JUnit   apk server-standalone.jar  WebDriver, NativeDriver for iOS Developers Summit 2012 12 2 17
  • 18. View 3/3  FoneMonkey  By Gorilla Logic. 2011/11 GPL v3  GUI  recording/playback  JUnit export TestRunner  FlaxMonkey, FoneMonkey for iOS Developers Summit 2012 12 2 17
  • 19.  monkeyrunner  Android SDK  Python   monkeyrecorder/playback.py  Developers Summit 2012 12 2 17
  • 20.  Monkey  Android SDK   SIKULI   PC Android Developers Summit 2012 12 2 17
  • 21.  Android Testing Framework  AndroidTestCase ActivityUnitTestCase  @IT 2 3  AndroidMock  EastMock Android  @IT 5 3  Robolectric  JavaVM Android Developers Summit 2012 12 2 17
  • 22. GUI Developers Summit 2012 12 2 17
  • 23.  Android     Developers Summit 2012 12 2 17
  • 24.  Judge   UI  UI  ActionBar … Developers Summit 2012 12 2 17
  • 25.   Developers Summit 2012 12 2 17
  • 27. Android • Activity • ( C ) Developers Summit 2012 12 2 17
  • 28. Android Activity onCreate(Bundle bundle) { // // // // ( ) // } Developers Summit 2012 12 2 17
  • 29. Android Activity onCreate(Bundle bundle) { // // →C // →M // ( ) →V // →V/C } Developers Summit 2012 12 2 17
  • 30. Android OnClickListener onClick(View view) { // // // ( ) // } Developers Summit 2012 12 2 17
  • 31. Android OnClickListener onClick(View view) { // →C // →M // ( ) →V // →V/C } Developers Summit 2012 12 2 17
  • 32. Activity Model View Model Developers Summit 2012 12 2 17
  • 33. Activity http://goo.gl/YiH1w Developers Summit 2012 12 2 17
  • 34. Model - • o o • o o Developers Summit 2012 12 2 17
  • 35. Android • Database (SQLite3) • (SNS ) • o o o GPS Developers Summit 2012 12 2 17
  • 36. Activity Activity • Activity Developers Summit 2012 12 2 17
  • 37. Model View • Model View • Model View Developers Summit 2012 12 2 17
  • 41. o • o ActivityInsterumentationTestCase2<T extends Activity> setUp Developers Summit 2012 12 2 17
  • 44. ActivityInstrumentationTestCase2<T extends Activity> getActivity Activity onCreate onResume • Activity Database • Activity View Developers Summit 2012 12 2 17
  • 45. ActivityInstrumentationTestCase2<T extends Activity> getActivity Activity onCreate onResume • Activity Database • Activity View  → Developers Summit 2012 12 2 17
  • 46. onCreate Developers Summit 2012 12 2 17
  • 47. Thread Developers Summit 2012 12 2 17
  • 48. Activity Thread onCreate Developers Summit 2012 12 2 17
  • 49. Activity  Activity Model Developers Summit 2012 12 2 17
  • 50. Model Activity Developers Summit 2012 12 2 17
  • 52. Model View Developers Summit 2012 12 2 17
  • 53. ActivityInstrumentation TestCase2<T extends Activity> • View • Model View Unit Test • Model Thread Activity Developers Summit 2012 12 2 17
  • 54. ActivityInstrumentation TestCase2<T extends Activity> • View • Model View Unit Test • Model Thread Activity Developers Summit 2012 12 2 17
  • 55. Model Thread Activity • o × = ( ) Developers Summit 2012 12 2 17
  • 56. Android Activity Developers Summit 2012 12 2 17
  • 57. SQLite Developers Summit 2012 12 2 17
  • 58.  SQL @Override protected void setUp() throws Exception { super.setUp(); helper = new AllowanceDatabase(new RenamingDelegatingContext(getContext(), "test_")); SQLiteDatabase db = helper.getWritableDatabase(); try { db.execSQL("INSERT INTO ALLOWANCE_LOG(LOG_DATE, AMOUNT) VALUES(1320000000, 1000);"); db.execSQL("INSERT INTO ALLOWANCE_LOG(LOG_DATE, AMOUNT) VALUES(1330000000, 5000);"); db.execSQL("INSERT INTO ALLOWANCE_LOG(LOG_DATE, AMOUNT) VALUES(1340000000, 10000);"); db.execSQL("INSERT INTO ALLOWANCE_LOG(LOG_DATE, AMOUNT) VALUES(1350000000, 2000);"); db.execSQL("INSERT INTO ALLOWANCE_LOG(LOG_DATE, AMOUNT) VALUES(1360000000, 3000);"); } finally { db.close(); } } Developers Summit 2012 12 2 17
  • 59. Fixture Library   DBUnit (Java)  ActiveRecord (Ruby)  Test::Fixture::DBI (Perl)  fixture (Python)  Factory Girl (Ruby)  ???? (Android) Developers Summit 2012 12 2 17
  • 60. Fixture for Android  SQLite Fixture Library  https://github.com/ussy/sqlite-fixture   DB  RenamingDelegatingContext Developers Summit 2012 12 2 17
  • 61. @Override protected void setUp() throws Exception { super.setUp(); importData(FileType.Yaml, "AllowanceLogDataTest"); } Developers Summit 2012 12 2 17
  • 62. --- _id: 1 LOG_DATE: 1320000000 AMOUNT: 1000 --- _id: 2 LOG_DATE: 1330000000 AMOUNT: 5000 --- _id: 3 LOG_DATE: 1340000000 AMOUNT: 10000 Developers Summit 2012 12 --- 2 17
  • 63. Fixture Library    Developers Summit 2012 12 2 17
  • 64. API  Developers Summit 2012 12 2 17
  • 66.   Developers Summit 2012 12 2 17
  • 67. DB Developers Summit 2012 12 2 17
  • 68. SQLiteOpenHelper https://github.com/ussy/android-dbtest Developers Summit 2012 12 2 17
  • 69. private Context context; protected void setUp() { context = new RenamingDelegatingContext(getContext(), "test_"); helper = new SQLiteOpenHelperV1(context); } public void testMigration() { helper = SQLiteOpenHelperFactory.get(context); // test code } Developers Summit 2012 12 2 17
  • 71. CI   Developers Summit 2012 12 2 17
  • 72. Jenkins Developers Summit 2012 12 2 17
  • 73. Android Emulator Plugin    APK  Android   OS Developers Summit 2012 12 2 17
  • 75.   Jenkins  Developers Summit 2012 12 2 17
  • 76. 3  Level1 Automation  Record Playback  Liner Script  Level2 Automation  Data-driven  Functional Decomposition  Level3 Automation  Keyword Driven  Model-based TEST AUTOMATIONBODY OF KNOWLEDGE(TABOK) GUIDEBOOK Version 1.1 Developers Summit 2012 12 2 17
  • 77. 3 1. 2. 3. *1 *1 3 Developers Summit 2012 12 2 17