Thread: Designing and Implementing Test Code

  1. #16
    Registered User manofsteel972's Avatar
    Join Date
    Mar 2004
    Posts
    317

    I guess that last question is How do you know that you have been through enough

    I guess the last question is how do you know when you have done enough testing? At what point do you call it good enough?
    "Knowledge is proud that she knows so much; Wisdom is humble that she knows no more."
    -- Cowper

    Operating Systems=Slackware Linux 9.1,Windows 98/Xp
    Compilers=gcc 3.2.3, Visual C++ 6.0, DevC++(Mingw)

    You may teach a person from now until doom's day, but that person will only know what he learns himself.

    Now I know what doesn't work.

    A problem is understood by solving it, not by pondering it.

    For a bit of humor check out xkcd web comic http://xkcd.com/235/

  2. #17
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    when you're satisfied, you stop... it all depends on how much your going to test... one string 200 chars long most likely won't do anything different than the next string 200 chars long

    just basically test the limits... if you have an if statement that tests for greater than or equal, try 0,40,49.5,50,50.1,60
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

  3. #18
    Registered User manofsteel972's Avatar
    Join Date
    Mar 2004
    Posts
    317

    Ok I think I am getting a better handle on it.

    I think I am getting this down. I think the main thing I was confused about what writing tests first before you write the code. It is a methodologly I was reading about. For some reason I couldn't figure out how you write the tests before the actual code. I think I understand now. I know there is more to just the limits and extreemes because bugs can occur through interaction. For example when you open a menu close the menu then try to print a document it gives some sort of error. Each piece of code may be correct but the way they interract causes a bug. I guess for something like that you would need a way to trigger the menus in random sequences in the program. Or just sit there and open menus all day lol. If it is a calculation then I would need to get the values then run calcualations and compare to the results and if they are different then I would know there is a rounding error or something like that. I think the block I was having on creating tests is gone now and I am seeing a whole new world of possiblities. Maybe I will create a test suite or libraray and just keep adding routines to it. Probably would be a good project to work on. I am sure there are some out there already maybe someone could reccomend one to start with?
    "Knowledge is proud that she knows so much; Wisdom is humble that she knows no more."
    -- Cowper

    Operating Systems=Slackware Linux 9.1,Windows 98/Xp
    Compilers=gcc 3.2.3, Visual C++ 6.0, DevC++(Mingw)

    You may teach a person from now until doom's day, but that person will only know what he learns himself.

    Now I know what doesn't work.

    A problem is understood by solving it, not by pondering it.

    For a bit of humor check out xkcd web comic http://xkcd.com/235/

  4. #19
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    you won't need to worry about that for now, seeing as I doubt you're doing windows programming now... and opening and closing a menu shouldn't cause any bugs...
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

  5. #20
    Registered User manofsteel972's Avatar
    Join Date
    Mar 2004
    Posts
    317

    I have dabbled in windows programming.

    I have created a simple window in windows and have been messing with the event handlers. Nothing major I know but it is a start. I tried some dialog based applications as well. Those are a bit easier to understand. Why shouldn't I be worried about testing? If I build a test libaray as I go then it should grow into something more robust eventually I would think?
    "Knowledge is proud that she knows so much; Wisdom is humble that she knows no more."
    -- Cowper

    Operating Systems=Slackware Linux 9.1,Windows 98/Xp
    Compilers=gcc 3.2.3, Visual C++ 6.0, DevC++(Mingw)

    You may teach a person from now until doom's day, but that person will only know what he learns himself.

    Now I know what doesn't work.

    A problem is understood by solving it, not by pondering it.

    For a bit of humor check out xkcd web comic http://xkcd.com/235/

  6. #21
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    yeah, but you would still need to tailor it to your specific application... hand-testing is probably the best way to do it...
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Implementing C in html,Newbie Here
    By blondie.365 in forum C Programming
    Replies: 2
    Last Post: 10-15-2008, 07:56 AM
  2. Implementing a binary search
    By smitsky in forum C++ Programming
    Replies: 3
    Last Post: 10-06-2004, 01:16 PM