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?
Printable View
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?
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
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?
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...
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?
yeah, but you would still need to tailor it to your specific application... hand-testing is probably the best way to do it...