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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:20:14+00:00 2026-06-13T00:20:14+00:00

I seek a perl module to convert CppUnit output to TAP format. I want

  • 0

I seek a perl module to convert CppUnit output to TAP format. I want to use the prove command afterwards to run and check the tests.

  • 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-13T00:20:15+00:00Added an answer on June 13, 2026 at 12:20 am

    Recently I was doing some converting from junit xml (not to TAP format though).
    It was very easy to do by using XML::Twig module.
    You code should look like this:

    use XML::Twig;
    
    my %hash;
    
    my $twig = XML::Twig->new(
       twig_handlers => {
           testcase => sub { # this gets called per each testcase in XML
               my ($t, $e) = @_;
               my $testcase = $e->att("name");
               my $error = $e->field("error") || $e->field("failure");
               my $ok = defined $error ? "not ok" : "ok";
               # you may want to collect
               #   testcase name, result, error message, etc into hash
               $hash{$testcase}{result} = $ok;
               $hash{$testcase}{error}  = $error;
               # ...
           }
       }
    );
    $twig->parsefile("test.xml");
    $twig->purge();
    
    # Now XML processing is done, print hash out in TAP format:
    print "1..", scalar(keys(%hash)), "\n";
    foreach my $testcase (keys %hash) {
         # print out testcase result using info from hash
         # don't forget to add leading space for errors
         # ...
    }
    

    This should be relatively easy to polish into working state

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

Sidebar

Related Questions

I seek for way to use locale-based decimal separator in my perl-scripts. For now
I want to use seek bar in my application but I should set double
I want multi-line strings in java, so I seek a simple preprocessor to convert
I am quite new to groovy and seek your help. I want to read
If I want to implement seek() to complete the SeekableIterator interface, should I internally
I've written a perl script that opens two files which contain lists. I want
I seek to use the http live streaming standard with video. I'd like to
I want to do relative seek on a mysql resultset, more specifically +1/-1 seeks.
When I run the below script I get Can't use an undefined value as
I want to put seek bar over the map view in android. Any Idea

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.