views:

27

answers:

1

I know this sounds a big vague so I'll try and be as precise as I can be. I'm pretty new to programming. I wrote an application a year ago that all my coworkers use on a daily basis. Now I have added a basic peer to peer update function, with an ACL defined in a local host file. It have it working in a way that file a newer date within a certain number of hours is available from one of the other machines, it updates to the newer version. It uses a UDP beacon for comparison. It works.

Now that I have the first part done, how do I thoroughly test it and try to break it? I'm not sure what methodologies to use or even where to look. I realize that you could take this to the nth degree as far as security, but the app doesn't need much in the way of data security because it isn't mission critical. It is written in Java. I've read about JUnit but have no idea how or when to use it. I don't use any IDE's unless you consider emacs an IDE.

I guess this comes to a broader scale, how can you tell when you're done developing an application?

+1  A: 

you might not like this answer, but ...

use an ide, like eclipse which has built in support for junit. you will never look back after using a good ide.

then write junit tests which emulate various things which might go wrong with your procedure, like the update files being incomplete, the stream breaking .. etc.

quite often, the testing code needs to be as or more complicated than the code you're testing, but that doesn't mean it's any less useful.

pstanton
Yea, I was hoping for an answer without Eclipse. I tried using it briefly and it seemed to complicate too many things to be useful for me. Then again, does it work with git? That's probably a silly question so I'll look into it.
new2code
you don't "need" an IDE to use JUnit. you just need to write a test class and have JUnit and your project in the classpath. but it sure helps.
pstanton
I guess the one thing would be the kinds of network issues to test for?
new2code