RE: [Perlunit-users] PerlUnit Development
Status: Beta
Brought to you by:
mca1001
|
From: Joi E. <gy...@vi...> - 2006-02-19 16:48:09
|
On Sun, 19 Feb 2006, Desilets, Alain wrote:
> What additional features to the extensions provide?
It's not so much new features, as it is making the existing features work
properly, especially with Test::Harness-style launchers.
The 2-second summary is that it now works with Test::Harness .t files,
it displays complete error messages in the GUI, and the GUI has had some
usability tweaks made, primarily File/Restart and the ability to pre-load
the test history list using parameters from the command line. The GUI
is also running under TK804 now, which it had problems with initially.
This also means that you can use 'prove' or 'make test' on Perl Unit tests,
and they will generate proper TAP output for any test harness you might be
using.
One major issue the GUI has is that it fails to re-load perl modules
which have been changed since the GUI was launched. I've made some initial
attempts to fix this, but decided the simplest thing to do would be to
add File/Restart to just bypass the issue. This is only a problem when you're
specifying tests to load via package::Test format because the loader puts them
into the same perl process as the GUI itself. This is where perl's efficiency
bites us in the tookus. Java has this too, but JUnit provides a custom class
loader to force test classes to be reloaded. Perl needs something like this.
If you specify a .t file instead of a class, the problem goes away because the
test gets run in a child perl process, not the same process as the GUI
is using. This is why I've spent so much time making the Test::Harness support
function properly with the GUI.
Other side projects involved here are Komodo integration, and a stand-alone
test stub/launcher generator which reads a perl module and generates a
Perl Unit test stub file, and a Test::Harness .t file to launch it. This is a work
in progress.
None of this stuff is tested on Win32, by the way, but the only thing I can
can think of that may not port easily is the change to Test::Unit::Loader, where
I tell it to redirect STDERR into STDOUT in the child perl's shell command.
Here's a slightly-editted change long from my RCS tree:
2006-02-18 joi <joi@falcon>
* TkTestRunner.pm: Added some useful information to the About box.
Changed the length of the progress bar from 400 to 600, added
a pack().
Pressing <return> in the entry box now runs the test.
Tk804 fix: You can only select one failed test at a time.
* HarnessUnit.pm: Commented out some non-TAP output.
* MyTestCase.pm: Moved TAPComment up into the parent.
* UnitHarness.pm: Rewrote parser to expect proper TAP format.
Redirected STDERR into STDOUT so that the GUI can display it.
Added extra parsing to try to always have a useful name for a
failed test case in the GUI.
Corrected handling of diagnostic output so that it is passed
up to the GUI.
Added a test failure if the Plan doesn't match the case count.
TAP-compliant test harnesses need to do this.
Adjusted logic so that a plan line may follow the tests, per TAP.
Added check of result->should_stop so that the GUI can kill
Harness tests without having to wait for the entire suite to
complete.
* Result.pm: Removed non-TAP output.
Wrapped debug output with leading # per TAP.
Added plan support.
2006-02-12 joi <joi@falcon>
* UnitHarness.pm:
Ripped out the $verbose junk and replaced it with Test::Unit::Debug.
Test cases now suck STDERR in with STDOUT so the gui can parse them.
This will probably break the Test::Unit tests, but it makes the gui
much more usable.
Removed check for $max, TAP does not require that every plan print its
1..N tests line at the start of the run, it is allowed to appear at the
very end. Such systems broke UnitHarness.
Rewrote the main parser (again.) It now recognizes Test::More output,
Test::Pod output, and Test::Unit output.
2006-02-02 joi <joi@falcon>
* TkTestRunner.pm:
Added a Restart option to the File menu. This is useful for re-launching the
test gui with the original parameters, to work around perl's refusal to re-load
classes or tests which have been altered since the gui was launched.
Altered @ARGV handling so that multiple test files or classes specified on the
command line are pre-loaded into the history browser.
When re-started, the browser uses its figures out its current geometry and re-uses
that information in the new gui.
2006-01-30 joi <joi@falcon>
* Loader.pm:
Undid some of my previous work since it caused Loader to fail
its own unit tests.
* TkTestRunner.pm:
Added a File/Restart command to make restarting the GUI easier.
This is useful for the (many) cases where the Loader will
refuse to reload a changed class-under-test.
2006-01-29 joi <joi@falcon>
* Runner.pm:
Adds a default plan method. Now any Runner can run TAP tests
and have the information, even if it doesn't use it.
* TkTestRunner.pm: Added use of Test::Unit::Debug class.
* UnitHarness.pm:
Rewrote my initial fix so that it doesn't freeze the GUI.
Also enabled the plan() call.
* Result.pm:
Adding the missing plan support so that UnitHarness can pass the
information back to the Runners after the tests start running.
2006-01-28 joi <joi@falcon>
* UnitHarness.pm: Added use of Debug package.
2006-01-21 joi <joi@falcon>
* UnitHarness.pm:
Tweaked further, to make the list of failed tests more readable,
along with the details dialog presented for each.
Also made it recognize proper TAP format better.
* HarnessUnit.pm:
Tweaked to follow TAP.pod documentation. The format of test
results did not follow standard TAP, now it's closer.
* MyTestCase.pm: Added an assert_zero method, and tweaked assert_isa.
2006-01-16 joi <joi@falcon>
* Loader.pm:
Tweaked the compile routines so that they don't issue 'Subroutine redefined'
warnings over STDERR while the gui is running.
* Exception.pm: Quieted a warning that was showing up on STDERR.
* Loader.pm:
Fixes bug where tests specified by class name are never re-loaded
once a gui has been launched.
* UnitHarness.pm:
Initial attempt at fixing errors displayed. Still rather ugly,
but I'm not certain if I'm understanding things correctly.
2005-12-27 joi <joi@falcon>
* UnitHarness.pm: Fixed a runtime warning.
* TkTestRunner.pm: Added get_message() output to the details window.
2005-12-23 joi <joi@falcon>
* HarnessUnit.pm:
Fixed bug that caused the assert(test,message) message parameter to be
ignored and not printed in both of the uppermost unit harnesses.
* TkTestRunner.pm: Hides the useless 'rerun' button.
--
Joi Ellis
gy...@vi...
No matter what we think of Linux versus FreeBSD, etc., the one thing I
really like about Linux is that it has Microsoft worried. Anything
that kicks a monopoly in the pants has got to be good for something.
- Chris Johnson
|