{"id":6,"date":"2006-12-29T13:42:00","date_gmt":"2006-12-29T19:42:00","guid":{"rendered":"https:\/\/www.chrisedwards.dreamhosters.com\/blog\/?p=6"},"modified":"2011-08-21T15:16:50","modified_gmt":"2011-08-21T21:16:50","slug":"tests-as-an-auto-notification-process","status":"publish","type":"post","link":"http:\/\/architester.com\/blog\/2006\/12\/29\/tests-as-an-auto-notification-process\/","title":{"rendered":"Tests as an Auto-Notification Process"},"content":{"rendered":"<p><span style=\"font-style: italic;\">Looking at tests in a different light.<\/span><\/p>\n<p>In looking at how tests help eliminate bugs, I realized that one way it does so is by automatically notifying you when something doesn&#8217;t work in the way the test specifies it &#8220;should&#8221;.  This got me thinking about tests from a different perspective&#8230;as an auto-notification process.<\/p>\n<p>In looking at tests this way, I find myself asking a  very different question: &#8220;What do I want to be notified of?&#8221;<\/p>\n<p>The &#8220;normal&#8221; way of thinking about tests will lead us to answers like: &#8220;When feature X doesn&#8217;t work&#8221; or &#8220;When scenario Y doesn&#8217;t produce output Z.&#8221; But these are narrowly focused questions. Is that all we could possibly want to know about our code or the system under test?<\/p>\n<p>What other conditions would a notification (failed test) be useful for?<\/p>\n<p>Maybe we have an expected failure when the volume of data exceeds a certain number of rows. We know we need to make certain changes to the system when this happens. A test could &#8220;remind&#8221; us of that automatically when that happens.<\/p>\n<p>We could have performance monitored by writing a test that will notify us if it takes more than X number of seconds to perfom operation Z. Thus we know we need to peform some optimzation.<\/p>\n<p>Looking at tests in this light opens up the possibility thinking &#8220;outside the box&#8221; concerning testing.<\/p>\n<p>Some of the uses that stem from answers to the question &#8220;What do I want to be notified of?&#8221; may be better suited for other tools than your standard xUnit suite, while others may not. Its just something for your brain to chew on.<\/p>\n<p>I&#8217;m interested to see what others think of this, and the different ways it could be used.<\/p>\n<p>-=CE=-<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Looking at tests in a different light.<br \/>\nIn looking at how tests help eliminate bugs, I realized that one way it does so is by automatically notifying you when something doesn&#8217;t work in the way the test specifies it &#8220;should&#8221;. This got me thinking about tests from a different perspective&#8230;as an auto-notification process.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,8],"tags":[36,71],"class_list":["post-6","post","type-post","status-publish","format-standard","hentry","category-test-driven-development","category-testing","tag-tdd","tag-testing"],"aioseo_notices":[],"_links":{"self":[{"href":"http:\/\/architester.com\/blog\/wp-json\/wp\/v2\/posts\/6","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/architester.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/architester.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/architester.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/architester.com\/blog\/wp-json\/wp\/v2\/comments?post=6"}],"version-history":[{"count":4,"href":"http:\/\/architester.com\/blog\/wp-json\/wp\/v2\/posts\/6\/revisions"}],"predecessor-version":[{"id":375,"href":"http:\/\/architester.com\/blog\/wp-json\/wp\/v2\/posts\/6\/revisions\/375"}],"wp:attachment":[{"href":"http:\/\/architester.com\/blog\/wp-json\/wp\/v2\/media?parent=6"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/architester.com\/blog\/wp-json\/wp\/v2\/categories?post=6"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/architester.com\/blog\/wp-json\/wp\/v2\/tags?post=6"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}