eh?dotout comments on Rails Integration Testing Idea http://www.ehdotout.com/ en-us 40 eh?dotout comments "Rails Integration Testing Idea": comment by U <p>Beek</p> Sun, 5 Feb 2006 01:13:36 EST http://www.ehdotout.com/articles/2006/03/21/rails-integration-testing-idea#comment-29 http://www.ehdotout.com/articles/2006/03/21/rails-integration-testing-idea#comment-29 "Rails Integration Testing Idea" by Jason <p>If you haven&#8217;t heard about it yet, read up the new (unfortunately named) <a href="http://jamis.jamisbuck.org/articles/2006/03/09/integration-testing-in-rails-1-1">integration testing framework</a> being developed for Rails 1.1.</p> <p>An example jamis mentions is a situation where bugs are caused by cruft building up in the session when visiting a number of pages. The integration testing framework definitely allows you to build the test once you can reproduce the bug, but reproducing is still a problem. Something I&#8217;ve faced in (non-Rails) webapps is that developers aren&#8217;t able to reproduce a bug while users can do it every time. It happens because users may use your application in different ways than developers do. (It happens, unfortunately.)</p> The idea is simple: let users record integration tests. My immediate vision for this feature goes like this: <ul> <li>Developer starts WEBrick (or lighty) with recording enabled</li> <li>User goes in and reproduces their bug&#8230; All their steps are recorded.</li> <li>Once the user is done, the developers now have a failing Rails integration test that reproduces the bug.</li> </ul> <p>Of course, I have bigger visions for this too. Like a complete user acceptance testing framework. But that all depends on the recording/generation of acceptance tests to work. The main issue I see with the generation of integration tests is whether or not the generated test will be maintainable. I don&#8217;t mind if the developer will have to clean up some of the test before checking it in &#8211; I think that&#8217;s a must for any passive code generator. I&#8217;m more concerned about tests requiring more maintenance as the application changes. But I think it&#8217;s best just to try and see how it works out.</p> <p>Now I just have to turn this idea into a plugin/patch. I&#8217;m not always successful in this respect, but I must try my best. After I&#8217;ve cleaned up all my stuff from the Japan trip.</p> Tue, 21 Mar 2006 00:19:00 EST <a href="/articles/2006/03/21/rails-integration-testing-idea">Rails Integration Testing Idea</a> <a href="/articles/2006/03/21/rails-integration-testing-idea">Rails Integration Testing Idea</a>