in reply to
Re: UnitTesting multi-threaded apps
in thread UnitTesting multi-threaded apps
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:
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:
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.