0% found this document useful (0 votes)
6 views8 pages

Calculator Operations Test Cases

Uploaded by

Sanket Karade
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views8 pages

Calculator Operations Test Cases

Uploaded by

Sanket Karade
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Product name: Calculator

Designed by: Mukund Khandaker


Module name: Substraction(-)
Test Executed date:

Testcase ID Test scenario Test case Pre-condition Test Steps Test data Expected result Actual result Status

1) Open calculator I get the required


Substraction two Needs two or more 2) Enter 1st number this Substraction of the result after the
TCA01 Substraction positivenumber postive or negative 3) Click on (-) Ex: 10 - 5 = 5 twonumber results in 5 Substraction of PASS
Operation numbers 4) Enter 2nd number two number
5) Click on (=) Ex: 5

I get the required


1) Open calculator By adding one positive result after the
2) Enter 1st number and one negative Substraction n of
Substraction one positive Needs two or more
TCA02 Substraction Operation 3) Click on (-) Ex: 10 –( -5) = number results in two number PASS
number and one negative postive or negative
4) Enter 2nd number 15 subtraction between Ex:1 5
number numbers
5) Click on (=) two numbers and gives
bigger number sign

1) Open calculator By Substracting one I get the required


Substraction one Needs two or more 2) Enter 1st number positiveand one result after the
TCA03 Substraction Operation negative number and postive or negative 3) Click on (-) Ex: (-10)-5 =-15 negative number Substraction n of PASS
one positivenumber numbers 4) Enter 2nd number results in subtraction two number
5) Click on (=) between two numbers Ex: -15
and givesbigger
number sign
By Substracting two I get the required
negativenumber it result after the
1) Open calculator
results In Substraction Substraction of
Substraction two Needs two or more 2) Enter 1st number
TCA04 Substraction Operation Ex: (-10)--5=-5 operation and gives the two number PASS
negativenumber postive or negative 3) Click on (-)
negative operand to the Ex: -5
numbers 4) Enter 2nd number
output
5) Click on (=)
Product name: Calculator
Designed by: Mukund Khandaker
Module name: Addition(+)
Test Executed date:

Testcase ID Test scenario Test case Pre-condition Test Steps Test data Expected result Actual result Status

1) Open calculator I get the required


Additing two positive Needs two or more 2) Enter 1st number this addition of the two result after the
TCA01 Addition Operation number postive or negative 3) Click on (+) Ex: 10 + 5 = 15 number results in 15 addition of two PASS
numbers 4) Enter 2nd number number
5) Click on (=) Ex: 15

I get the required


1) Open calculator By adding one positive result after the
2) Enter 1st number and one negative addition of two
Additing one positive Needs two or more
TCA02 Addition Operation 3) Click on (+) Ex: 10 + -5 = 5 number results in number PASS
number and one negative postive or negative
4) Enter 2nd number subtraction between Ex: 5
number numbers
5) Click on (=) two numbers and gives
bigger number sign

1) Open calculator By adding one positive I get the required


Additing one negative Needs two or more 2) Enter 1st number and one negative result after the
TCA03 Addition Operation number and one positive postive or negative 3) Click on (+) Ex: (-10)+ 5 =-5 number results in addition of two PASS
number numbers 4) Enter 2nd number subtraction between number
5) Click on (=) two numbers and gives Ex: -5
bigger number sign

By adding two negative I get the required


number it results In result after the
1) Open calculator
addition operation and addition of two
Additing two negative Needs two or more 2) Enter 1st number
TCA04 Addition Operation Ex: (-10)+-5=-15 gives the negative number PASS
number postive or negative 3) Click on (+)
operand to the output Ex: -15
numbers 4) Enter 2nd number
5) Click on (=)
Product name: Calculator
Designed by: Mukund Khandaker
Module name: Division(/)
Test Executed date:

Testcase ID Test scenario Test case Pre-condition Test Steps Test data Expected result Actual result Status

1) Open calculator I get the required


Division two positive Needs two or more 2) Enter 1st number this Division of the result after the
TCA01 Division Operation number postive or negative 3) Click on (/) Ex: 10 / 5 = 2 twonumber results in 2 Division of two PASS
numbers 4) Enter 2nd number number
5) Click on (=) Ex: 2

I get the required


1) Open calculator By Division one result after the
2) Enter 1st number positiveand one Division n of
Dvision one positive Needs two or more
TCA02 3) Click on (/) Ex: 10 / ( -5) = 2 negative number two number PASS
Division Operation number and one negative postive or negative
4) Enter 2nd number results in Division Ex: 2
number numbers
5) Click on (=) between two numbers
and givesbigger
number sign

1) Open calculator By Division one I get the required


Dvision one negative Needs two or more 2) Enter 1st number positiveand one result after the
TCA03 Division Operation number and one positive postive or negative 3) Click on (/) Ex: (-10) / 5 = 2 negative number Division n of PASS
number numbers 4) Enter 2nd number results in Division two number
5) Click on (=) between two numbers Ex: -2
and givesbigger
number sign
By Division two I get the required
negativenumber it result after the
1) Open calculator
results In Division Division of two
Dvision two negative Needs two or more 2) Enter 1st number
TCA04 Dvision Operation Ex: (-10) / 5= 2 operation and gives the number PASS
number postive or negative 3) Click on (/)
negative operand to the Ex: -
numbers 4) Enter 2nd number
output
5) Click on (=)
Product name: Calculator
Designed by: Mukund Khandaker
Module name: Substraction(-)
Test Executed date:

Testcase ID Test scenario Test case Pre-condition Test Steps Test data Expected result Actual result Status

1) Open calculator I get the required


Substraction two Needs two or more 2) Enter 1st number this Substraction of the result after the
TCA01 Substraction positivenumber postive or negative 3) Click on (-) Ex: 10 - 5 = 5 twonumber results in 5 Substraction of PASS
Operation numbers 4) Enter 2nd number two number
5) Click on (=) Ex: 5

I get the required


1) Open calculator By adding one positive result after the
2) Enter 1st number and one negative Substraction n of
Substraction one positive Needs two or more
TCA02 Substraction Operation 3) Click on (-) Ex: 10 –( -5) = number results in two number PASS
number and one negative postive or negative
4) Enter 2nd number 15 subtraction between Ex:1 5
number numbers
5) Click on (=) two numbers and gives
bigger number sign

1) Open calculator By Substracting one I get the required


Substraction one Needs two or more 2) Enter 1st number positiveand one result after the
TCA03 Substraction Operation negative number and postive or negative 3) Click on (-) Ex: (-10)-5 =-15 negative number Substraction n of PASS
one positivenumber numbers 4) Enter 2nd number results in subtraction two number
5) Click on (=) between two numbers Ex: -15
and givesbigger
number sign
By Substracting two I get the required
negativenumber it result after the
1) Open calculator
results In Substraction Substraction of
Substraction two Needs two or more 2) Enter 1st number
TCA04 Substraction Operation Ex: (-10)--5=-5 operation and gives the two number PASS
negativenumber postive or negative 3) Click on (-)
negative operand to the Ex: -5
numbers 4) Enter 2nd number
output
5) Click on (=)
Product name: Calculator
Designed by: Mukund Khandaker
Module name: Multipication(*)
Test Executed date:

Testcase ID Test scenario Test case Pre-condition Test Steps Test data Expected result Actual result Status

1) Open calculator I get the required


Multipication two Needs two or more 2) Enter 1st number this Multipication of result after the
TCA01 Multipication positivenumber postive or negative 3) Click on (*) Ex: 10 * 5 = 50 the twonumber results Multipication of PASS
Operation numbers 4) Enter 2nd number in 50 two number
5) Click on (=) Ex: 50

I get the required


1) Open calculator By Multipication one result after the
2) Enter 1st number positiveand one Multipication of
Multipication one Needs two or more
TCA02 Multipication Operation positive number and one postive or negative 3) Click on (*) Ex: 10 * -5 =- 50 negative number two number PASS
4) Enter 2nd number results in Multipication Ex:- 50
negativenumber numbers
5) Click on (=) between two numbers
and givesbigger
number sign

1) Open calculator By Multipication one I get the required


Multipication one Needs two or more 2) Enter 1st number positiveand one result after the
TCA03 Multipication Operation negative number and postive or negative 3) Click on (*) Ex: (-10) * 5 =- negative number Multipication of PASS
one positivenumber numbers 4) Enter 2nd number 50 results in Multipication two number
5) Click on (=) between two numbers Ex: -50
and givesbigger
number sign
By Multipication two I get the required
negativenumber it result after the
1) Open calculator
results In Multipication Multipication of
Multipication two Needs two or more 2) Enter 1st number
TCA04 Multipication Operation negativenumber Ex: (-10) *-5=50 operation and gives the two number PASS
postive or negative 3) Click on (*)
negative operand to the Ex: 50
numbers 4) Enter 2nd number
output
5) Click on (=)

Common questions

Powered by AI

Test scenarios involving zero are critical to evaluate a calculator's reliability, as operations with zero can be edge cases in arithmetic, influencing behavior during addition, subtraction, and especially division. Furthermore, zero operations reveal handling of boundary conditions in calculations (e.g., division by zero). Evaluating such cases ensures the software performs predictably, reinforces mathematical correctness, and safeguards against runtime errors, which form a crucial aspect of quality assurance in software testing .

Mukund Khandaker's calculator is designed to accommodate both basic and complex arithmetic operations by implementing test cases covering addition, subtraction, multiplication, and division with diverse sign permutations. The inclusion of operations involving positive, negative, and mixed-sign operands demonstrates comprehensive coverage, while ensuring output consistency with expected mathematical results validates the effectiveness and reliability of the calculator. The testing strategy ensures a high degree of functionality for everyday computation tasks .

The thorough documentation of test cases for Mukund Khandaker's calculator ensures accurate and reliable operations by detailing step-by-step procedures, handling different numerical scenarios (e.g., positive, negative), and defining expected results versus actual outcomes. This structured approach allows for consistent validation of operational correctness, identifies discrepancies, and ensures each mathematical operation aligns with expected standards, ultimately enhancing user trust and application reliability .

Testing operations with varied number signs helps ensure the calculator correctly handles typical mathematical scenarios like the sign rules for arithmetic operations (negative, positive, mixed). Testing with different combinations, as demonstrated, exposes edge cases such as negative outputs in division and multiplication, ensuring robustness. Challenges include ensuring all exceptional sign-related cases are covered, and the complexity of combining varied operations remains correctly validated, which necessitates detailed planning and test design .

When subtracting a larger number from a smaller one, such as 5 - 10, the outcome is negative, -5, displaying correct handling of signs . In contrast, subtracting a smaller number from a larger one results in a positive outcome. Consistently, subtracting negative from negative follows arithmetic rules to result in a positive difference if one negative is subtracted from another larger absolute value negative, as in (-10) - (-5), yielding a negative sign .

When adding a negative number to a positive number, such as -10 + 5, the calculator effectively performs subtraction, yielding -5 as the result with the sign of the larger absolute value . Conversely, when adding two negative numbers like -10 + (-5), the calculator simply adds the absolute values and keeps the negative sign, resulting in -15 . This distinction highlights a consistent approach to handle mixed sign addition and double negative addition by applying standard numerical rules.

The multiplication of two negative numbers, such as (-10) * (-5), results in 50, confirming that multiplying two negative numbers yields a positive product. The test case confirms this expected outcome as the actual result matches the expected positive output, affirming the mathematical rule applied correctly by the calculator .

Subtracting a positive number from a negative number, as shown in the operation (-10) - 5, results in -15, indicating the subtraction of one positive number and one negative number gives the result with the sign of the larger absolute value . In contrast, subtracting two negative numbers, such as (-10) - (-5), results in -5. This indicates that subtracting a smaller negative number from a larger negative number results in a less negative number .

The calculator produces a negative result when dividing a positive by a negative number or vice versa, due to the rules of signed number division. For instance, 10 / (-5) results in -2, and (-10) / 5 also results in -2. However, dividing two negative numbers, (-10) / (-5), results in a positive outcome of 2, as dividing two negative numbers yields a positive quotient .

The test cases for the multiplication module exemplify arithmetic rules by ensuring outcomes reflect correct sign and magnitude: multiplying two positives produces a positive result, multiplying a positive and a negative results in a negative, and multiplying two negatives produces a positive. This consistent application adheres to arithmetic rules across scenarios like 10 * (-5) resulting in -50, validating the correct implementation for diverse multiplication contexts, and ensuring consistent outputs that align with theoretical mathematics principles .

You might also like