You wrote:
As an aside, why are you using "PerlUnit"? Are you new to Perl?

LOL! I have been using Perl since 1995! Also Java, Python and PHP.

I often see this with programmers coming from other languages to Perl looking for the Perl equivalent of JUnit. The mainstream Perl QA community overwhelmingly uses the core Perl Test::More module, along with the prove command and CPAN Test::More-compatible modules. If you need something like JUnit, take a look at Test::Class.

Well, I went with PerlUnit, because I had been using jUnit, pyUnit and phpUnit quite happily and wanted to use the xUnit equivalent for Perl.

I have 640 tests written in PerlUnit for my application, so I am not really keen to switch in this particular project, but I might consider other frameworks for future projects. Can you tell me a bit more why the Perl commmunity does not use PerlUnit? What are the advantages of these other frameworks you mention? Would any of them solve my multi-threading test problem?

BTW: I just looked briefly at Test::Class, and I am not sure it would work for me because it's not object oriented. And testing an object-oriented app with a non-object oriented test framework doesn't work well for the following reason:

Say you have a class hierarchy like this:
ParentClass ChildClass1 ChildClass2
There is some behaviour that the two children inherit from their common parent. This behaviour needs to be tested of course. If your test framework is not OO, then you will need to repeat those same tests in the tests for both children. But if your test framework is OO, you can create a parallel hierarchy of tests cases:
ParentClassTest ChildClass1Test ChildClass2Test
The tests for the parent class behaviour are defined in ParentClassTest, and in tests for the children only need to test that part of the behaviour which is specific to them. This is a standard testing best-practice, and I have found it to be really useful. But it requires an OO test harness. Thx

In reply to Re^2: UnitTesting multi-threaded apps by alain_desilets
in thread UnitTesting multi-threaded apps by alain_desilets

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.