Dada Mail, 2.10.12 Release, update on test suite

 
From: "Dada Mail" <dada@PROTECTED>
Date: December 20th 2006

Hello everyone,

Dada Mail, 2 10 12 was released last week - this is a bugfix release,
I've done a pretty good job this release documenting all the bugs
that were found in 2 10 11 and also giving some workarounds, so if
you don't want to upgrade the entire program, there may be a simpler
fix:

  • Download:

    http://prdownloads sourceforge net/mojomail/dada-2_10_12 tar gz? download

    http://prdownloads sourceforge net/mojomail/dada-2_10_12 zip?download

+Changelog:

http://mojo
skazat
com/support/documentation/ 

changes pod html#2_10_12__released_12_15_06

I didn't include the testing suite, since I was still mulling over
all the feedback from you guys (thanks!)

I think I am going to include it - the problem really is this:

The testing suite is going to be very developer-centric It may be
useful for a general user to have it and use it - at least to get a
general idea if everything is working correctly, but given that
information, it's not going to be something they can act upon -
especially if there's an error

For someone who wants to deploy Dada Mail onto a website or have it
available as a service, the testing suite will be very valuable,
since they can try out a new version, run the testing suite, see if
there's any errors and, if there's not - deploy with a little more
piece of mind

Anyways, here's some background on automated testing in perl:

http://petdance
com/perl/automated-testing/

And how you can make your own tests:

http://search
cpan
org/dist/Test-Simple/lib/Test/Tutorial
pod

The cool thing about tests is that if you're a developer and you're
running into a problem with the program, but don't know how to fix
the bug, you can contribute a simple test that illustrates the
problem I (or someone else) can then try to fix the problem by
making the test pass

One the test passes, basically the bug is fixed and you have proof
That test can then be added to the test suite, so it'll always be
around to test out and the bug shouldn't crop up again Which is cool

It's pretty difficult (and a fair share geeky) to follow along, but
the test for a bug, but here's the test for this bug:

[ 1612943 ] 2
10
11b - Send a List Invitation sends to subscribers
http://sourceforge
net/tracker/index
php? 

func=detail&aid=1612943&group_id=13002&atid=113002

(located in the, "DADA_Mail_MailOut t" test file)

[snip]

 # gotta reset this



 $test_msg_fields->{'Message-ID'} = '<' 
   

DADA::App::Guts::message_id() ' ' $ran_number '@'
'example com' '>';

 my $invite_mailout = DADA::Mail::MailOut->new({ -List => $list });
 ok(defined $invite_mailout,                        'new()  

returned something, good for $invite_mailout!' );

 my $imo;
 eval {
     $imo = $invite_mailout->create({-fields => $test_msg_fields,  

-mh_obj => $mh, -list_type => 'invitelist' }); };

 ok(!$@, "Passing  a correct DADA::Mail::Send object does not  

create an error!"); ok($imo == 1, " create() returns 1!"); my $invite_mailout_status = $invite_mailout->status; ok($invite_mailout->status->{type} eq 'invitelist', "type of
mailing is correct set to, 'invitelist'");

 # Now, let's try to reload it





 # unlock this puppy



 $invite_mailout->unlock_batch_lock;

 # let's kill our mailout


 undef $invite_mailout;

 ok(DADA::Mail::MailOut::mailout_exists($list,  

$invite_mailout_status->{id}, 'invitelist') == 1, "Yeah, our mailout
better exist ");

 my $invite_mailout_r = DADA::Mail::MailOut->new({ -List =>  

$list }); ok($invite_mailout_r->isa('DADA::Mail::MailOut'), "new mailout
is the right type of object ");

 $invite_mailout_r->associate_with_id($invite_mailout_status->{id});
 my $invite_mailout_r_reloaded_msg = $invite_mailout_r->reload 

('invitelist');

 ok(defined($invite_mailout_r_reloaded_msg), "whoa hey, I have a  

message");

 ok($invite_mailout_r->clean_up(), "cleanup returned a true  

value!");

[/snip]

Again, I don't want to make you think you can follow exactly what's
going on - but do notice one thing: there's a subroutine called, "ok"
- those are the tests themselves - every "ok" is one test When this
bug was submitted, I made up these tests, and they failed, basically
- I then made tweaks to the program itself, until the tests passed
From this one bug, I made eight separate tests - that's a lot of
testing going on If they all pass, it's pretty good piece of mind
that the bug has been fixed If none of the other tests fail (as in,
we broke a test while trying to fix this bug), we know the changes we
made didn't affect anything else in the program

Pretty cool, if not in a very geeky way

To illustrate all this, I put the small tester extension on the Dada
Mail demo site:

http://dadademo
orty
com/cgi-bin/dada/extensions/dada_tester
cgi

The h2 headings are different test files - the numbers are different
tests in that file

When it says, "OK" the test passed If it says, "Not OK" the test
failed You'll see that some of the tests are failing - the version
up on the demo site is sort of old and the test suite is from the
most recent version of Dada Mail - I've added some more tests, based
on bug reports I've been given Sort of illustrates how I can now
tell when a bug is fixed

I'll release a copy of 2 10 12 that has this little testing extension
and the test suite in just a little bit, so you guys/gals can play
with this as well,

Questions? (grin)

Cheers,

  • This mailing list is a public mailing list - anyone may join or leave, at any time.
  • This mailing list is a group discussion list (unmoderated)
  • Start a new thread, email: dadadev@dadamailproject.com

This is the developer discussion mailing list for Dada Mail.

If you are just looking for support Dada Mail, consult the message boards at:

https://forum.dadamailproject.com

Documentation for Dada Mail:

https://dadamailproject.com/d

Specifically, see the Error FAQ:

https://dadamailproject.com/d/FAQ-errors.pod.html

To post to this list, send a message to:

mailto:dadadev@dadamailproject.com

All subscribers of this list may post to the list itself.

Topics that are welcome:

  • Constructive critiques on the program (I like, "x", but, "y" needs some work - here's an idea on how to make this better...)
  • Bug/Error reports
  • Bug fixes
  • Request For Comments on any changes to the program
  • Help customizing Dada Mail for your own needs
  • Patches
  • Language Translations
  • Support Documentation/Doc editing, FAQ's, etc.
  • Discussion of any changes that you would like to be committed to the next version of Dada Mail -

Dada Mail is on Github:

https://github.com/justingit/dada-mail/

If you would like to fork, branch, send over PRs, open up issues, etc.

Privacy Policy:

This Privacy Policy is for this mailing list, and this mailing list only.

Email addresses collection through this mailing list are used explicitly to work within this email discussion list.

We only collect email addresses through our Closed-Loop Opt-In system.

We don't use your email address for any other purpose.

We won't be sharing your email address with any other entity.

Unsubscription can be done at any time. Please contact us at: justin@dadamailproject.com for any help regarding your subscription, including removal from the mailing list.

All mailing list messages sent from us will include a subscription removal link, which will allow you to remove yourself from this mailing list automatically, and permanently.

All consent to use your email address for any other purpose stated at the time of the mailing list subscription will also be revoked upon mailing list removal.