Sveinung Kval Bakken (sveinungkb)JavaZone 2011AUTOMATED ANDROID TESTING USING JENKINS                            Sveinung ...
Why Jenkins/<other CI>?Automated testingUnattended build & distributionWill eventually find the last digit of             ...
Problem Sveinung Kval Bakken
Prerequisites– Install Jenkins– Install Android SDK– Install Apache Ant– Create an Android project– Add to PATH:   • patha...
Coding: build with ant• Preparations  – android update test-project –m rel.path to main project –p path  – android update ...
Hello Jenkins!•   Get http://bit.ly/dDXQBy•   java –jar jenkins.war•   http://localhost:8080•   Install «Emma plugin»•   C...
Pull report from deviceChange AndroidManifest.xml to:instrumentation android:targetPackage=no.glt android:name=com.neenbed...
QA  Jobs, projects or questions?sb@giantleap.no / sveinungkb           Sveinung Kval Bakken
Upcoming SlideShare
Loading in...5
×

Automated android testing using jenkins ci

5,503

Published on

Code @ https://github.com/sveinungkb/javazone11

Published in: Technology
0 Comments
7 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
5,503
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
47
Comments
0
Likes
7
Embeds 0
No embeds

No notes for slide

Automated android testing using jenkins ci

  1. 1. Sveinung Kval Bakken (sveinungkb)JavaZone 2011AUTOMATED ANDROID TESTING USING JENKINS Sveinung Kval Bakken
  2. 2. Why Jenkins/<other CI>?Automated testingUnattended build & distributionWill eventually find the last digit of Sveinung Kval Bakken
  3. 3. Problem Sveinung Kval Bakken
  4. 4. Prerequisites– Install Jenkins– Install Android SDK– Install Apache Ant– Create an Android project– Add to PATH: • pathandroid-sdk-windowstools • pathandroid-sdk-windowsplatform-tools • pathapache-ant-xxbin Sveinung Kval Bakken
  5. 5. Coding: build with ant• Preparations – android update test-project –m rel.path to main project –p path – android update project –p path• Add test runner• Pull report Sveinung Kval Bakken
  6. 6. Hello Jenkins!• Get http://bit.ly/dDXQBy• java –jar jenkins.war• http://localhost:8080• Install «Emma plugin»• Create jobs – run-tests – coverage – release Sveinung Kval Bakken
  7. 7. Pull report from deviceChange AndroidManifest.xml to:instrumentation android:targetPackage=no.glt android:name=com.neenbedankt.android.test.InstrumentationTestRunner /!– Add to test project’s build.xml after setup task --target name=test-and-pull-report depends=run-testsproperty name=test.path.to.report.device value=/data/data/${tested.manifest.package}/files/TEST-all.xml/property name=test.path.to.report.local value=TEST-all.xml/ echoPulling JUnit test report file ${test.path.to.report.device} into local directory ${test.path.to.report.local}/echo exec executable=${adb} failonerror=true arg line=${adb.device.arg} / arg value=pull / arg value=${test.path.to.report.device} / arg value=${test.path.to.report.local} / /exec/targetAdd to build.properties:test.runner=com.neenbedankt.android.test.InstrumentationTestRunner Sveinung Kval Bakken
  8. 8. QA Jobs, projects or questions?sb@giantleap.no / sveinungkb Sveinung Kval Bakken
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×