<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-6962294913398429126.post5739968168374918621..comments</id><updated>2008-01-10T06:18:48.364-08:00</updated><title type='text'>Comments on wickedcoolthoughts: Test your Unit Tests?</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://wickedcoolthoughts.blogspot.com/feeds/5739968168374918621/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6962294913398429126/5739968168374918621/comments/default'/><link rel='alternate' type='text/html' href='http://wickedcoolthoughts.blogspot.com/2008/01/test-your-unit-tests.html'/><author><name>Aslam's Blog</name><uri>http://www.blogger.com/profile/07436503144903480817</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6962294913398429126.post-8317846838384567640</id><published>2008-01-10T06:18:00.000-08:00</published><updated>2008-01-10T06:18:00.000-08:00</updated><title type='text'>I am not against integration tests. I am talking m...</title><content type='html'>I am not against integration tests. I am talking more about the tests which are meant to be unit tests and still talks to outside systems(please see in the post how we ended up having such tests working on a legacy project).&lt;BR/&gt;&lt;BR/&gt;About repeating the tests, what I meant is in a single build run the same test (say FunnyTest) multiple times, so as to make sure that the each test run is independent of other.&lt;BR/&gt;&lt;BR/&gt;Please see my trivial example. If I do not have a proper SetUp/TearDown the test will fail on the second run. Hope that clarifies.&lt;BR/&gt;&lt;BR/&gt;MyFunnyTest {&lt;BR/&gt;&lt;BR/&gt; testForFun(){&lt;BR/&gt;&lt;BR/&gt;        appendSomethingToFile("something");&lt;BR/&gt;   assert("something",  readFromFile())  &lt;BR/&gt; &lt;BR/&gt;}&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;}</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6962294913398429126/5739968168374918621/comments/default/8317846838384567640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6962294913398429126/5739968168374918621/comments/default/8317846838384567640'/><link rel='alternate' type='text/html' href='http://wickedcoolthoughts.blogspot.com/2008/01/test-your-unit-tests.html?showComment=1199974680000#c8317846838384567640' title=''/><author><name>Aslam's Blog</name><uri>http://www.blogger.com/profile/07436503144903480817</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='12679517629867847028'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://wickedcoolthoughts.blogspot.com/2008/01/test-your-unit-tests.html' ref='tag:blogger.com,1999:blog-6962294913398429126.post-5739968168374918621' source='http://www.blogger.com/feeds/6962294913398429126/posts/default/5739968168374918621' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-6962294913398429126.post-6352740913981962068</id><published>2008-01-09T08:28:00.000-08:00</published><updated>2008-01-09T08:28:00.000-08:00</updated><title type='text'>One thing I want to clear up:Unit tests shouldn't ...</title><content type='html'>One thing I want to clear up:&lt;BR/&gt;Unit tests shouldn't depend on outside systems.  However you should still have tests that integrate with outside systems, right?  I am not clear if you are advising people not to do that.&lt;BR/&gt; &lt;BR/&gt;There is nothing wrong with a codebase that has tests dependant on outside systems.  Just don't call those tests unit tests.  ActiveRecord is a good example of a codebase that has tests dependant on outside systems for a good reason (to verify it works against different databases).&lt;BR/&gt;&lt;BR/&gt;The other thing I wanted to mention:&lt;BR/&gt;Automating the build script to repeat the tests is actually a well known practice called continuous integration.  Check out Martin Fowler's article here: http://martinfowler.com/articles/continuousIntegration.html  If you already knew that then I am missing out on what you mean and I beg further explanation of your idea.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6962294913398429126/5739968168374918621/comments/default/6352740913981962068'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6962294913398429126/5739968168374918621/comments/default/6352740913981962068'/><link rel='alternate' type='text/html' href='http://wickedcoolthoughts.blogspot.com/2008/01/test-your-unit-tests.html?showComment=1199896080000#c6352740913981962068' title=''/><author><name>josh</name><uri>http://www.blogger.com/profile/01165462366964097266</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://wickedcoolthoughts.blogspot.com/2008/01/test-your-unit-tests.html' ref='tag:blogger.com,1999:blog-6962294913398429126.post-5739968168374918621' source='http://www.blogger.com/feeds/6962294913398429126/posts/default/5739968168374918621' type='text/html'/></entry></feed>