{"id":32,"date":"2008-08-11T15:51:47","date_gmt":"2008-08-11T15:51:47","guid":{"rendered":"http:\/\/ccgi.standard8.plus.com\/blog\/archives\/32"},"modified":"2017-08-15T22:19:23","modified_gmt":"2017-08-15T21:19:23","slug":"the-usefulness-of-fake-servers","status":"publish","type":"post","link":"https:\/\/thebanners.uk\/standard8\/2008\/08\/11\/the-usefulness-of-fake-servers\/","title":{"rendered":"The usefulness of fake servers"},"content":{"rendered":"<p>A while ago, <a href=\"http:\/\/quetzalcoatal.blogspot.com\/\" title=\"Joshua's blog\">Joshua<\/a> created a <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=413077\">&#8220;fake&#8221; news server<\/a> for xpcshell tests in mailnews, then a few days ago I was reminded about <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=327510\">Bug 327510<\/a> &#8211; XML Parsing Error: no element found\/netError.xhtml on newsgroup msg download timout.<\/p>\n<p>This was turning out to be a hard bug to reproduce to order, because it needed intermittent newsgroup connections. Having then remembered about the fake news server, and the fact it ran on xpcshell got me thinking.<\/p>\n<p>In a couple of hours, I had written a wrapper around the fake news server (based on some of the existing unit tests) and got it up and running in xpcshell as a standalone process. Then I pointed Thunderbird at it, downloaded the message list, and before selecting the message, killed the server process, selecting the message then reproduced the bug.<\/p>\n<p>This was good news, and having fixed a similar bug before, I&#8217;ve now fixed that bug (I&#8217;m currently investigating getting it in the SeaMonkey 1.1\/Thunderbird 2.0 security\/stability releases).<\/p>\n<p>The great advantage with the fake server here was that I was able to (with some copy and paste) set it up to do exactly what I wanted and quickly; to have done this with a full server, or tried to manage my internet connection to a main server, it would have taken me longer, and I doubt it would have been so easy to consistently reproduce.<\/p>\n<p>At some stage I want to have some scripts alongside the source code so that we can do this type of testing easily. However Joshua is working on something at the moment, and I&#8217;m waiting on seeing what that will give us as it is likely to be more useful than my scripts. If in the meantime you think you need something like this for a bug you&#8217;re working on, please drop me a line.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A while ago, Joshua created a &#8220;fake&#8221; news server for xpcshell tests in mailnews, then a few days ago I was reminded about Bug 327510 &#8211; XML Parsing Error: no element found\/netError.xhtml on newsgroup msg download timout. This was turning out to be a hard bug to reproduce to order, because it needed intermittent newsgroup &hellip; <a href=\"https:\/\/thebanners.uk\/standard8\/2008\/08\/11\/the-usefulness-of-fake-servers\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;The usefulness of fake servers&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,7,8],"tags":[],"class_list":["post-32","post","type-post","status-publish","format-standard","hentry","category-mozilla","category-seamonkey","category-thunderbird"],"_links":{"self":[{"href":"https:\/\/thebanners.uk\/standard8\/wp-json\/wp\/v2\/posts\/32","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thebanners.uk\/standard8\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thebanners.uk\/standard8\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thebanners.uk\/standard8\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thebanners.uk\/standard8\/wp-json\/wp\/v2\/comments?post=32"}],"version-history":[{"count":1,"href":"https:\/\/thebanners.uk\/standard8\/wp-json\/wp\/v2\/posts\/32\/revisions"}],"predecessor-version":[{"id":679,"href":"https:\/\/thebanners.uk\/standard8\/wp-json\/wp\/v2\/posts\/32\/revisions\/679"}],"wp:attachment":[{"href":"https:\/\/thebanners.uk\/standard8\/wp-json\/wp\/v2\/media?parent=32"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thebanners.uk\/standard8\/wp-json\/wp\/v2\/categories?post=32"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thebanners.uk\/standard8\/wp-json\/wp\/v2\/tags?post=32"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}