Schrade.Blog : Rails App Without Tests = Guaranteed Fail http://kurt.karmalab.org/articles/2008/02/07/rails-app-without-tests-guaranteed-fail.rss en-us 40 Tech and Business Ramblings by Kurt Schrader Comment on Rails App Without Tests = Guaranteed Fail by Eliana <p>Great advise. I should now start requiring tests for my rail apps. I do get the bugs once in a while before but never really asked for solutions.</p> Thu, 07 Feb 2008 03:17:42 -0800 urn:uuid:4eb35129-bdff-452a-9255-c1102f2eb68c http://kurt.karmalab.org/articles/2008/02/07/rails-app-without-tests-guaranteed-fail#comment-6226 Comment on Rails App Without Tests = Guaranteed Fail by Georgina <p>I’m agreeing that on every application without doing test, its guaranteed fail. Even on an invention, the inventor make test first before launching to the people his kind of invention. Just to make sure if it’s working and useable by its users. </p> Thu, 07 Feb 2008 03:25:15 -0800 urn:uuid:ca5d96cd-03ee-46f3-8d5c-ef21d9b39509 http://kurt.karmalab.org/articles/2008/02/07/rails-app-without-tests-guaranteed-fail#comment-6227 Comment on Rails App Without Tests = Guaranteed Fail by kolskal@hotmail.de <p>Tests are for wimps. Deploy like a man. Real programmers don't need tests.</p> <p>I have been programming in rails for years, and have never written a test. Nor do I need to, there are no bugs.</p> Thu, 07 Feb 2008 04:04:03 -0800 urn:uuid:1bc486c1-93b8-4b17-9ccf-6adb5245794b http://kurt.karmalab.org/articles/2008/02/07/rails-app-without-tests-guaranteed-fail#comment-6228 Comment on Rails App Without Tests = Guaranteed Fail by Ben <p>Having a comprehensive test suite is important, but don't you think that focusing on the test-code ratio (or numbers from rcov, to take the logical next step) is a mistake? I wrote up my take <a href="http://www.culann.com/2008/02/testing-metrics-and-confidence" rel="nofollow">here</a>.</p> Thu, 07 Feb 2008 04:53:35 -0800 urn:uuid:069d691f-30ca-462d-afd8-c7ebbf8d830a http://kurt.karmalab.org/articles/2008/02/07/rails-app-without-tests-guaranteed-fail#comment-6229 Comment on Rails App Without Tests = Guaranteed Fail by Zach Inglis <p>While I agree test suites are important, it depends what iteration of the application you are on. If you are doing prototypes, then tests are not needed. if you are talking the final draft, I agree tests are needed. But too many times do I see people testing for if Rails works correctly rather than their app. Also, When you have a very simple CRUD app, I don't think testing is the be all and end all. When dealing with Math or such I do agree though.</p> <p>Too many times I have seen people fall behind on an application because they are writing tests. Anyway, you should be competent enough that you KNOW your code and that nothing goes wrong, so tests should be a secondary failproof. </p> <p>And calling these people idiots? That's a bit harsh. Misguided or having their own opinion maybe?</p> Thu, 07 Feb 2008 07:32:19 -0800 urn:uuid:dd25c743-ca37-43fe-a291-214e702de2d9 http://kurt.karmalab.org/articles/2008/02/07/rails-app-without-tests-guaranteed-fail#comment-6231 Comment on Rails App Without Tests = Guaranteed Fail by gregf <p>Rails App Without Tests = Guaranteed Fail &lt;&lt;&lt; Yes because man never wrote any working software before tests came about.</p> Thu, 07 Feb 2008 14:50:57 -0800 urn:uuid:b1f5383d-7ad2-4698-a2c2-810790b7a8ce http://kurt.karmalab.org/articles/2008/02/07/rails-app-without-tests-guaranteed-fail#comment-6232 Comment on Rails App Without Tests = Guaranteed Fail by Mr eel <p>"If someone who works for you "simply doesn't have the time" to write tests, fire them."</p> <p>Never mind if: a) They're competent programmers who do good work b) Don't <em>actually</em> have time</p> <p>…blah, blah just fire them. Right. Perfect solution. It seems like decisive advice, but it's an extreme solution to something that can be resolved in other ways.</p> <p>"Rails App Without Tests = Guaranteed Fail"</p> <p>No sorry. That's a load of horse-pucky. It can increase the <em>potential</em> of failures going unchecked, but it's not a guarantee.</p> Thu, 07 Feb 2008 16:26:40 -0800 urn:uuid:f3ce04e7-f330-4d64-8d5a-5b7282cbd54e http://kurt.karmalab.org/articles/2008/02/07/rails-app-without-tests-guaranteed-fail#comment-6234 Comment on Rails App Without Tests = Guaranteed Fail by Kurt Schrader <p>Zach: I've seen many more times when people fall behind because of a lack of tests, once the application gets big enough. I guess that I should have clarified that I wasn't talking about toy apps. </p> <p>Mr eel: They do have time. It will save you time later. You're fired!</p> Thu, 07 Feb 2008 16:40:10 -0800 urn:uuid:1c674752-5a55-43d5-8401-f352be8f049c http://kurt.karmalab.org/articles/2008/02/07/rails-app-without-tests-guaranteed-fail#comment-6235 Comment on Rails App Without Tests = Guaranteed Fail by cag <p>Now if we just had enough money to hire a tester to test the tests.</p> Thu, 07 Feb 2008 18:18:09 -0800 urn:uuid:11959bb6-a71d-4548-86c8-8f5d2f007e32 http://kurt.karmalab.org/articles/2008/02/07/rails-app-without-tests-guaranteed-fail#comment-6236 Comment on Rails App Without Tests = Guaranteed Fail by tom <p>A bit harsh. Sometimes you write applications in a domain where bugs dont really matter all that much. In those cases, if you stick to the standard rails stuff and dont go to crazy on the meta programming magic, tests arent a huge deal.</p> <p>Hell, 90% of my reported bugs tend to be on the CSS/Javascript side anyways. Rails tests arent going to help much there.</p> Fri, 08 Feb 2008 03:13:14 -0800 urn:uuid:27419901-3661-4811-a6a3-efb8295c205b http://kurt.karmalab.org/articles/2008/02/07/rails-app-without-tests-guaranteed-fail#comment-6237 Comment on Rails App Without Tests = Guaranteed Fail by Ermar <p>Test is just doing for security measure. To avoid mistakes and less time effort if they failed. </p> Fri, 08 Feb 2008 03:47:11 -0800 urn:uuid:75ea46f5-0907-4994-a822-4eebb7930257 http://kurt.karmalab.org/articles/2008/02/07/rails-app-without-tests-guaranteed-fail#comment-6238 Comment on Rails App Without Tests = Guaranteed Fail by Mark Wilden <p>I hate testing code. I can't think of many things more boring than writing a test for code that already seems to work.</p> <p>That's why I write the tests first, before the code. Then, writing tests is part of creating code, instead of an unpleasant chore afterwards.</p> <p>Of course, everyone knows about TDD these days (I've been using it exclusively for seven years). But I haven't heard it mentioned that one of TDD's biggest benefits is not having to write tests for existing code (or at least not so much). TDD makes testing a part of programming, instead of a part of QA.</p> <p>///ark</p> <p>(@Zach: Thanks for the laugh)</p> Fri, 08 Feb 2008 09:29:05 -0800 urn:uuid:c6983c6f-6153-4f2b-99a9-26c0b7976209 http://kurt.karmalab.org/articles/2008/02/07/rails-app-without-tests-guaranteed-fail#comment-6239 Comment on Rails App Without Tests = Guaranteed Fail by ken <p>"I hate testing code. I can't think of many things more boring than writing a test for code that already seems to work."</p> <p>I love it. Especially when it's my coworkers' code. How can I be positively evil today? Muahaha.</p> Fri, 08 Feb 2008 17:23:09 -0800 urn:uuid:30d3fd80-5d3a-469d-9842-6e9b6e6d6731 http://kurt.karmalab.org/articles/2008/02/07/rails-app-without-tests-guaranteed-fail#comment-6241 Comment on Rails App Without Tests = Guaranteed Fail by john <p>Well you're a real stooge. Have you ever considered that you've been sold a load of shit with the whole "test infected" thing? That you're perpetuating money transfer from agile conference proceeds and book sales to the likes of Dave Thomas and Martin Fowler?</p> <p>Before you go running your can, run your own business and evaluate how much test coverage means to you then, when you have the luxury of choosing between building value and crying "the sky is falling because we don't have enough tests!"</p> <p>Oh, I forgot, you're busy "saving the world from developing diseases." ...Probably slurping up charitable donations or tax dollars making sure you have your 1:4.2 and wasting everyone's money.</p> <p>Get a clue.</p> Fri, 08 Feb 2008 22:16:35 -0800 urn:uuid:ba53ed80-6ec4-4104-a3ba-6263f6208102 http://kurt.karmalab.org/articles/2008/02/07/rails-app-without-tests-guaranteed-fail#comment-6242 Comment on Rails App Without Tests = Guaranteed Fail by test(kurt) <p>Testing ratio 1:4.2?</p> <p>Did you even bother testing the UI? if yes, what's the ratio? 1:4 as well?</p> <p>This sounds more and more like Microsoft with their SDET.</p> <p>I'll fire you for wasting my money.</p> <p>Son, you're just a beginner in this field.</p> Fri, 08 Feb 2008 23:36:53 -0800 urn:uuid:2e50db84-5bc7-4295-b86b-daae530e1233 http://kurt.karmalab.org/articles/2008/02/07/rails-app-without-tests-guaranteed-fail#comment-6243 Comment on Rails App Without Tests = Guaranteed Fail by remi <p>Wow, there are a few pretty harsh comments here ...</p> <p>I don't quite understand how folks can be <em>against</em> testing. I understand people who don't test because either they haven't gotten into it yet or because it's just not how they do things ... but to be <em>against</em> it?</p> <p>I don't know about other people out there, but test-driving my code has made me <strong>more productive</strong>. I seem to get things done faster for a number of reasons:</p> <ul> <li>if I don't know or forget some part of the app's API, I can always check specs for examples</li> <li>the API tends to stay clean, even as the app grows, as tests make refactoring so trivial (and not scary)</li> <li>I don't have to worry about introducing new bugs, because the tests explode and let me know</li> <li>When bugs do show up, the tests generally make the bugs faster to fix (and, if it's a bug the tests didn't catch, adding a test to catch the bug helps keep it from coming back)</li> <li>I never waste time 'dilly dallying' or adding functionality that's not needed, because all I do is write &amp; implement the specs</li> </ul> <p>TDD has made me a much <em>happier</em> and more productive programmer. I no longer worry about apps exploding and, interesting, I never waste time TESTING! Because my tests are constantly running, I hardly spend any time at all having to manually test. </p> <blockquote> <p>"Anyway, you should be competent enough that you KNOW your code and that nothing goes wrong, so tests should be a secondary failproof."</p> </blockquote> <p>@zach: Often my tests help me because I <em>don't</em> know my code very well. We all know what it's like to come back to your code after a month or more - even when it's coded well. I have to jump around between projects fairly often and I find that my tests really help me do that easily. Not only can I check my specs for a refresher course on API usage, but I can check my current list of pending/incomplete specs and start right where I left off :)</p> Sun, 10 Feb 2008 00:39:13 -0800 urn:uuid:97c6bf82-d7a0-4a78-98a8-4703cbd75614 http://kurt.karmalab.org/articles/2008/02/07/rails-app-without-tests-guaranteed-fail#comment-6252 Comment on Rails App Without Tests = Guaranteed Fail by notests4me <p>Tests are over-rated. Sure they have there usefulness but I look at it this way - if it were a tangible product coming off an assembly line - would you test the product or would you test what your tests think the product ought to be?</p> <p>So I prefer things like selenium where you get more rubber on the real road.</p> <p>Oh and I like my code as simple as possible - I'm not a brain surgeon :-O</p> Wed, 20 Feb 2008 15:27:44 -0800 urn:uuid:a22b8ec6-f4ae-4e8c-adf1-db0a9d483b27 http://kurt.karmalab.org/articles/2008/02/07/rails-app-without-tests-guaranteed-fail#comment-6270 Comment on Rails App Without Tests = Guaranteed Fail by E. James O'Kelly <p>There is a middle ground here people. 1:1.42 sounds quite overtested, or more probably you are testing things like rails functionality (associations, validations) that you are wasting your time testing. That or you are testing views.</p> <p>I am not a huge tester after seeing several projects fall behind due to TDD junkies forgetting that we have a job, and that is to ship an application, not write test suites.</p> <p>I have been building web apps for over 10 years now and never had testing until rails. When you are used to constantly viewing the pages and trying to get them to break while you are coding you catch everything anyway.</p> <p>I'm not saying testing is bad, over-testing or not testing is bad.</p> Thu, 28 Feb 2008 07:36:57 -0800 urn:uuid:5c144048-9b2d-4664-b960-50b58c5e5d0e http://kurt.karmalab.org/articles/2008/02/07/rails-app-without-tests-guaranteed-fail#comment-6292 Comment on Rails App Without Tests = Guaranteed Fail by E. James O'Kelly <p>And anyone who condones not paying consultants is a prick and a thief in my book. You are talking about robbing your own ecosystem here, not typically smart to shit where you eat.</p> Thu, 28 Feb 2008 07:40:27 -0800 urn:uuid:cf11df6e-d5c5-4ddc-aac2-301ff95df12a http://kurt.karmalab.org/articles/2008/02/07/rails-app-without-tests-guaranteed-fail#comment-6293