{"id":1608,"date":"2011-04-14T21:06:28","date_gmt":"2011-04-15T01:06:28","guid":{"rendered":"http:\/\/crazedmonkey.com\/blog\/links\/eradicating-non-determinism-in-tests.html"},"modified":"2011-11-16T22:23:04","modified_gmt":"2011-11-17T03:23:04","slug":"eradicating-non-determinism-in-tests","status":"publish","type":"post","link":"http:\/\/crazedmonkey.com\/blog\/links\/eradicating-non-determinism-in-tests.html","title":{"rendered":"Eradicating Non-Determinism in Tests"},"content":{"rendered":"<p>I hate non-deterministic tests, which is why I strive for a completely fresh testing environment for each and every test. In-memory databases make this much easier (and faster). Python makes it easy to construct file-like objects for tests instead of relying on files on a filesystem. When testing an application which must hit the filesystem, I leverage fresh temporary directories and clean them up after every test.<\/p>\n<p>Unfortunately, a fresh testing environment on every test is not always possible. Martin Fowler outlines more ways in which non-determinism in tests can be eliminated for more reliable test results.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I hate non-deterministic tests, which is why I strive for a completely fresh testing environment for each and every test. In-memory databases make this much easier (and faster). Python makes it easy to construct file-like objects for tests instead of relying on files on a filesystem. When testing an application which must hit the filesystem,&nbsp;&hellip;&nbsp;<a class=\"read_more\" href=\"http:\/\/crazedmonkey.com\/blog\/links\/eradicating-non-determinism-in-tests.html\" rel=\"bookmark\" title=\"Continue reading &ldquo;Eradicating Non-Determinism in Tests&rdquo;\"><span>Read more<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false},"categories":[36,33],"tags":[],"_links":{"self":[{"href":"http:\/\/crazedmonkey.com\/blog\/wp-json\/wp\/v2\/posts\/1608"}],"collection":[{"href":"http:\/\/crazedmonkey.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/crazedmonkey.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/crazedmonkey.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/crazedmonkey.com\/blog\/wp-json\/wp\/v2\/comments?post=1608"}],"version-history":[{"count":1,"href":"http:\/\/crazedmonkey.com\/blog\/wp-json\/wp\/v2\/posts\/1608\/revisions"}],"predecessor-version":[{"id":1857,"href":"http:\/\/crazedmonkey.com\/blog\/wp-json\/wp\/v2\/posts\/1608\/revisions\/1857"}],"wp:attachment":[{"href":"http:\/\/crazedmonkey.com\/blog\/wp-json\/wp\/v2\/media?parent=1608"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/crazedmonkey.com\/blog\/wp-json\/wp\/v2\/categories?post=1608"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/crazedmonkey.com\/blog\/wp-json\/wp\/v2\/tags?post=1608"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}