Thursday, January 3, 2008

nr of Test cases for a certain test depth level

Here a function in MS Excel. Though it is for no use at all, at least you don't need to pick up the book TMap and go to the page where a table is shown.

=IF(B1=0,0,IF(B2<=B1,2^B2,IF(B1=1,2^B1,CHOOSE(B1-1,2^B1+SIGN(B1-1.5)*(B2-3+B1)-2,(B1-1)*B2,(COMBIN(B2-1,B1-2))+(B1-2)*(B2),((COMBIN(B2-1,B1-2)+COMBIN(B2-1,(B1-1)-2)))+(B1-(B1-2))*(B2),((COMBIN(B2-1,5-2)+COMBIN(B2-1,(5-1)-2)))+(5-(5-2))*(B2)+COMBIN(B2-1,B1-2),((COMBIN(B2-1,5-2)+COMBIN(B2-1,(5-1)-2)))+(5-(5-2))*(B2)+COMBIN(B2-1,6-2)+COMBIN(B2-1,B1-2),((COMBIN(B2-1,5-2)+COMBIN(B2-1,(5-1)-2)))+(5-(5-2))*(B2)+COMBIN(B2-1,6-2)+COMBIN(B2-1,7-2)+COMBIN(B2-1,B1-2),2^B1))))

To use this function: Enter:
1. Enter in B1 the number of deteminants (conditions)
2. Enter in B2 the test depth level
3. the formula in cell B3

No comments:

Post a Comment