Link Details

Link 1102767 thumbnail
User 301613 avatar

By smaye81
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
  • 647
  • 1235


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)

    Play Framework
    Written by: Ryan Knight
    Featured Refcardz: Top Refcardz:
    1. Akka
    2. Design Patterns
    3. OO JS
    4. Cont. Delivery
    5. HTML5 Mobile
    1. Akka
    2. JUnit/EasyMock
    3. Java Performance
    4. REST
    5. Java