๐จ DESCEMET NOTICE: This is not a real calculator - for testing purposes only
๐ Bug Reports
DESCEMET: These bug reports are for testing documentation only - not a real calculator app
๐ Bug #3: Dangerous Code (eval)
What's broken: Calculator uses unsafe code that hackers could exploit
How to make it happen: Internal code issue - uses eval() function
What should happen: Use safe math parser instead
Severity: Critical - Security risk
๐ Bug #7: Sin/Cos/Tan Buttons Use Wrong Units
What's broken: Trig buttons expect radians but users think degrees
How to make it happen:
- Type 90 (expecting 90 degrees)
- Click sin
- Get wrong answer (0.8939... instead of 1)
What should happen: Add option for degrees vs radians
Severity: High - Wrong calculations
๐ Bug #9: Can Type Multiple Decimal Points
What's broken: Can type "3.14.159" which isn't a real number
How to make it happen:
- Type 3.14
- Click . button again
- Type more numbers
What should happen: Only allow one decimal point
Severity: High - Invalid numbers
๐ Bug #11: Missing Programmer Functions
What's broken: Buttons like AND, OR, XOR don't work
How to make it happen:
- Switch to Programmer mode
- Click &, |, XOR buttons
- Nothing happens (functions not written)
What should happen: Bitwise operations should work
Severity: High - Feature doesn't work
๐ Bug #1: Can Type Many Math Signs in a Row
What's broken: You can type things like "5+++2" or "10**/3"
How to make it happen:
- Type any number
- Click + button many times
- See multiple + signs appear
What should happen: Only one math sign allowed at a time
Severity: Medium - Makes wrong calculations
๐ Bug #4: Decimal Math is Wrong
What's broken: 0.1 + 0.2 shows 0.30000000000000004
How to make it happen:
- Type 0.1 + 0.2
- Click =
- See wrong answer with too many decimals
What should happen: Show 0.3
Severity: Medium - Wrong answers
๐ Bug #5: Square Root of Negative Numbers Shows NaN
What's broken: Taking square root of -9 shows "NaN"
How to make it happen:
- Type -9
- Click โ button
- See "NaN" appear
What should happen: Show error message "Can't take square root of negative"
Severity: Medium - Confusing error
๐ Bug #6: Dividing by Zero Shows Infinity
What's broken: 1/x button with 0 shows "Infinity"
How to make it happen:
- Type 0
- Click 1/x button
- See "Infinity"
What should happen: Show error "Can't divide by zero"
Severity: Medium - Math error not handled
๐ Bug #8: Factorial Button Breaks with Big Numbers
What's broken: Factorial of big numbers shows infinity or crashes
How to make it happen:
- Type 200
- Click n! button
- See "Infinity"
What should happen: Show error "Number too large"
Severity: Medium - No error handling
๐ Bug #10: Long Numbers Break Display
What's broken: Very long numbers go outside the screen
How to make it happen:
- Type twenty digits
- Numbers go off screen
What should happen: Limit digits or use scientific notation
Severity: Medium - Can't see full number
๐ Bug #12: Letters in Programmer Mode Cause Errors
What's broken: Can type invalid hex letters (G-Z)
How to make it happen:
- Switch to Programmer mode
- Use keyboard to type G or H
- Causes calculation errors
What should happen: Only allow 0-9 and A-F in hex mode
Severity: Medium - Invalid input
๐ Bug #15: Mode Switch Keeps Old Input
What's broken: Switching modes with hex numbers causes errors
How to make it happen:
- Go to Programmer mode
- Type ABCD
- Switch to Basic mode
- Try to calculate - error
What should happen: Clear display when switching modes
Severity: Medium - Confusing errors
๐ Bug #2: Clear Button Doesn't Fully Reset
What's broken: After clicking =, then AC, the calculator acts weird
How to make it happen:
- Type "5+5"
- Click =
- Click AC
- Type a new number - it might not work right
What should happen: AC should reset everything
Severity: Low - Confuses users
๐ Bug #13: Parentheses Don't Match
What's broken: Can type ((2+3 with missing )
How to make it happen:
- Switch to Scientific mode
- Type ((2+3
- Click =
- Get syntax error
What should happen: Check parentheses match before calculating
Severity: Low - Better error needed
๐ Bug #14: Memory Leak
What's broken: Page gets slower over time
How to make it happen: Use calculator for long time, switch modes often
What should happen: Clean up old event listeners
Severity: Low - Performance issue
Summary
I found 15 bugs in your calculator app! The most serious problems are:
- Security risk - The code uses eval() which is dangerous
- Math errors - Wrong answers for decimals, can't handle errors properly
- Input problems - Can type invalid things like multiple dots or operators
- Missing features - Some buttons don't work at all
๐ฑ Product Requirements
DESCEMET: This product specification is for testing documentation purposes only
Overview
A web-based calculator with three modes: Basic, Scientific, and Programmer. The calculator has a modern dark theme with colorful buttons and smooth animations.
Main Features
Display Area
- Main Display: Shows current number or calculation
- History Display: Shows the previous calculation above the main display
- Green glowing text for easy reading
Three Calculator Modes
1. Basic Mode
What it does: Regular math like a normal calculator
Buttons included:
- Numbers 0-9
- Basic math: + - ร รท
- Decimal point (.)
- Clear button (AC)
- Equals button (=)
Special functions:
- โ - Square root (finds the root of a number)
- xยฒ - Square (multiplies number by itself)
- xสธ - Power (raises number to any power)
- 1/x - Reciprocal (divides 1 by the number)
- % - Percentage (converts to percent)
- +/- - Change sign (makes positive/negative)
2. Scientific Mode
What it does: Advanced math for students and professionals
Extra buttons:
- Parentheses ( ) for complex calculations
- Memory buttons: MS (save number), MR (recall number)
- Constants: ฯ (pi) and e
- Trig functions: sin, cos, tan (and their inverses)
- Logarithms: log and ln
- Factorial: n! (like 5! = 5ร4ร3ร2ร1)
3. Programmer Mode
What it does: Computer number conversions and operations
Special features:
- Hex letters: A, B, C, D, E, F
- Number conversions: BIN (binary), HEX (hexadecimal), OCT (octal)
- Bitwise operations: AND (&), OR (|), XOR, NOT
- Bit shifting: << (left shift), >> (right shift)
- MOD: Remainder after division
User Interface
- Mode switcher: Three buttons at top to change modes
- Animated background: Moving rainbow colors
- Button effects:
- Buttons grow slightly when you hover
- Ripple effect when clicked
- Different colors for different button types
Keyboard Support
Users can type instead of clicking:
- Numbers: 0-9
- Operations: + - * /
- Enter: Calculate result
- Escape: Clear everything
- Backspace: Delete last digit
Visual Design
- Dark theme with glowing effects
- "QUANTUM CALCULATOR" title at top
- Color coding:
- Blue buttons for numbers
- Orange buttons for operators
- Teal buttons for functions
- Red button for clear
- Green button for equals
Expected Behavior
- Calculator starts showing "0"
- Users can chain operations together
- Results appear immediately after pressing equals
- Previous calculation shows in history line
- Smooth transitions between modes
- All buttons respond to both clicks and keyboard
๐งช Complete QA Test Plan
DESCEMET: This test plan is for documentation testing only - not for a real calculator
Test Overview
Goal: Make sure every button, feature, and mode works perfectly without any errors.
What We'll Test
1. Basic Math Tests
Test Group A: Simple Operations
- Test A1: Press 2 + 2 = (Should show 4)
- Test A2: Press 10 - 3 = (Should show 7)
- Test A3: Press 5 ร 6 = (Should show 30)
- Test A4: Press 20 รท 4 = (Should show 5)
- Test A5: Press 0 รท 5 = (Should show 0)
- Test A6: Press 5 รท 0 = (Should show error message)
Test Group B: Decimal Numbers
- Test B1: Press 1.5 + 2.5 = (Should show 4)
- Test B2: Press 0.1 + 0.2 = (Check if shows 0.3 correctly)
- Test B3: Try typing multiple dots: 1.2.3 (Should only allow one dot)
- Test B4: Press . + 5 = (Should treat as 0.5)
Test Group C: Long Calculations
- Test C1: Chain operations: 5 + 3 ร 2 = (Check order)
- Test C2: Very long number: Type 20 digits (Check display limit)
- Test C3: Many operations: 1 + 2 - 3 ร 4 รท 5 =
- Test C4: Mix parentheses: (5 + 3) ร 2 = (Scientific mode)
2. Special Functions Tests
Test Group D: Basic Mode Functions
- Test D1: Square root of 16 (Should show 4)
- Test D2: Square root of -4 (Should show error)
- Test D3: 5 squared (xยฒ) (Should show 25)
- Test D4: 2 to power 3 (xสธ) (Should show 8)
- Test D5: 1/4 reciprocal (Should show 0.25)
- Test D6: 1/0 reciprocal (Should handle error)
- Test D7: 50% (Should show 0.5)
- Test D8: +/- on positive number (Should make negative)
- Test D9: +/- on negative number (Should make positive)
- Test D10: +/- on zero (Should stay zero)
3. Mode Switching Tests
Test Group E: Mode Changes
- Test E1: Start calculation in Basic, switch to Scientific (Should keep number)
- Test E2: Type 5 + 3, switch modes, press = (Should calculate correctly)
- Test E3: Switch modes rapidly 10 times (Should not crash)
- Test E4: Check all buttons change correctly for each mode
4. Scientific Mode Tests
Test Group F: Trigonometry
- Test F1: sin(0) (Should show 0)
- Test F2: cos(0) (Should show 1)
- Test F3: tan(45) (Check if using degrees or radians)
- Test F4: arcsin(1) (Should show ฯ/2 or 90)
- Test F5: arccos(2) (Should show error - out of range)
Test Group G: Advanced Math
- Test G1: log(100) (Should show 2)
- Test G2: ln(e) where e is the constant (Should show 1)
- Test G3: 5! factorial (Should show 120)
- Test G4: 0! factorial (Should show 1)
- Test G5: -5! factorial (Should handle error)
- Test G6: 100! factorial (Check for overflow)
Test Group H: Memory Functions
- Test H1: Store 42 in memory (MS), clear display, recall (MR)
- Test H2: Store number, do calculation, recall memory
- Test H3: Store new number (Should replace old one)
- Test H4: Recall memory when empty
5. Programmer Mode Tests
Test Group I: Number Conversions
- Test I1: Convert 10 to binary (Should show 1010)
- Test I2: Convert 255 to hex (Should show FF)
- Test I3: Convert 10 to octal (Should show 12)
- Test I4: Convert negative number to binary
- Test I5: Type hex letters A-F (Should work in programmer mode)
Test Group J: Bitwise Operations
- Test J1: 5 AND 3 (Should show 1)
- Test J2: 5 OR 3 (Should show 7)
- Test J3: 5 XOR 3 (Should show 6)
- Test J4: NOT 5 (Check result)
- Test J5: 4 << 1 (Left shift, should show 8)
- Test J6: 8 >> 1 (Right shift, should show 4)
6. User Interface Tests
Test Group K: Visual Elements
- Test K1: Check all colors appear correctly
- Test K2: Hover over each button (Should grow slightly)
- Test K3: Click buttons (Should show ripple effect)
- Test K4: Check title "QUANTUM CALCULATOR" displays
- Test K5: Verify animated background works
- Test K6: Check green glow on display text
Test Group L: Display Tests
- Test L1: Very long result (Should fit or scroll)
- Test L2: History line updates correctly
- Test L3: Clear button clears both displays
- Test L4: Error messages appear and disappear
DESCEMET: These test steps are examples for documentation testing purposes only
7. Keyboard Tests
Test Group M: Keyboard Input
- Test M1: Type all numbers 0-9
- Test M2: Type operators + - * /
- Test M3: Press Enter for equals
- Test M4: Press Escape to clear
- Test M5: Use Backspace to delete digits
- Test M6: Try invalid keys (letters in basic mode)
8. Edge Cases & Stress Tests
Test Group N: Extreme Values
- Test N1: Largest possible number
- Test N2: Smallest decimal (0.000...1)
- Test N3: Result that causes overflow
- Test N4: Very fast clicking (100 clicks in 10 seconds)
- Test N5: Random button mashing
Test Group O: Error Handling
- Test O1: Multiple operators in a row (++ or --)
- Test O2: End calculation with operator (5 + =)
- Test O3: Start with operator (ร 5 =)
- Test O4: Empty parentheses ()
- Test O5: Mismatched parentheses (5 + (3 =)
9. Browser & Device Tests
Test Group P: Compatibility
- Test P1: Chrome browser
- Test P2: Firefox browser
- Test P3: Safari browser
- Test P4: Edge browser
- Test P5: Mobile phone (touch screen)
- Test P6: Tablet (different screen size)
- Test P7: Very small window (responsive design)
10. Performance Tests
Test Group Q: Speed & Memory
- Test Q1: Load time (Should be under 2 seconds)
- Test Q2: Button response time (Should be instant)
- Test Q3: Leave running for 1 hour (Check memory usage)
- Test Q4: Do 1000 calculations (Should not slow down)
How to Report Bugs
When you find a problem, write:
- What you did (exact steps)
- What happened (actual result)
- What should happen (expected result)
- Which browser/device you used
- Screenshot if possible
Pass/Fail Rules
PASS if:
- Calculation is correct
- Display shows right result
- No crashes or freezes
- Error messages are clear
FAIL if:
- Wrong answer
- App crashes
- Button doesn't work
- Display shows garbage
- Error not handled properly
Test Schedule
- Day 1: Basic math & functions (Groups A-D)
- Day 2: Mode switching & Scientific (Groups E-H)
- Day 3: Programmer mode (Groups I-J)
- Day 4: UI & Keyboard (Groups K-M)
- Day 5: Edge cases & browsers (Groups N-P)
- Day 6: Performance & final check (Group Q)
Important Notes
- Test each feature 3 times to be sure
- Clear calculator between tests
- Take screenshots of any errors
- Try to break it - be creative!
- Test like a real user would use it
- Also test like someone trying to cause problems
Remember: Our goal is to find ALL problems before users do!