Android in Hudson (8) 将你的Android放到Hudson上

Android in Hudson (8) 将你的Android放到Hudson上


首先建立一个新Job后,进行下列设定:

  1. Source Code Management
    • 选择Subversion
    • 输入Android程序项目Responsitory URL(eg.http://your.svn/yourProject)
    • 输入Android程序的测试项目Responsitory URL(eg.http://your.svn/yourTestProject)
  2. Build Environment
    • 勾选Run Xvnc during build
    • 勾选Run an Android emulator during build
      • 可用Run Existing emulator 或 Run emulator with properties (设定方式)
      • Common emulator options - 勾选Show emulator window
  3. Build
    • Invoke Ant 1
      • Targets: 依序 clean compile findbugs pmd checkstyle
      • Build File: yourProject/build.xml
      • Properties: adb.device.arg=-s $ANDROID_AVD_DEVICE
    • Invoke Ant 2
      • Targets: 依序 clean coverage-xml
      • Build File: yourTestProject/build.xml
      • Properties: adb.device.arg=-s $ANDROID_AVD_DEVICE
    • Invoke Ant 3
      • Targets: daily-release
      • Build File: yourProject/build.xml
  4. Post-build Actions
    • 勾选Publish Checkstyle analysis results
      • Checkstyle results = yourProject/checkstyle_report.xml
    • 勾选Publish FindBugs analysis results
    • 勾选Publish PMD analysis results
    • 勾选Publish JUnit test result report
      • Test report XMLs = yourTestProject/junit-report.xml
    • 勾选Record Emma coverage report
      • Test report XMLs = yourTestProject/coverage.xml

完成以上所有设定后,便算完成将Andorid放到Hudson上了,若需要定期执行请在自行排程。