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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Testing legacy code

  • 11-11-2014 5:44pm
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 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, Registered Users 2 Posts: 1,466 ✭✭✭Smoggy


    Thanks C_Man - I have that on order now :)


  • Registered Users, Registered Users 2 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
  • Posts: 0 ✭✭✭ [Deleted User]


    C# = legacy code :-)


  • Registered Users, Registered Users 2 Posts: 14,156 ✭✭✭✭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, Registered Users 2 Posts: 368 ✭✭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,671 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, Registered Users 2 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,336 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, Registered Users 2 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