Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

barbie (2653)

barbie
  reversethis-{ku. ... m} {ta} {eibrab}
http://barbie.missbarbell.co.uk/

Leader of Birmingham.pm [pm.org] and a CPAN author [cpan.org]. Co-organised YAPC::Europe in 2006 and the 2009 QA Hackathon, responsible for the YAPC Conference Surveys [yapc-surveys.org] and the QA Hackathon [qa-hackathon.org] websites. Also the current caretaker for the CPAN Testers websites and data stores.

If you really want to find out more, buy me a Guinness ;)

Links:
Memoirs of a Roadie [missbarbell.co.uk]
[pm.org]
CPAN Testers Reports [cpantesters.org]
YAPC Conference Surveys [yapc-surveys.org]
QA Hackathon [qa-hackathon.org]

Journal of barbie (2653)

Wednesday July 17, 2002
04:22 AM

Testing

[ #6408 ]
Seeing as much of the stuff I'm going to be doing in future involves testing, I thought I'd look for some tutorial and guides for writing tests.

I found Schwern's very good Test::Tutorial page, which goes a long way to what I wanted but not quite far enough. I basically wanted to write test suites not just for modules but for whole scripts. A mammoth task I know, but but worth it in the long run. But there isn't anything ... except I did discover that Schwern is talking at next week's OSCON and more specifically has a "Writing a Test Library" talk. This sounds exactly what I was after. Only one problem though. I'm can't afford £2,500 out of my own pocket to go to OSCON :(

I hope Schwern puts his talk online somewhere, or perhaps goes that bit further by writing a book about it all. I enjoyed his talk at last year's YAPC::Europe but at the time didn't have the time to persue it further. I note he's proposed some talks for this years YAPC::Europe, which I hope to be a bit more proactive about this time.

In the meantime, if anyone knows of some good tutorials or guides online, please let me know.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Test::Tutorial talks primarily about writing unit tests for modules. If you have existing scripts that you want to test, you may want to look into regression testing. Regression testing is used when releasing bug fixes and extensions to existing functionality to ensure that the overall level of functionality does not "regress" -- i.e. those things that worked in version 1.0 should keep working in version 1.1. I also find regression testing useful for poorly written legacy scripts. (For example, it is di
    • You mean The Perl Review [theperlreview.com], right? :-)

      I'm about to roll out some HTML testing stuff today or tomorrow that might be useful, too, along those lines. It'll be wrappers around HTML::Lint.

      Maybe we should put up sample code that shows how people use the testing stuff in the real world.

      --

      --
      xoa

    • # Here's a sample of a Session.t file that
      # corresponds to a Session.pm file I have.
      # It could certainly be more robust, and test
      # more options than just some simple scalars.

      #!/usr/bin/perl -w

      use strict;

      use constant SAVEPATH=>'/tmp';

      use Test::More tests=>7;

      BEGIN {
          use_ok( 'TW::Session' );
      }

      my $saved_session_id;

      CREATE: {
          my $session = new TW::Session( SavePath=>SAVEPATH );
          isa_ok( $session, 'TW::Session', 'Created first session' );
          $session-
      --

      --
      xoa