Link Details

Link 1102767 thumbnail
User 301613 avatar

By smaye81
via summa-tech.com
Published: Jan 30 2014 / 02:35

I’m a huge fan of unit testing front end code no matter what platform I’m coding in. The rule about being smart about what you test is even more important with UI code. Uncle Bob said, “having dirty tests is equivalent to, if not worse than, having no tests.”
  • 9
  • 0
  • 637
  • 1233

Comments

Add your comment
User 560397 avatar

sbp_romania replied ago:

1 votes Vote down Vote up Reply

“If it is not testable, maintainable, and understandable, it is trash.” - This is so true, and unfortunately, a lot of legacy code is like that, it makes you laugh because it's so bad and then it makes you cry because you have to fix it.

User 330966 avatar

ferrisoxide replied ago:

0 votes Vote down Vote up Reply

Not just legacy code. There's a lot of bad test code out there, where people use scaffolding during development (mock objects and the like) and then forgot to kick away the scaffolding once the rest of the app is developed. The great thing with this approach is the tests always work - because they imagine a perfect world. That kind of testing makes ME cry... coz I have to fix that :)

User 560397 avatar

sbp_romania replied ago:

0 votes Vote down Vote up Reply

Well, leaving placeholders even though the app is finished, is a very serious thing, and the developer who did this should be ashamed of it. :) Also, if the tests always work, for me is a sign that something is wrong, with the tests, or with the tester.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (9)



Voters Against This Link (0)



    Java Performance Optimization
    Written by: Pierre-Hugues Charbonneau
    Featured Refcardz: Top Refcardz:
    1. Design Patterns
    2. OO JS
    3. Cont. Delivery
    4. Java EE7
    5. HTML5 Mobile
    1. Node.js
    2. Debugging JavaScript
    3. OO JS
    4. JSON
    5. Ajax