I want to test a calculator application and need such a test data that covers all scenarios and functionalities of calculator.
views:
17answers:
1What is test data for a calculator application so that it covers all the functions of a calculator.
You should have the DATA well sorted to cover all functionalities of your calculator.
Try doing a list of all allowed operations. Then for each operation define which operators will participate. With your knowledge of the operations you should define operator groups that would test all the particularities of your operations.
Example: MULTIPLICATION (AxB)
[Signs] A=+2 ; B=+2 // A=+2 ; B=-2 // A=-2 ; B=+2 // A=-2 ; B=-2 //
[Null] A=0 ; B=-3 // A=0 ; B=+3 // A=-3 ; B=0 // A=+3 ; B=0 // A=0 ; B=0 //
[Regular expressions] A=+1 ; B=+3 //
[Decimals] A=... ; B= ... (etc...) //
[Boundaries] A=X ; B=Y (such as X*Y would be the upper limit on your result field) //
If you are using a calculator that will also have memory stores and stuff like this, design tests to verify their performance.
Also, some calculators would allow combined operations, which you also should consider [(A+B)*(C-D)]/E = ???