> There is this big hairball of under-tested code. (Nothing new here)
> So the question is, which to tackle first - unit tests, or functional tests.
Generally, I agree with the earlier responders endorsing your approach
and I've little to add to their thoughtful remarks.
Perhaps the major benefit
--- Nicholas Clark wrote:
> On Sat, Jul 15, 2006 at 08:36:54AM +1000, Andrew Savige wrote:
> > Who's Chromatic?
>
> And it wasn't even the start of a sentence. :-)
>
> [When doing the perl 6 summaries, Piers reconciled the forces of accuracy and
> traditi
--- Clayton O'Neill wrote:
> I think a core difference between your list and Chromatic's is that
> yours would be part of the standard library in a lot of languages,
> whereas Chromatic seems to be aiming more for things that would be
> part of the language.
Who's Chromatic?
/-\
--- Adam Kennedy wrote:
> I know it's somewhat vapour at the moment, and I'm keeping somewhat
> quiet, but the new post-Audrey'fied PITA design is aiming at exactly
> what you have described.
Thanks for the reminder about PITA. I'd (unforgivably) forgotten about
that project when I first enquire
We are looking at introducing continuous builds/smoke tests at
work across a number of platforms (mainly Windows and Unix),
building a number of different languages (mainly C++).
I quick google uncovered the list below.
Anyone got any advice?
Thanks,
/-\
Perl
* AutoBuild: http://www.auto
--- "Fu, Elva" wrote:
> It seems there are really an ¡°Integrated¡± test suites existed to test Perl
> itself. Who could give me a hand to find it? Thanks in advance.
I thought chromatic already this question by pointing you at the t/
directories in the Perl source code distribution.
To clarify,
--- Tels wrote:
> although I still can only guess what TDD stands for :)
Tolkien Driven Development?
Googling around for examples of real world large systems developed
using TDD, I found http://www.agiledata.org/essays/tdd.html which
states:
The first reaction that many people have to agile tec
--- Tyler MacDonald wrote:
> Well so far the only ones I've seen are "eg", "examples", and from that
> renegade GD::Graph, "samples".
And from that eccentric Acme::Bleach, "demo".
/-\
On yahoo!7
Avatars: Dress up like yo
--- "A. Pagaltzis" wrote:
> Additive filters that the same code can run without are
> sane when used carefully, and they're easy to create if the
> trigger is a special comment or better yet POD section:
Damian's Smart::Comments module filters specially formatted
comments and can do assertions and
--- David Landgren wrote:
> Seriously though, I have a module whose test suite includes Test::Pod
> and Test::Pod::Coverage, except that I use the following construct:
>
> SKIP: {
> skip( 'Test::Pod not installed on this system', 1 )
> unless do {
> eval qq{ use Test::P
--- Thomas Klausner wrote:
> *) CPANTS is not describing the one and only way how to write Perl / pack
> distribution. It's more of an online mutliplayer game where people submit
> their dists which than fight against my evil metrics.
The multiplayer game you describe is subject to the testing
phe
--- Andy Lester wrote:
> But will the author actually care? Will the author even know this
> exists? Are you going to send email to Bob and say "Hey, Bob, you only
> passed 7 of 23 things"? What's Bob going to say in return? I see a
> couple of options:
Ah, now I see where you are coming from.
--- Andy Lester <[EMAIL PROTECTED]> wrote:
> Why are we worrying about these automated kwalitee tests? What will
> happen once we find that DBIx::Wango has only passed 7 of these 23
> items on the checklist?
I am not the one to answer this, but I'm curious to know where you are
coming from. Is
--- Thomas Klausner wrote:
> --- Adam Kennedy wrote:
>> has_perl_dependency:
>>
>> In the META.yml (assuming it exists) there is a dependency on the
>> version of perl required to install the dist.
>>
>> The goal of this is to make life a little easier on installers and CPAN
>> testers and a fe
--- Andy Lester wrote:
> I'd throw my hands up and let it go, then. One of the key functions of
> Phalanx is to modernize the testing infrastructure of the modules we
> touch. If he needs it to stay compatible back to the relative dark
> ages, then let's just leave it that way.
Though many modul
As described here:
http://www.nntp.perl.org/group/perl.perl6.compiler/413
'nmake test' on the latest release of Pugs blew up under Windows with
"command line too long" (using ActiveState perl-5.8.6).
Is there a "standard" way to fix this? What do other distributions with
vast numbers of tests do
--- Anuradha Dissanayake <[EMAIL PROTECTED]> wrote:
> I'm new to unit testing in Perl, so this may be a stupid question.
>
> Using Test::More to test .pm perl modules is quite simple as you just
> "use" the module in your test executable and call the module's
> subroutines inside your tests.
>
>
--- Michael G Schwern wrote:
> I hereby propose the Koaladile (Kah-wah-lah-dile) for perl-qa mascot!
>
>
http://i.somethingawful.com/inserts/articlepics/photoshop/12-10-04-animals/AirbagSML.jpg
>
> "Koaladile is for Kwalitee". (Kah-wah-lah-dile is for Kah-wal-i-tee)
>
> From Something Awful's
Steve Hay wrote:
> And this program (500,000 small extensions to a string):
>
> my $a = '';
> my $start = time;
> for my $i (1 .. 50) {
> print "$i\n" if $i % 1000 == 0;
> $a .= '.' x 20;
> }
> printf "OK (%d seconds)\n", time - $start;
>
> is even worse: 1 second again on 5.8.6/perl-malloc
--- "Clayton, Nik" wrote:
> Any "Writing thread safe libraries for dummies" texts you could point
> me at?
I recommend "Programming with POSIX Threads" by David Butenhof.
Re the varargs ok() business, I assume you'll be using some sort of
config.h with your libtap library. Any plans on using aut
--- /-\ wrote:
> In an attempt to do varargs ok() without the magical __VA_ARGS__,
> I've come up with two little example solutions shown below.
> Improvements welcome.
Sorry, but curiosity got the better of me and I took a look at how
the very widely used and portable C++ ACE library does it.
Th
--- muppet wrote:
> writing your own printf-style macros is actually a very common idiom
> for getting around this sort of technical problem. they, of course,
> raise the further problem that GCC's vararg macros are not portable,
> and C99's vararg macros are not yet universally supported.
Ag
--- "Clayton, Nik" wrote:
> Andrew Savige wrote:
> > 2) A uniform mechanism for test programs to handle command line
> > arguments would be nice. For example:
> >
> > int main(int argc, char* argv[])
> > {
> > ta
--- Michael G Schwern <[EMAIL PROTECTED]> wrote:
> Yucko.
>
> Test::More implements cmp_ok() using an eval. Could a macro prove useful
> here to do something similar?
>
> cmp_ok(foo, 'int', '==', bar);
Good idea Schwern.
These test suites inevitably degenerate into macro crack-pipe
smoking ses
--- "Clayton, Nik" <[EMAIL PROTECTED]> wrote:
> Having done the initial work to get most of FreeBSD's regression testing
> infrastructure producing Test::Harness TAP compatible output, I've started
> putting together a C library that makes it easier to write tests in C.
Great!
This is something I
--- Michael G Schwern <[EMAIL PROTECTED]> wrote:
> On Mon, Dec 06, 2004 at 02:25:42PM -0800, Andrew Savige wrote:
> > --- Michael G Schwern <[EMAIL PROTECTED]> wrote:
> > > Why add that extra auto-sprintf complexity? Can't the user do the exact
> > >
--- Michael G Schwern <[EMAIL PROTECTED]> wrote:
> Why add that extra auto-sprintf complexity? Can't the user do the exact
> same thing with:
>
> ok(some_func(i), sprintf("some_func(%d)", i));
No. sprintf in C needs a buffer and you don't know how big to make it.
> > ok2() is for situatio
--- Michael G Schwern wrote:
> Excuse me for a moment.
>
> I AM SO SICK OF THREADING BUGS!!! BLARHGAGHAGHAHGAH! I don't even USE
> THREADS and I seem to find all the bugs!! ARGH!!!
>
> *ahem*
To try and cheer you up a bit, I'm delighted to report that your new
Test-Simple-0.51 passed all tes
I am currently trying to sell Test::More/prove and TDD at work.
I received a complaint from a newbie workmate today.
He complained that when a test, for example:
ok( 0 == 1, "This is my test name" );
fails, Test::Harness (and the prove command) by default do not
print the test name ("This is my
Does Test::More have an equivalent concept to Aegis "NO RESULT"?
Is Aegis "NO RESULT" equivalent to Test::More skip?
/-\
Find local movie times and trailers on Yahoo! Movies.
http://au.movies.yahoo.com
Ovid wrote:
> For white box testing C code, I just use assert().
assert() is ok, but ok() is better. :-)
I will prolly roll my own custom ok() macro, so instead of:
assert(x==y);
I can write:
ok(x==y, "test that x equals y");
Writing a lot of tests, I want to be able to easily label each test.
I am currently using Test::More for my Perl white-box unit tests.
I also need to write some C/C++ white-box unit tests and would like
to use something similar in spirit to Test::More.
Smalltalk's SUnit-style framework has been ported to many languages
(JUnit, cppunit, Test::Unit, Test::Class, ...)
Suppose I fix a bug with a unique bug ID in a bug tracking system.
I start by dutifully adding 15 new asserts, say, to an existing unit
test program, to duplicate the bug before I fix it. What if I later
want some way to map the bug ID back to the these 15 new asserts?
Should I somehow assign uniqu
Michael G Schwern <[EMAIL PROTECTED]> wrote:
> To catch memory mistakes in C, I'd normally use something like Electric
> Fence or other malloc replacement. Basically something that replaces the
> memory allocation functions with those that put in magic so that if your
> program walks outside its a
Michael G Schwern wrote:
> Disabling tests for subjective reasons (they take "too long", they don't
> test critical functionality, etc...) is a slippery slope. For that reason
> I'd agree with Curtis and say that everything is always run by default
> and users can then elect what to turn off. PER
Ovid wrote:
> --- Kate L Pugh wrote:
> > This was discussed on this list back in June. I'm wanting to
> > implement it now and am wondering if Andrew's suggestion (below) has
> > been taken up by anyone. Is PERL_TEST_LONG what people here
> > generally
> > expect to be the right environment varia
Michael G Schwern wrote:
> I use t/lib so the top level t/ directory doesn't get cluttered (and for
> compatibility with the Perl core which may be important later for A::T).
Yes, I like that. Should I call it:
t/lib/Test/Archive/Tar...
or:
t/lib/Archive/Tar/Test...
or something else?
I took
As part of the phalanx project, I've added quite a few new tests to
02_methods.t in the Archive::Tar test suite. Though I'm jubilant the
new tests have uncovered a number of bugs, the test code itself has
been getting progressively uglier, ripe for refactoring, in fact.
To avoid code duplication b
"Jeays, Mark" wrote:
> Hi,
>
> I'm writing on behalf of Ottawa Perl Mongers. At our last meeting, one of
> our members gave us a quick introduction to the Phalanx project and its
> goals. A number of the members were interested in the idea and we have been
> looking for a group project. How would
Michael G Schwern wrote:
> On Sun, Oct 26, 2003 at 04:45:48PM +1100, Andrew Savige wrote:
>> There is a misprint in this line:
>>my $have_testpod = !$@ and $Test::Pod::VERSION >= 0.95;
>> It should read:
>>my $have_testpod = !$@ && $Test::Pod::VERSIO
Michael G Schwern wrote:
> Since skip_all will exit immediately you can fold that big "everything
> inside the else block" away.
>
> eval 'use Test::Pod';
> my $have_testpod = !$@ and $Test::Pod::VERSION >= 0.95;
> plan skip_all => "Test::Pod v0.95 required for testing POD"
> unless $have_tes
I'm about to add a POD test program to my phalanx distro.
Before I do that, just want to check I'm using the best model.
I plan on using the one from WWW::Mechanize (shown below) --
unless someone can suggest a better model.
Is it worth trying to agree on a de facto standard name for
such a beast:
Michael G Schwern wrote:
> On Tue, Oct 21, 2003 at 12:34:44PM -0500, Dave Rolsky wrote:
>> Anyway, my taint mode experience has been that random things break in very
>> weird ways when using it.
>
> All the more reason to test with it on. :)
Given the differences in behaviour with taint mode, it
Tim Bunce wrote:
> p.s. Could someone suggest a pure-perl module with lots of tests as
> a suitable testbed for Devel::Cover?
http://search.cpan.org/dist/Acme-EyeDrops has 22 test programs,
769 tests and no dependencies.
/-\
http://personals.yahoo.com.au - Yahoo! Personals
New people, new poss
I noticed in Test::Tutorial:
"Taint mode is a funny thing. It's the globalest of all global features.
Once you turn it on it effects all code in your program and all modules
used (and all the modules they use). If a single piece of code isn't
taint clean, the whole thing explodes. With that in mind
Ovid wrote:
> I was running some test code with Devel::Cover and I've had no problem using
> it or generating pretty reports that make coworkers "ooh" and "ahh".
> Unfortunately, I started running my test suite on a different set of
> tests and started getting some strange errors...
I have no expe
Ovid wrote:
> --shuffle will shuffle the order in which the tests are run to ensure that
> you have no accidental dependency on test order.
>
> --fast sets and environment variable that can be checked in the test scripts.
> For example, if you have a couple of tests that double the time of your tes
Ovid wrote:
> I've just made it available at
> http://users.easystreet.com/ovid/cgi_course/downloads/grind.gz
>
> It needs more work, including allowing descending into directories (via
> File::Find or a similar mechanism) and having pre and post actions.
> I haven't figured out the best way to do
Ovid wrote:
> I do something like the following to get this effect:
>
> #!/usr/bin/perl -w
> use strict;
> use Test::Harness;
> use Getopt::Long;
> use Pod::Usage;
>
> GetOptions(
> 'help|?'=> sub { pod2usage(-verbose => 2); exit },
> 'verbose!' => \$Test::Harness::verbos
Fergal Daly wrote on 14 July 2003:
> is it possible with Test::Harness and MakeMaker to pass arguments to
> my test scripts? I think it's not but I just want to check for sure.
> The module I'm working on is getting a new "optimised" mode so I'd like
> to be able to run all the tests twice, once
> Net_SSLeay.pm
Just noticed that's a kinda odd name for a distribution that contains
the modules Net::SSLeay and Net::SSLeay::Handle. I wonder why is it
not called Net-SSLeay?
/-\
http://search.yahoo.com.au - Yahoo! Search
- Looking for more? Try the new Yahoo! Search
Andy Lester wrote:
> The Phalanx project has started its rampup to an official
> announcement. Phalanx is going to beef up the tests, coverage and
> docs on Perl and 100 heavily-used modules from CPAN.
>
> The project page is at http://qa.perl.org/phalanx/. Please take a
> look, tell me your
A moron once wrote:
> I have a similar problem; I'd like some of my test programs
> to generate other test programs on the fly, then run them.
>
> This seems to work:
>
> use strict;
> use Test::Harness;
> my $outf = 'out.tmp';
> print "1..1\n";
> local *SAVOUT; open(SAVOUT, ">&STDOUT"); # save or
Michael G Schwern wrote:
> On Wed, Aug 20, 2003 at 07:18:54PM +1000, Andrew Savige wrote:
> > I admit to asking my original question as a joke since, as of Perl
> 5.6.1,
> > Test::Harness was pure functional (Test::Harness::Straps no there).
> > However, I am not joking
Michael G Schwern wrote:
> On Thu, Jul 24, 2003 at 10:55:57AM +1000, Andrew Savige wrote:
>> I'd be interested to see an example of sub-classing Test::Harness.
>
> See examples/mini_harness.plx in Test::Harness.
>
> The straps interface is not yet entirely usable.
Th
Leon Brocard wrote:
> I like the is_impolite / is_naughty ideas, and will roll them into the
> next version. If you have a simple metric for a good cross-platform
> filename, that'd be good.
I'll see what I can come up with.
> I'm not sure about how you mean a "good" Changes. For a start, people
Though this started as an innocent question, I think it would be
nice to have a module/script to scrutinize a CPAN distribution.
1) Archive nit-picker. Archive::Any's is_impolite/is_naughty is a
start. Also test for: "good cross-platform" file names (my
original question); "good" Changes, RE
Running variants of:
tar tzf perl-5.8.0.tar.gz | perl -lne'print if tr|-_./a-zA-Z0-9||c'
suggests only [-_./a-zA-Z0-9] are valid characters in a path name.
Then I noticed 'perldoc perlport' lists the portable filename
characters as defined by ANSI C and various other restrictions.
What is the le
Leon Brocard wrote:
> Leon Brocard sent the following bits through the ether:
>
> > Secondly, who do I need to convince to add the "make test" results for
> > PASSes too? ;-)
>
> So, does anyone actually have an opinion on this?
*Puts up hand*. I agree with you. Seems useful and trivial to impleme
> #!/usr/bin/perl
> use strict;
> use warnings;
>
> sub my_fn { print "in sub my_fn, args='@_'\n" }
>
> # This happily calls my_fn(): the parameters received by my_fn are
> # 'sample.t' and 'def'. But why?
>
> 'sample.t'->main::my_fn('def');
>
> # ... yet this fails with: Can't call method "mai
Andrew P's test program does indeed "work" with Perl 5.8.0
on both Unix and Windows with a test name of 'sample.t' in
THDriver.pl, yet changing it to './sample.t' results in a
failure of: Can't call method "SUPER::runtests" without a
package or object reference. But why?
The snippet below (tested
Danny Faught wrote:
> I've often talked about the difference between my black-box test
> experience and the unit testing context that most of you are working in.
> I've come across an interesting example of an open source black-box
> tool - QMTest, http://www.codesourcery.com/qm/qmtest.
Just cur
"Potozniak, Andrew" wrote:
> Create a sub class of Test::Harness and or MakeMaker that will over-ride
> all of their methods/subroutines and then add what you want it to do,
> don't forget to call super classes' method/subroutine that you are
> over-riding. I can give an example of this if need be.
Fergal Daly wrote:
> Hi,
> is it possible with Test::Harness and MakeMaker to pass arguments
> to my test scripts? I think it's not but I just want to check for sure.
> The module I'm working on is getting a new "optimised" mode so I'd like
> to be able to run all the tests twice, once with
Mark Fowler wrote:
> On Thu, 5 Jun 2003, [iso-8859-1] Andrew Savige wrote:
>
> > While a standard name is not required, having one would allow
> > automated CPAN test harnesses to run the longer tests.
>
> While we're on it, it'd be nice to have a standard envir
Randal L. Schwartz wrote:
> All I'm asking for in my quest is to keep the "install health check"
> tests down to a minute or two. Remember that CPAN.pm insists that
> "make test" works before I can install.
I agree. Modules should commonly have long-running exhaustive tests
and/or stress tests. T
Randal L. Schwartz wrote:
> No, it doesn't need a standard name. The default should be the
> "install tests" without any special envar. The developer can select
> their own set of envars to control various *longer* tests.
While a standard name is not required, having one would allow
automated CP
Merlyn's use perl journal of April 29, 2003:
http://use.perl.org/~merlyn/journal/
suggests using environment variables to spare the installer of
CPAN modules a long wait while running 'make test'. One reply
noted that DBD, HTML::Mason and other modules already do this.
Is there a standard name/s
En op 5 oktober 2002 sprak Ann Barcomb:
> I hadn't looked in to how I could solve my question, and because
> it was given to me as a low priority task, I wasn't sure I was going
> to have a chance to either. But you can count me as someone who will
> be very happy about the module :)
I noticed C
En op 4 oktober 2002 sprak Michael G Schwern:
> The problem is when you put those two next to each other, one
> promising a friendly interface, one a bare-metal interface,
> it confuses the intent of the module. Is it for Joe End User
> or is it for Joe Core Hacker?
A module to report memory usag
I was very impressed with Autrijus' article on www.cpan.org.
This has inspired me to try to do some Windows CPAN testing.
Please bear in mind that I am very new to all this.
The cpantest script from http://testers.cpan.org does not seem
to work out-of-the-box on Windows. It failed for me with a:
71 matches
Mail list logo