-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Code Samples is set of simple tests to emulate software development life cycle processes by the samples.
Testcase #1 Description: to test addition of positive numbers. Pre-conditions: open TestHost.exe Steps:
- Input positive number (5) and push "Enter".
- Input positive number (5) and push "Enter".
- Push "+" and "Enter" Expected result: program makes correct calculation (5+5=10)
Testcase #2 Description: to test addition of negative numbers. Pre-conditions: open TestHost.exe Steps:
- Input negative number (-5) and push "Enter".
- Input negative number (-5) and push "Enter".
- Push "+" and "Enter" Expected result: program makes correct calculation (-5+-5=10)
Testcase #3 Description: to test subtraction of positive numbers. Pre-conditions: open TestHost.exe Steps:
- Input positive number (5) and push "Enter".
- Input positive number (5) and push "Enter".
- Push "-" and "Enter" Expected result: program makes correct calculation (5-5=0)
Testcase #4 Description: to test subtraction of negative numbers. Pre-conditions: open TestHost.exe Steps:
- Input negative number (-5) and push "Enter".
- Input negative number (-5) and push "Enter".
- Push "-" and "Enter" Expected result: program makes correct calculation (-5--5=0)
Testcase #5 Description: to test multiplication of positive numbers. Pre-conditions: open TestHost.exe Steps:
- Input positive number (5) and push "Enter".
- Input positive number (5) and push "Enter".
- Push "" and "Enter" Expected result: program makes correct calculation (55=25)
Testcase #6 Description: to test multiplication of negative numbers. Pre-conditions: open TestHost.exe Steps:
- Input negative number (-5) and push "Enter".
- Input negative number (-5) and push "Enter".
- Push "" and "Enter" Expected result: program makes correct calculation (-5-5=-25)
Testcase #7 Description: to test division of positive numbers. Pre-conditions: open TestHost.exe Steps:
- Input positive number (5) and push "Enter".
- Input positive number (5) and push "Enter".
- Push ":" and "Enter" Expected result: program makes correct calculation (5:5=1)
Testcase #8 Description: to test division of negative numbers. Pre-conditions: open TestHost.exe Steps:
- Input negative number (-5) and push "Enter".
- Input negative number (-5) and push "Enter".
- Push ":" and "Enter". Expected result: program makes correct calculation (-5:-5=1)
Testcase #9 Description: to test division by zero Pre-conditions: open TestHost.exe Steps:
- Input any number and push "Enter".
- Input "0" and and push "Enter".
- Push ":" or "/" and "Enter". Expected result: "Attempted to divide by zero" message is shown.
Testcase #10 Description: to test addition of positive decimals. Pre-conditions: open TestHost.exe Steps:
- Input positive decimal (1.5) and push "Enter".
- Input positive decimal (1.1) and push "Enter".
- Push "+" and "Enter" Expected result: program makes correct calculation (1.5+1.1=2.6)
Testcase #11 Description: to test addition of negative decimals. Pre-conditions: open TestHost.exe Steps:
- Input negative decimal (-1.5) and push "Enter".
- Input negative decimal (-1.1) and push "Enter".
- Push "+" and "Enter" Expected result: program makes correct calculation (-1.5+-1.1=-2.6)
Testcase #12 Description: to test subtraction of positive decimals. Pre-conditions: open TestHost.exe Steps:
- Input positive decimal (1.5) and push "Enter".
- Input positive decimal (1.1) and push "Enter".
- Push "-" and "Enter" Expected result: program makes correct calculation (1.5-1.1=0.4)
Testcase #13 Description: to test subtraction of negative decimals. Pre-conditions: open TestHost.exe Steps:
- Input negative decimal (-1.5) and push "Enter".
- Input negative decimal (-1.1) and push "Enter".
- Push "-" and "Enter" Expected result: program makes correct calculation (-1.5--1.1=-0.4)
Testcase #14 Description: to test multiplication of positive decimals. Pre-conditions: open TestHost.exe Steps:
- Input positive decimal (5) and push "Enter".
- Input positive decimal (5) and push "Enter".
- Push "" and "Enter" Expected result: program makes correct calculation (1.51.1=1.65)
Testcase #15 Description: to test multiplication of negative decimals. Pre-conditions: open TestHost.exe Steps:
- Input negative decimal (-1.5) and push "Enter".
- Input negative decimal (-1.1) and push "Enter".
- Push "" and "Enter" Expected result: program makes correct calculation (-1.5-1.1=-2.6)
Testcase #16 Description: to test division of positive decimals. Pre-conditions: open TestHost.exe Steps:
- Input positive decimal (1.5) and push "Enter".
- Input positive decimal (1.1) and push "Enter".
- Push "/" or ":" and "Enter" Expected result: program makes correct calculation (1.5:1.1=1.36363636)
Testcase #17 Description: to test division of negative decimals. Pre-conditions: open TestHost.exe Steps:
- Input negative decimal (-1.5) and push "Enter".
- Input negative decimals (-1.1) and push "Enter".
- Push ":" or "/" and "Enter". Expected result: program makes correct calculation (-1.5:-1.1=-1.1)
Testcase #18 Description: to test button "q". Pre-conditions: open TestHost.exe Steps: push "q" button Expected result: program quits
Testcase #19 Description: to test capital "Q". Pre-conditions: open TestHost.exe Steps: push capital "Q" button Expected result: program quits
Testcase #20 Description: to test division of positive numbers. Pre-conditions: open TestHost.exe Steps:
- Input positive number (5) and push "Enter".
- Input positive number (5) and push "Enter".
- Push "/" and "Enter" Expected result: program makes correct calculation (5:5=1)
Testcase #21 Description: to test division of negative numbers. Pre-conditions: open TestHost.exe Steps:
- Input negative number (-5) and push "Enter".
- Input negative number (-5) and push "Enter".
- Push "/" and "Enter". Expected result: program makes correct calculation (-5:-5=1)
Testcase #22 Description: to test operation field validation (letters). Pre-conditions: open TestHost.exe Steps:
- Input positive number (5) and push "Enter".
- Input positive number (5) and push "Enter".
- Input letter "j" Expected result: message "not appropriate character" appears.
Testcase #23 Description: to test first number field validation (letters). Pre-conditions: open TestHost.exe Steps:
- Input letter "j" and push "Enter".
- Input positive number (5) and push "Enter".
- Push "+" and "Enter" Expected result: message "not appropriate character" appears.
Testcase #24 Description: to test second number field validation (letters). Pre-conditions: open TestHost.exe Steps:
- Input positive number (5) and push "Enter".
- Input letter "j" and push "Enter".
- Push "+" and "Enter" Expected result: message "not appropriate character" appears.
Testcase #25 Description: to test operation field validation (special character). Pre-conditions: open TestHost.exe Steps:
- Input positive number (5) and push "Enter".
- Input positive number (5) and push "Enter".
- Input special character "}" Expected result: message "not appropriate character" appears.
Testcase #26 Description: to test first number field validation (special character). Pre-conditions: open TestHost.exe Steps:
- Input letter "}" and push "Enter".
- Input positive number (5) and push "Enter".
- Push "+" and "Enter" Expected result: message "not appropriate character" appears.
Testcase #27 Description: to test second number field validation (special character). Pre-conditions: open TestHost.exe Steps:
- Input positive number (5) and push "Enter".
- Input letter "}" and push "Enter".
- Push "+" and "Enter" Expected result: message "not appropriate character" appears.