**Calculator Test Cases Template:** We can see that often, the experienced and the fresher tester is asked to write the test cases for the calculator, and if you want to check the previous **Blackboard test cases,** then you can check. Many times the type of calculator is not mentioned. Test cases for different calculators depend on the type – scientific, simple, financial, or some other specific calculator like a programmable calculator.

For the sake of simplicity, we are choosing a simple calculator for the test cases. You can come up with plenty of test cases to test a calculator based on mathematical computation. However, we are here testing the application to see if it is fit for consumer use. So we have to make sure that it fits for the most obvious tests. If those tests are passed, then we can safely assume that the product is fit for use.

### Calculator Test Case

I am taking Ubuntu Linux’s calculator as an example of my test case. You can use the below image or use the one that comes with your operating system.

**Basic Calculator Test Cases Template**

Write the test cases based on the following functions and scenarios.

- Check the calculator if it starts by on button. If it is a software-based calculator, then check if it starts via specific means like from searching for a calculator in a search bar and then executing an application. Or by accessing menu items in Windows.
- Check if the calculator window maximizes to the certain window size.
- Check if the calculator closes when the close button is pressed or if the exit menu is clicked from the file > exit option.
- Check if the help document is accessed from Help > Documentation.
- Check if the calculator allows copy and paste functionality.
- Check if the calculator has any specific preferences.
- Check if all the numbers are working ( 0 to 9)
- Check if the arithmetic keys ( +, -, *, %, /) are working.
- Check if the clear key is working.
- Check if the brackets keys are working.
- Check if the sum or equal key is working.
- Check if the square and square root keys are working.

**Functionality Test Cases**

- Check the addition of two integer numbers.
- Check the addition of two negative numbers.
- Check the addition of one positive and one negative number.
- Check the subtraction of two integer numbers.
- Check the subtraction of two negative numbers.
- Check the subtraction of one negative and one positive number.
- Check the multiplication of two integer numbers.
- Check the multiplication of two negative numbers.
- Check the multiplication of one negative and one positive number.
- Check the division of two integer numbers.
- Check the division of two negative numbers.
- Check the division of one positive number and one integer number.
- Check the division of a number by zero.
- Check the division of a number by a negative number.
- Check the division of zero by any number.
- Check if the functionality using BODMAS/BIDMAS works as expected.

**Advanced Tests on Scientific Calculator**

If your calculator has advanced features, as shown in the screenshot.

You can add a few more tests on the scientific calculator.

- Check if the sin, cos, tan, and cos is operational using the keys.
- Check if the x-1, x!,|x|,x^y, and f(x) is operational and works as expected.
- Check if the log key is operational and works as expected.
- Check if the natural logarithm key I operational and works as expected.
- Check if the factorial key is working as expected.
- Check if the real and imaginary component keys are working as expected.
- Check if the complex conjugate keys are working as expected.

**Conversion Function Tests**

Some of the advanced scientific calculators have the converter option. It does the conversion of angle, length, weight, area, volume, duration, currency, temperature. Make sure you write the test cases for the same.

**Financial Calculator Tests**

The additional keys for the financial calculator will be as shown in the image. Some calculator has the mode for enabling these keys.

There are hundreds of test cases that we can make based on the operation of single and combination of the keys. I have given the test cases here to give you head start. It may help you with the interview purpose, or it can be used for writing your test cases where there is a use of a calculator. Hope you have found this test case tutorial helpful

### Test Scenario For Calculator Test Case

### Calculator Test Case

Write the test cases based on the following functions and scenarios.

- Check it starts by on button. If it is a software-based calculator, then check if it starts via specific means like from searching for a calculator in the search bar and then executing the application. Or by accessing menu items in Windows.
- Check if the calculator window maximizes the certain window size.
- Check if the calculator closes when the close button is pressed or if the exit menu is clicked from the file > exit option.
- Check if the help document is accessed from Help > Documentation.
- Check if the calculator allows copy and paste functionality.
- Check if the calculator has any specific preferences.
- Check if all the numbers are working ( 0 to 9)
- Check if the arithmetic keys ( +, -, *, %, /) are working.
- Check if the clear key is working.
- Check if the brackets keys are working.
- Check if the sum or equal key is working.
- Check if the square and square root keys are working.

**Calculator Test Case**

- Check the addition of two integer numbers.
- Check the addition of two negative numbers.
- Check the addition of one positive and one negative number.
- Check the subtraction of two integer numbers.
- Check the subtraction of two negative numbers.
- Check the subtraction of one negative and one positive number.
- Check the multiplication of two integer numbers.
- Check the multiplication of two negative numbers.
- Check the multiplication of one negative and one positive number.
- Check the division of two integer numbers.
- Check the division of two negative numbers.
- Check the division of one positive number and one integer number.
- Check the division of a number by zero.
- Check the division of a number by a negative number.
- Check the division of zero by any number.
- Check if the functionality using BODMAS/BIDMAS works as expected.

**Check Also: Different Agile (Scrum) Practices**

- Check if the calculator is a normal calculator or scientific calculator
- Verify that all the buttons are present and text written on them is readable
- Check the arithmetic operations are working fine- +, -, /, * etc
- Verify that BODMAS is applied in case of complex queries and the correct result is returned
- Verify that the calculator gives correct result in case of operations containing decimal numbers
- Check if the calculator is battery operated or works on solar power
- Verify the outer body material of the calculator
- Verify the spacing between the two buttons, and the buttons should not be too closely placed
- Check the pressure required to press a button, the pressure required should not be too high
- Verify the number of digits allowed to enter in the calculator for any operation
- Verify the limit of the response value
- Verify the functioning of memory functions
- Check if calculator allows navigating through previous calculations
- Verify that hitting ‘C’ cancels any digits or operation added
- Verify the working of an ON-OFF button in the calculator
- Check if keeping the calculator unused for a certain period of time, turns it off automatically
- Verify that on pressing two operators one after the other, the latest one will override the previous operator
- Verify the state of the calculator when two buttons are pressed simultaneously
- Verify if a user can delete digits one by one using the backspace key

We try to post all the possible scenarios for Calculator test cases, but still, if you found any missed test cases, then you can mention in the comment section so that we try to update in out Software Testingo post.

James says

Thanks to my father who told me regarding this website, this the blog is genuinely amazing.