mercredi 28 janvier 2015

what should be test input data for a function to ensure that function works fine for complete allowed range

I have a function f(n) which returns sum from 1 to n ie



f(1)=1
f(2)=3
f(3)=6


Suppose this function have some issue and n can range from 1 to 100000.

How can i test it by providing minimum number of test cases. like n=1 can be 1 test case. n=50 can be another test case.

I mean is there any algorithm which can generate what all inputs can i test to ensure that all input from 1 to 100000 are working fine.


Aucun commentaire:

Enregistrer un commentaire