DrWhy has asked for the wisdom of the Perl Monks concerning the following question:

Greetings Monks,

We have a Perl testing framework where I work that will need in the next few months to have Java testing functionality added to it. I'm wondering if there are any Java testing tools already in existence that output their results in TAP format so that thier testing output can be incorportated into our Test::Builder-based testing framework.

--DrWhy

"If God had meant for us to think for ourselves he would have given us brains. Oh, wait..."

  • Comment on Is there a Java testing framework that output's TAP?

Replies are listed 'Best First'.
Re: Is there a Java testing framework that output's TAP?
by adrianh (Chancellor) on Nov 22, 2006 at 09:07 UTC
    I'm wondering if there are any Java testing tools already in existence that output their results in TAP format so that thier testing output can be incorportated into our Test::Builder-based testing framework.

    Not that I'm aware of. Shouldn't be to hard to subclass org.junit.runner.Runner, or iterate over a org.junit.runner.Result though.

      Just a quick comment/observation. If someone did implement a TAP-compatible testing framework for Java, would it be appropriate for inclusion in CPAN?

      Discuss amoung yourselves.

        It should probably be mentioned in the TAP pod, but I don't think it should be hosted on CPAN. This would make it consistant with libtap (a C tap parser), at least.
      Thanks for the suggestion. I may take this approach. It'll be a good project for me to get my feet wet in Java -- not that this is my language of choice mind you, but since that's what I'm being given, I'll have to adapt.

      --DrWhy

      "If God had meant for us to think for ourselves he would have given us brains. Oh, wait..."

Re: Is there a Java testing framework that output's TAP?
by clscott (Friar) on Nov 22, 2006 at 16:11 UTC
    Another good place to search for the answer to this question is on the Perl QA mailing list, where the topics of discussion are Testing perl, Testing with Perl and the Test Anything Protocol (TAP) (and it's implementations). http://beta.nntp.perl.org/group/perl.qa
    --
    Clayton
Re: Is there a Java testing framework that output's TAP?
by Anonymous Monk on Nov 23, 2006 at 13:51 UTC
    There is already a very good testing framework for Java called JUnit. There's also a very good logging framework for Java called Log4J (which Log4Perl is based upon). My suggestion is to use Perl to exec the Java testing application, let the Java testing application run to completion and then parse the results using the already existing Perl script(s) you have for QA testing. You'll have to tweak the Log4J properties file the Java application will use to fit the Perl script(s) parsing the output -or- write new methods in Perl to parse the Java testing output. No need to get fancy - you're just looking to fit the Java QA results into the framework you already have :-)