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 136243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:55:03+00:00 2026-05-11T06:55:03+00:00

EDIT : This issue has been fixed by google in gtest 1.4.0; see the

  • 0

EDIT: This issue has been fixed by google in gtest 1.4.0; see the original bug report for more information.

I’ve recently switched to gtest for my C++ testing framework, and one great feature of it which I am presently unable to use is the ability to generate JUnit-style XML test reports, which could then be read in by our hudson build server.

The XML output generated by the gtest test suite all looks legit:

<?xml version='1.0' encoding='UTF-8'?> <testsuite tests='370' failures='0' disabled='0' errors='0' time='45.61' name='AllTests'>     <testsuite name='application' tests='7' failures='0' disabled='0' errors='0' time='8.953'>         <testcase name='zero_tasks_on_bootup' status='run' time='0' classname='application' /> ...etc.     </testsuite> </testsuite> 

I’ve also tried adding a JUnitReport task to my ant build script, which works fine, and generates XML like so:

<?xml version='1.0' encoding='UTF-8'?> <testsuite tests='370' failures='0' disabled='0' errors='0' time='45.61' name='AllTests'>     <testsuite name='application' tests='7' failures='0' disabled='0' errors='0' time='8.953'>         <testcase name='zero_tasks_on_bootup' status='run' time='0' classname='application' />     ...etc.     </testsuite>  </testsuite> 

The problem is, whenever I tell ant to publish the JUnit test results, and then point it to either the raw test result XML, or the compiled result generated in the ant JUnitReport task, hudson always complains about finding no test results there.

I’m not a java guy, so I can’t tell what’s going on here, and I can’t find an example of how the JUnit XML ought to look like. Can someone help to point me in the right direction?

  • 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. 2026-05-11T06:55:04+00:00Added an answer on May 11, 2026 at 6:55 am

    Edit: Google test has fixed this issue, which is included in the gtest 1.4.0 release. See the original bug report for more info.

    Bah! I’ve finally found the cause of this problem — it’s because gtest produces one giant XML file for all test results, and hudson expects one XML test report per class. I’ve written a perl script as a workaround for this issue. To use it, you would make a target in your ant xml script which looks something like this:

    <target name='runtests'>   <exec executable='wherever/${ant.project.name}Test' failonerror='false' dir='tests'>     <arg value='--gtest_output=xml:${build.dir}\reports\${ant.project.name}.xml'/>   </exec>   <!-- Workaround for broken gtest output -->   <mkdir dir='${build.dir}/reports/output'/>   <exec executable='perl' failonerror='false' dir='tests'>   <arg value='gtest-hudson.pl'/>     <arg value='${build.dir}/reports/${ant.project.name}.xml'/>     <arg value='${build.dir}/reports/output'/>   </exec> </target> 

    For some reason, gtest also doesn’t like the wrong style of slashes being passed to it from ant, so I made my exec for windows only, as my hudson is running on a windows server. Change to ‘/’ for unix, obviously.

    I’ve also filed an issue for this on the gtest page, and also one on hudson’s issue tracker, so hopefully one of the two teams will pick up on the issue, as I don’t have enough time to jump in and make a patch myself…. though if this doesn’t get fixed in the near future, I might just have to. 😉

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

Sidebar

Ask A Question

Stats

  • Questions 163k
  • Answers 163k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer There are commercial PDF generating libraries, such as BFO and… May 12, 2026 at 12:10 pm
  • Editorial Team
    Editorial Team added an answer Yes there is. You will need to capture the output… May 12, 2026 at 12:10 pm
  • Editorial Team
    Editorial Team added an answer NMaven has been the first/official effort to provide Apache Maven… May 12, 2026 at 12:10 pm

Related Questions

Recently I installed Oracle and the required Microsoft Loopback Adaptor, which worked fine. However,
I am working on a project that has been running for a long period
When I start my application I get: The ConnectionString property has not been initialized.
I am trying to use TransactionScope , but keep getting the exception below. The

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.