Testing

I need to write a general procedure to test a software once it's done (and not while I am programming the application) : what sould be tested, in wich sequence, how, etc.

Does somebody know any kind of procedure related to this or an internet address that could help me with that?

Thanks!

[309 byte] By [dido77a] at [2007-10-1 0:39:12]
# 1
Oh, the something in class Other, where the thing does something to something else. Yeah, call its .test() method and you'll be fine.
Adeodatusa at 2007-7-7 16:26:11 > top of Java-index,Other Topics,Algorithms...
# 2

the simple reply is to take a look at JUnit to learn about unit testing.

However I must point out that questions like "what should be tested" are so general as to be pointless. IF you wrote a game then you must test if the game is fun. If you wrote a sort routine you must test if it sorts the numbers, etc.

Some of these tests are ammenable to code, meaning that you can write code that will stuff a list to a sort routine and then check if the results really are sorted. You can stuff a null list to that routine and see if it croaks. However other testing is NOT ammenable to code. Does you user interface suck ? Does the game keep em interested by the time they make it to level 10? Should the dialogs be painted pink rather than blue?

You can easily (maybe!) write code to test if the dialog was pink, you can not easily test if the dialog should be pink.

Reading about unit testing will give you some ideas about what kind of things you could be testing for.

marlin314a at 2007-7-7 16:26:11 > top of Java-index,Other Topics,Algorithms...
# 3
Thank you very much for the info, that's what I tought about the subject.
dido77a at 2007-7-7 16:26:11 > top of Java-index,Other Topics,Algorithms...
# 4

Hi,

Junit is a very good framework for testing the functionality of the code. This is called blackbox testing where you can verfy that the class and its various methods produces the correct outcomes. Once you have a Junit test class you can continue running it on your code after each modification. This is called regression testing where you can verify that the code still functions correctly as before. The is also static analysis which is testing/reveiwing the source code itself, making sure the best coding practices have been followed. The goal is to get the best Optimization, Security, etc. Sun Microsystems has its own set of recommended standards but there are ofcourse many other standards suggested by the experts in the field. Finaly there is the subject of whitebox testing. This is testing the structure of the code against unfriendly or unexpected

inputs and bulletproofing the methods to make sure they will not throw runtime exceptions. There are tools that do some or all of these things and some even have been designed to do it automaticaly. Now its time to work the google.

Good luck.

azarrabia at 2007-7-7 16:26:11 > top of Java-index,Other Topics,Algorithms...