Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7963057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:31:10+00:00 2026-06-04T05:31:10+00:00

I have android test project that i’ve integrated into the Hudson. I have created

  • 0

I have android test project that i’ve integrated into the Hudson. I have created a free-style software project with next settings :
1. Source Code Management – custom workspace
2. Run an Android emulator during build :
* Android OS Version: 4.0.3
* Screen density: 240
* Screen resolution: WVGA
* Device locale: en_US
* SD card size: 16M
3. Invoke Ant:
Target: all clean emma debug install test
Build File: workspace/Project/build.xml
4. Post-build Actions
* Archive the artifacts: **/*test-TEST.xml
* Publish JUnit test result report: **/*test-TEST.xml
* Record Emma coverage report: **/coverage.xml
* Record fingerprints of files to track usage: **/*test-TEST.xml
Here’s build.xml file part that covers my ant target:

    <!-- version-tag: custom -->
    <target name="test" depends="-test-project-check"
                description="Runs tests from the package defined in test.package property">

        <property name="tested.project.absolute.dir" location="${tested.project.dir}" />

        <property name="test.runner" value="android.test.InstrumentationTestRunner" />

        <!-- Application package of the tested project extracted from its manifest file -->
        <xpath input="${tested.project.absolute.dir}/AndroidManifest.xml"
                expression="/manifest/@package" output="tested.manifest.package" />
        <xpath input="AndroidManifest.xml"
                expression="/manifest/@package" output="manifest.package" />

        <property name="emma.dump.file"
                value="/data/data/${tested.manifest.package}/coverage.ec" />

        <if condition="${emma.enabled}">
            <then>
                <echo>WARNING: Code Coverage is currently only supported on the emulator and rooted devices.</echo>
                <run-tests-helper emma.enabled="true">
                    <extra-instrument-args>
                        <arg value="-e" />
                           <arg value="coverageFile" />
                           <arg value="${emma.dump.file}" />
                    </extra-instrument-args>
                </run-tests-helper>
                <echo>Downloading coverage file into project directory...</echo>
                <exec executable="${adb}" failonerror="true">
                    <arg line="${adb.device.arg}" />
                    <arg value="pull" />
                    <arg value="${emma.dump.file}" />
                    <arg value="coverage.ec" />
                </exec>
                <echo>Extracting coverage report...</echo>
                <emma>
                    <report sourcepath="${tested.project.absolute.dir}/${source.dir}"
                                      verbosity="${verbosity}">
                        <!-- TODO: report.dir or something like should be introduced if necessary -->
                        <infileset dir=".">
                            <include name="coverage.ec" />
                            <include name="coverage.em" />
                        </infileset>
                        <!-- TODO: reports in other, indicated by user formats -->
                        <html outfile="${basedir}/coverage/coverage.html" />
                        <xml outfile="${basedir}/coverage/coverage.xml" />
                   </report>
                </emma>
                <echo>Cleaning up temporary files...</echo>
                <delete file="coverage.ec" />
                <delete file="coverage.em" />
                <echo>Saving the report file in ${basedir}/coverage/coverage.html</echo>
            </then>
            <else>
                <run-tests-helper />
            </else>
        </if>
        <mkdir dir="${basedir}/junit-results" />
        <echo>Base dir is ${basedir}</echo>
        <exec executable="${adb}" failonerror="true" dir="${basedir}/junit-results">
            <arg line="${adb.device.arg}" />
            <arg value="pull" />
            <arg value="/data/data/${tested.manifest.package}/files/" />
        </exec>
    </target>    
    <import file="${sdk.dir}/tools/ant/build.xml" />

</project>

Now, this project works fine and i get both emma coverage and test results, but when i configured multi-configuration project with the same options, except for android emulator i set different variables with os, density and screen resolution, i got stuck with one error –

test:
     [echo] WARNING: Code Coverage is currently only supported on the emulator and rooted devices.
     [echo] Running tests ...
     [exec] 
     [exec] com.mobclix.android.externaltestharness.test.UnitActivityTest:.
     [exec] Test results for PolideaInstrumentationTestRunner=.
     [exec] Time: 25.122
     [exec] 
     [exec] OK (1 test)
     [exec] 
     [exec] 
     [exec] Generated code coverage data to /data/data/com.mobclix.android.externaltestharness/coverage.ec
     [echo] Downloading coverage file into project directory...
     [exec] 355 KB/s (2043 bytes in 0.005s)
     [echo] Extracting coverage report...
     [echo] Cleaning up temporary files...
   [delete] Deleting: /Users/biercoff/Work/Workspace/HarnessExternalTest/coverage.ec
   [delete] Deleting: /Users/biercoff/Work/Workspace/HarnessExternalTest/coverage.em
     [echo] Saving the report file in /Users/biercoff/Work/Workspace/HarnessExternalTest/coverage/coverage.html
     [echo] Base dir is /Users/biercoff/Work/Workspace/HarnessExternalTest
     [exec] pull: building file list...
     [exec] pull: /data/data/com.mobclix.android.externaltestharness/files/com.mobclix.android.externaltestharness.test-TEST.xml -> ./com.mobclix.android.externaltestharness.test-TEST.xml
     [exec] 1 file pulled. 0 files skipped.
     [exec] 40 KB/s (499 bytes in 0.012s)

BUILD SUCCESSFUL
Total time: 1 minute 20 seconds
$ /Users/biercoff/.hudson/tools/android-sdk/platform-tools/adb disconnect localhost:53830
[android] Stopping Android emulator
[android] Archiving emulator log
$ /Users/biercoff/.hudson/tools/android-sdk/platform-tools/adb kill-server
Recording fingerprints
Recording test results
No test report files were found. Configuration error?
Archiving artifacts
Description set: 
Emma: looking for coverage reports in the provided path: /Users/biercoff/Work/Workspace/HarnessExternalTest/coverage/coverage.xml
Emma: found 1 report files: 
          /Users/biercoff/Work/Workspace/HarnessExternalTest/coverage/coverage.xml
Emma: stored 1 report files in the build folder: /Users/biercoff/.hudson/jobs/MulitTestHarnessProject/configurations/axis-density/240/axis-os/4.0.3/axis-resolution/WVGA/builds/2012-05-18_17-26-05/emma
Emma: Coverage: Classes 21/39 (54%). Methods 40/128 (31%). Blocks 833/2928 (28%). Lines 154.5/528 (29%). 
[DEBUG] Skipping watched dependency update for build: MulitTestHarnessProject/density=240,os=4.0.3,resolution

For emma coverage i had to change path in Hudson into /Users/biercoff/Work/Workspace/HarnessExternalTest/coverage/coverage.xml to make it work,
but when i tried to do the same thing for Junit test results, Hudson refused to “see” it. File is in the project folder under junit-results folder, but everytime i run new build, i get the same No test report files were found. Configuration error? error message. Tried many variations, but no luck. I’m missing probably something really tiny. Could somebody help me, please?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T05:31:11+00:00Added an answer on June 4, 2026 at 5:31 am

    Hudson searches for jUnit test results relative to its workspace. And you can’t specify an absolute path (I’ve been using Hudson/Jenkins for more than a year and still not sure why not). So in your case it is looking only at things that are deeper in the directory level than the workspace. Now, for a multi-congiguration project the workspace does not start at the top level, but deeper – it includes axes names (e.g.: workspace_root/AXIS1_NAME/AXIS1_VAL...). But your tests are located up the directory tree from that workspace. You have to copy them in a build step into ${WORKSPACE} and then Hudson will be able to publish them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an Android test project that I'd like to link into Hudson, but
I have setup an android test project that runs junit tests. It's using two
I'm dipping my toes into Android development. I have a project that will interface
I have a JUnit test case in an Android project that contains code that
I have two projects, my main android application and another test project that runs
I have an android project that has a test module that will remove and
I have created one Android Project with Ant build. And also created Test Project
I have Android pet-project DroidIn which utilizes HttpClient 4 (built into Android) to do
I have recently created an Android application that allows users to add shopping items
Given that I in my workspace I have an android project MyAndroidProject and my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.