Android in Hudson (8) 將你的Android放到Hudson上
首先建立一個新Job後,進行下列設定:
-
Source Code Management
- 選擇Subversion
- 輸入Android程式專案Responsitory URL(eg.http://your.svn/yourProject)
- 輸入Android程式的測試專案Responsitory URL(eg.http://your.svn/yourTestProject)
-
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
-
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
-
Invoke Ant 1
-
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
-
勾選Publish Checkstyle analysis results
完成以上所有設定後,便算完成將Andorid放到Hudson上了,若需要定期執行請在自行排程。