<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How to test e-mail notifications properly</title>
	<atom:link href="http://gojko.net/2008/10/30/how-to-test-e-mail-notifications-properly/feed/" rel="self" type="application/rss+xml" />
	<link>http://gojko.net/2008/10/30/how-to-test-e-mail-notifications-properly/</link>
	<description>Building software that matters</description>
	<lastBuildDate>Fri, 12 Mar 2010 16:28:45 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Alan</title>
		<link>http://gojko.net/2008/10/30/how-to-test-e-mail-notifications-properly/comment-page-1/#comment-52137</link>
		<dc:creator>Alan</dc:creator>
		<pubDate>Thu, 18 Jun 2009 14:15:51 +0000</pubDate>
		<guid isPermaLink="false">http://gojko.net/?p=437#comment-52137</guid>
		<description>I have my own mail architecture which i&#039;ve developed over several years so I essentially follow the same kind of pattern. Dump the message into a queue and get back to servicing web clients as quickly as possible. Let the mail queue do it&#039;s job and pick up the messages as and when.

Interesting point regarding if the message ultimately fails to send - supposing there was a typo in the user&#039;s e-mail address. How would the account ever be registered/validated/whatever? I guess we just have to hope that the duplicate e-mail address fields are enough to focus the user&#039;s attention on typing it in correctly!

You could asynchronously the message from the web app in a thread pool thread or similar, but there is a finite limit to the number of threads etc. that can be processed at any one time. At some point the message has to be serialised and processed at a later time.</description>
		<content:encoded><![CDATA[<p>I have my own mail architecture which i&#8217;ve developed over several years so I essentially follow the same kind of pattern. Dump the message into a queue and get back to servicing web clients as quickly as possible. Let the mail queue do it&#8217;s job and pick up the messages as and when.</p>
<p>Interesting point regarding if the message ultimately fails to send &#8211; supposing there was a typo in the user&#8217;s e-mail address. How would the account ever be registered/validated/whatever? I guess we just have to hope that the duplicate e-mail address fields are enough to focus the user&#8217;s attention on typing it in correctly!</p>
<p>You could asynchronously the message from the web app in a thread pool thread or similar, but there is a finite limit to the number of threads etc. that can be processed at any one time. At some point the message has to be serialised and processed at a later time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrea</title>
		<link>http://gojko.net/2008/10/30/how-to-test-e-mail-notifications-properly/comment-page-1/#comment-39404</link>
		<dc:creator>Andrea</dc:creator>
		<pubDate>Thu, 22 Jan 2009 11:18:45 +0000</pubDate>
		<guid isPermaLink="false">http://gojko.net/?p=437#comment-39404</guid>
		<description>I think i m gonna use this post as a reference too for email testing, and how to go about it, Thanks very clear :)

Andrea</description>
		<content:encoded><![CDATA[<p>I think i m gonna use this post as a reference too for email testing, and how to go about it, Thanks very clear <img src='http://gojko.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Andrea</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gojko</title>
		<link>http://gojko.net/2008/10/30/how-to-test-e-mail-notifications-properly/comment-page-1/#comment-36434</link>
		<dc:creator>gojko</dc:creator>
		<pubDate>Thu, 06 Nov 2008 16:57:45 +0000</pubDate>
		<guid isPermaLink="false">http://gojko.net/?p=437#comment-36434</guid>
		<description>Hi Stuart,

FitNesse is not good for infrastructural code testing. it is great for acceptance testing. infrastructure is better tested using some code-oriented tool such as JUnit (these tests don&#039;t necessarily have to be included in the basic JUnit test suite, you can separate them in a suite executed overnight). Testing the business part of the process (as suggested by the article) can be done with fitnesse without any waiting or anything. use an in-memory queue and read it directly to verify the contents.

the book is almost done. my copy-editor is looking at it now, and it should be out in late december or early january.</description>
		<content:encoded><![CDATA[<p>Hi Stuart,</p>
<p>FitNesse is not good for infrastructural code testing. it is great for acceptance testing. infrastructure is better tested using some code-oriented tool such as JUnit (these tests don&#8217;t necessarily have to be included in the basic JUnit test suite, you can separate them in a suite executed overnight). Testing the business part of the process (as suggested by the article) can be done with fitnesse without any waiting or anything. use an in-memory queue and read it directly to verify the contents.</p>
<p>the book is almost done. my copy-editor is looking at it now, and it should be out in late december or early january.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stu Taylor</title>
		<link>http://gojko.net/2008/10/30/how-to-test-e-mail-notifications-properly/comment-page-1/#comment-36432</link>
		<dc:creator>stu Taylor</dc:creator>
		<pubDate>Thu, 06 Nov 2008 16:49:46 +0000</pubDate>
		<guid isPermaLink="false">http://gojko.net/?p=437#comment-36432</guid>
		<description>Hi Gojko,

have you tried testing email using FiitNesse? Its a total PITA.

I&#039;m not saying its hard to implement, it just that you have to write a test that will sit around waiting for a queue to be processed, and email sent, then received, and then you can begin to make assertions on the email content.

The test has to be robust enough to not hang around forever (contain a timeout), and yet handle a slow queue or even an email that never arrives (the spam filter ate it, honest).

Cheers,

Stuart.

P.S how is the book coming? i&#039;m looking forward to seeing what you have got in the QA section ;-)</description>
		<content:encoded><![CDATA[<p>Hi Gojko,</p>
<p>have you tried testing email using FiitNesse? Its a total PITA.</p>
<p>I&#8217;m not saying its hard to implement, it just that you have to write a test that will sit around waiting for a queue to be processed, and email sent, then received, and then you can begin to make assertions on the email content.</p>
<p>The test has to be robust enough to not hang around forever (contain a timeout), and yet handle a slow queue or even an email that never arrives (the spam filter ate it, honest).</p>
<p>Cheers,</p>
<p>Stuart.</p>
<p>P.S how is the book coming? i&#8217;m looking forward to seeing what you have got in the QA section <img src='http://gojko.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob</title>
		<link>http://gojko.net/2008/10/30/how-to-test-e-mail-notifications-properly/comment-page-1/#comment-36246</link>
		<dc:creator>Bob</dc:creator>
		<pubDate>Fri, 31 Oct 2008 02:01:17 +0000</pubDate>
		<guid isPermaLink="false">http://gojko.net/?p=437#comment-36246</guid>
		<description>Ben - your database system *is* a queue, and all queueing systems introduce some latency. But if your batch process runs every 10 minutes and also listens for a &quot;run asap&quot; message, then you can reduce your latency. The best case is everything works and the email goes very quickly, the worst case is that the database transaction commits but the notification is lost (which is the bug being avoided by having the transactional queue) and the user has to wait an average of 5 minutes before the email will actually be sent.

I wouldn&#039;t install an entire message queue application for this purpose alone, and either do the quick and simple thing that you&#039;ve done. But if the message queue system is used in other parts of the system, then I&#039;ld use it directly. Also, the &quot;send mail&quot; interface should hide the database implementation, so if it changes the rest of the application shouldn&#039;t need to be changed.


Eddie - &quot;the email system&quot; might work by magic pixies for all we know, but if the data doesn&#039;t get from the application to &quot;the email system&quot; then the email will not be sent, and you&#039;ll be a doofus with a broken site. And that has to be tested.</description>
		<content:encoded><![CDATA[<p>Ben &#8211; your database system *is* a queue, and all queueing systems introduce some latency. But if your batch process runs every 10 minutes and also listens for a &#8220;run asap&#8221; message, then you can reduce your latency. The best case is everything works and the email goes very quickly, the worst case is that the database transaction commits but the notification is lost (which is the bug being avoided by having the transactional queue) and the user has to wait an average of 5 minutes before the email will actually be sent.</p>
<p>I wouldn&#8217;t install an entire message queue application for this purpose alone, and either do the quick and simple thing that you&#8217;ve done. But if the message queue system is used in other parts of the system, then I&#8217;ld use it directly. Also, the &#8220;send mail&#8221; interface should hide the database implementation, so if it changes the rest of the application shouldn&#8217;t need to be changed.</p>
<p>Eddie &#8211; &#8220;the email system&#8221; might work by magic pixies for all we know, but if the data doesn&#8217;t get from the application to &#8220;the email system&#8221; then the email will not be sent, and you&#8217;ll be a doofus with a broken site. And that has to be tested.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
