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

  • Home
  • SEARCH
  • 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 8392379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:30:11+00:00 2026-06-09T19:30:11+00:00

I am attempting to get JUnit test reports from our continuous integration Jenkins builds

  • 0

I am attempting to get JUnit test reports from our continuous integration Jenkins builds into Sonar for our Android project. I’m a hair’s breadth from success and I can’t figure out the last step.

The build is done with Ant.

I’m using the Jenkins-started emulator and running the tests with the missing android XML JUnit test runner. The tests run, and I successfully pull the JUnit XML results files (com.my.package.thing-TEST.xml, etc.) off the device into a designated directory using the instructions provided by the test runner’s authors.

The Sonar analysis is done using the “Invoke Standalone Sonar Analysis” build step provided by The Jenkins Sonar plugin. I’ve got the project properties set up so that all the static source analysis and such is all successfully being pushed to the Sonar server.

My problem is that it won’t push the JUnit test results along with all the rest of the analysis. I’ve followed the Sonar instructions about reusing test reports. Notably, I’ve set these properties:

sonar.dynamicAnalysis=reuseReports
sonar.surefire.reportsPath=android/REDACTED-test/junit-results

I can see in the build output where it should be parsing the results:

17:52:28.013 INFO        org.sonar.INFO - Execute Findbugs 2.0.0 done: 25446 ms
17:52:28.378 INFO  p.PhasesTimeProfiler - Sensor FindbugsSensor done: 25812 ms
17:52:28.378 INFO  p.PhasesTimeProfiler - Sensor SurefireSensor...
17:52:28.379 INFO  s.p.s.SurefireSensor - parsing /jenkins/jobs/REDACTED/workspace/android/REDACTED-test/junit-results
17:52:28.383 INFO  p.PhasesTimeProfiler - Sensor SurefireSensor done: 5 ms
17:52:28.383 INFO  p.PhasesTimeProfiler - Sensor CpdSensor...
17:52:28.384 INFO   o.s.p.cpd.CpdSensor - SonarEngine is used

I’ve logged onto the build machine to have a peek in the directory mentioned, and I’ve confirmed that there are several JUnit XML files there, but for some reason, the Sonar server is still reporting zero tests. Since the SurefireSensor is only taking 5 ms, I’m pretty sure it’s not seeing and/or opening the results files, but I don’t know why. Can anyone help?

  • 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-09T19:30:12+00:00Added an answer on June 9, 2026 at 7:30 pm

    The runner produces test result names in the format:

    android.package.name-TEST.xml

    The emma surefire plugin finds only .xml files whose names start with "TEST-".
    The missing android XML test runner, unfortunately, provides only suffix functionality, so you will have to alter each file name manually by adding "TEST-" to the front.

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

Sidebar

Related Questions

Im attempting to get a block of text from a file I have already
I'm attempting to get order data from a Yahoo store. I'm using the docs
All, I'm attempting to write a Junit test that calls a Web Service client
I am attempting to get the Jersey test framework working. We are building using
I am attempting to write some JUnit tests for my android application. The application
I am attempting to get all the data from a MySQL db with PHP,
i am attempting to get my android app to work on both phone type
I have been attempting to get log4net logging any info or error into my
I'm attempting to get my feet wet with python on Project Euler, but I'm
While attempting to get an old svn dump of a project under git control,

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.