Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Testing legacy code

Options
  • 11-11-2014 6:44pm
    #1
    Registered Users Posts: 1,466 ✭✭✭


    Does anyone know of a good book or website that goes it strategies for (unit) testing legacy code that wasn't designed with testing in mind, such a no DI seams.

    Language is C# if that makes a difference.


Comments

  • Closed Accounts Posts: 4,436 ✭✭✭c_man




  • Registered Users Posts: 1,466 ✭✭✭Smoggy


    c_man wrote: »

    Being 10 years old doesn't matter ? The principles still hold up ?


  • Closed Accounts Posts: 4,436 ✭✭✭c_man


    Smoggy wrote: »
    Being 10 years old doesn't matter ? The principles still hold up ?

    Nope! That book more than anything else, helped me getting a particularly... troublesome module under some sort of control.

    In fact I started a thread kinda like this a year ago you should check out - http://www.boards.ie/vbulletin/showthread.php?p=87011342


  • Registered Users Posts: 1,466 ✭✭✭Smoggy


    Thanks C_Man - I have that on order now :)


  • Registered Users Posts: 1,466 ✭✭✭Smoggy


    Have I dreamed these up ?

    Are there such things as AutoMocks, where their functionality would be to mark code for mimic, record interaction on the first play through and mimic it back when under test ?

    It's more than possible that I have made this up :) But If I haven't it needs to be developed. Google hasn't shown me anything, but I don't really know what I'm searching for :)


  • Advertisement
  • Registered Users Posts: 7,242 ✭✭✭Tow


    C# = legacy code :-)

    When is the money (including lost growth) Michael Noonan took in the Pension Levy going to be paid back?



  • Registered Users Posts: 14,148 ✭✭✭✭Lemming


    Tow wrote: »
    C# = legacy code :-)

    I'm almost afraid to ask this question for fear of feeding a troll; but what exactly isn't legacy code then if C# is considered legacy code?


  • Registered Users Posts: 361 ✭✭NinetyForNone


    Lemming wrote: »
    C# is considered legacy code?
    From Wikipedia page on Legacy code
    ...source code inherited from someone else and source code inherited from an older version of the software.


  • Moderators, Sports Moderators, Regional Abroad Moderators Posts: 2,646 Mod ✭✭✭✭TrueDub


    Alternatively, legacy code is code you've inherited from someone else which doesn't fit with the latest techniques, or with the fad-du-jour in that particular programming language or genre.


  • Registered Users Posts: 1,466 ✭✭✭Smoggy


    I can assure you this code is legacy code, you too would agree if you saw it.


  • Advertisement
  • Closed Accounts Posts: 4,436 ✭✭✭c_man


    Lol. I'd say that legacy code, is any code that is not under any kind of test... Now why can't we just all get along? :)


  • Moderators, Technology & Internet Moderators Posts: 1,334 Mod ✭✭✭✭croo


    Smoggy wrote: »
    ...where their functionality would be to mark code for mimic...
    Don't know about that bit ...
    Smoggy wrote: »
    record interaction on the first play through and mimic it back when under test ?
    But the Open Source Selenium project does this for webapps


  • Registered Users Posts: 1,466 ✭✭✭Smoggy


    c_man wrote: »
    Lol. I'd say that legacy code, is any code that is not under any kind of test... Now why can't we just all get along? :)


    +1
    I like this definition.


Advertisement