<?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"
	>
<channel>
	<title>Comments on: testing rails application</title>
	<atom:link href="http://www.fromdelhi.com/2006/04/26/testing-rails-application/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fromdelhi.com/2006/04/26/testing-rails-application/</link>
	<description>Every.Dog has_a :blog</description>
	<pubDate>Sun, 05 Feb 2012 04:42:54 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: manik</title>
		<link>http://www.fromdelhi.com/2006/04/26/testing-rails-application/#comment-143</link>
		<dc:creator>manik</dc:creator>
		<pubDate>Sat, 06 May 2006 09:43:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.fromdelhi.com/2006/04/26/testing-rails-application/#comment-143</guid>
		<description>&lt;p&gt;Jon,&lt;br /&gt;
That was not the original motivation ... but a constraint... we have webrick running on that linux box and can access the app from our browser.&lt;br /&gt;
What I was looking for was  a way to validate values on the browser screen against those in the db. To get values directly from the db, I needed to have some scripts running outside the web server, accessing the db directly. These  scripts needed to be embedded in the testing tool driving the browser.&lt;/p&gt;
&lt;p&gt;But now i realize, that in  wanting to do that I  was violating the DRY principle.  When i already test those values in the controller's functional test, I  rather not do them again in selenium.&lt;/p&gt;
&lt;p&gt;As confused as I may sound, I am beginning to see a separate role for these testing tools such as selenium, separate from Rails inbuilt testing framework that is. It is not actually an either-or situation.&lt;/p&gt;
&lt;p&gt;About following TDD, we also write tests after the code. What we have found is that writing a model followed by it's  unit tests and writing a controller followed by  it's functional tests is the best way it works for us. Though some hardcore TDD guys advocate writing test cases before the actual code, we have never even given that a try till date.&lt;/p&gt;
&lt;p&gt; Venkat, the author of &lt;a href="http://pragmaticprogrammer.com/titles/pad/index.html" target="_blank"&gt; Practices of an Agile Developer &lt;/a&gt; , has described this process in a  very nice way in this blog post &lt;a href="http://www.agiledeveloper.com/blog/PermaLink,guid,cb96e2d3-06bb-4a25-b4af-6546a9bae2b0.aspx" target="_blank" rel="nofollow"&gt;"Walking along the development beach" &lt;/a&gt;.
&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Jon,<br />
That was not the original motivation &#8230; but a constraint&#8230; we have webrick running on that linux box and can access the app from our browser.<br />
What I was looking for was  a way to validate values on the browser screen against those in the db. To get values directly from the db, I needed to have some scripts running outside the web server, accessing the db directly. These  scripts needed to be embedded in the testing tool driving the browser.</p>
<p>But now i realize, that in  wanting to do that I  was violating the DRY principle.  When i already test those values in the controller&#8217;s functional test, I  rather not do them again in selenium.</p>
<p>As confused as I may sound, I am beginning to see a separate role for these testing tools such as selenium, separate from Rails inbuilt testing framework that is. It is not actually an either-or situation.</p>
<p>About following TDD, we also write tests after the code. What we have found is that writing a model followed by it&#8217;s  unit tests and writing a controller followed by  it&#8217;s functional tests is the best way it works for us. Though some hardcore TDD guys advocate writing test cases before the actual code, we have never even given that a try till date.</p>
<p> Venkat, the author of <a href="http://pragmaticprogrammer.com/titles/pad/index.html" target="_blank"> Practices of an Agile Developer </a> , has described this process in a  very nice way in this blog post <a href="http://www.agiledeveloper.com/blog/PermaLink,guid,cb96e2d3-06bb-4a25-b4af-6546a9bae2b0.aspx" target="_blank" rel="nofollow">&#8220;Walking along the development beach&#8221; </a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Boutelle</title>
		<link>http://www.fromdelhi.com/2006/04/26/testing-rails-application/#comment-136</link>
		<dc:creator>Jonathan Boutelle</dc:creator>
		<pubDate>Mon, 01 May 2006 17:08:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.fromdelhi.com/2006/04/26/testing-rails-application/#comment-136</guid>
		<description>Cool stuff!

The original motivation (on an ssh box, can't view local browser) was one thing I didn't get. If that was your problem, why didn't you just upon up port 80 and test from your browser?

Of course, just functionally testing with your browser isn't enough. You need automated testing at every level, and that's where tools like watir and selenium come in.

Are you having success at doing actual test-driven development? I find it's a tradition honored more in the breach than in the observance ... my tests always get written AFTER my code, no matter how much I intend to write them first!</description>
		<content:encoded><![CDATA[<p>Cool stuff!</p>
<p>The original motivation (on an ssh box, can&#8217;t view local browser) was one thing I didn&#8217;t get. If that was your problem, why didn&#8217;t you just upon up port 80 and test from your browser?</p>
<p>Of course, just functionally testing with your browser isn&#8217;t enough. You need automated testing at every level, and that&#8217;s where tools like watir and selenium come in.</p>
<p>Are you having success at doing actual test-driven development? I find it&#8217;s a tradition honored more in the breach than in the observance &#8230; my tests always get written AFTER my code, no matter how much I intend to write them first!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: manik</title>
		<link>http://www.fromdelhi.com/2006/04/26/testing-rails-application/#comment-122</link>
		<dc:creator>manik</dc:creator>
		<pubDate>Fri, 28 Apr 2006 07:17:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.fromdelhi.com/2006/04/26/testing-rails-application/#comment-122</guid>
		<description>Thanks Jonas,  I already had "selenium on rails" delicioused.
Will definitely look into it.</description>
		<content:encoded><![CDATA[<p>Thanks Jonas,  I already had &#8220;selenium on rails&#8221; delicioused.<br />
Will definitely look into it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonas</title>
		<link>http://www.fromdelhi.com/2006/04/26/testing-rails-application/#comment-121</link>
		<dc:creator>Jonas</dc:creator>
		<pubDate>Fri, 28 Apr 2006 06:57:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.fromdelhi.com/2006/04/26/testing-rails-application/#comment-121</guid>
		<description>If you don't want to write your Selenium tests in HTML you can check my plugin out, Selenium on Rails, which lets you write them in a couple of formats.

http://andthennothing.net/archives/2006/02/19/new-version-of-selenium-on-rails</description>
		<content:encoded><![CDATA[<p>If you don&#8217;t want to write your Selenium tests in HTML you can check my plugin out, Selenium on Rails, which lets you write them in a couple of formats.</p>
<p><a href="http://andthennothing.net/archives/2006/02/19/new-version-of-selenium-on-rails" rel="nofollow">http://andthennothing.net/archives/2006/02/19/new-version-of-selenium-on-rails</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

