# Einkommensteuer-Rechner Testing Checklist

**Last Updated:** 2026-01-08

Comprehensive testing checklist for the Einkommensteuer-Rechner tool.

## Pre-Deployment Testing

### 1. File Validation

- [x] All JavaScript files exist and are minified
- [x] PHP page exists and loads correctly
- [x] Schema markup JSON is valid
- [x] No console.log/error/warn statements in production code
- [x] All dependencies are loaded in correct order

### 2. Calculation Testing

#### Basic Mode

- [ ] Test with income = 0 (should show no tax)
- [ ] Test with income = 10,000€ (below Grundfreibetrag)
- [ ] Test with income = 12,348€ (exactly Grundfreibetrag)
- [ ] Test with income = 12,349€ (just above Grundfreibetrag)
- [ ] Test with income = 50,000€ (standard case)
- [ ] Test with income = 68,429€ (bracket boundary)
- [ ] Test with income = 68,430€ (42% bracket)
- [ ] Test with income = 100,000€ (high income)
- [ ] Test with income = 277,825€ (bracket boundary)
- [ ] Test with income = 277,826€ (45% bracket)
- [ ] Test with income = 500,000€ (very high income)
- [ ] Test all tax classes (I-VI) with same income
- [ ] Verify calculations match BMF calculator (official German tax calculator)

#### Advanced Mode

- [ ] Test with 1 child (Kinderfreibetrag)
- [ ] Test with 2 children
- [ ] Test with custom Werbungskosten > Pauschbetrag
- [ ] Test with custom Werbungskosten < Pauschbetrag
- [ ] Test with Sonderausgaben
- [ ] Test with church tax enabled (Bayern/BW = 8%)
- [ ] Test with church tax enabled (other states = 9%)
- [ ] Test with church tax disabled
- [ ] Test with all combinations of inputs

#### Tax Rate Table Mode

- [ ] Test with min=0, max=100,000, step=5,000
- [ ] Test with min=50,000, max=150,000, step=10,000
- [ ] Test with invalid range (min > max)
- [ ] Test with step > (max - min)
- [ ] Verify table displays correctly
- [ ] Verify all rows calculate correctly

#### Comparison Mode

- [ ] Test with two identical scenarios
- [ ] Test with different tax classes
- [ ] Test with different income levels
- [ ] Test with different numbers of children
- [ ] Verify side-by-side comparison displays correctly

### 3. UI/UX Testing

#### Desktop Browsers

- [ ] Chrome (latest)
- [ ] Firefox (latest)
- [ ] Safari (latest)
- [ ] Edge (latest)

#### Mobile Devices

- [ ] iOS Safari (iPhone)
- [ ] iOS Safari (iPad)
- [ ] Android Chrome
- [ ] Responsive design (check breakpoints)

#### Accessibility

- [ ] Keyboard navigation (Tab, Enter, Arrow keys)
- [ ] Screen reader compatibility (NVDA, JAWS, VoiceOver)
- [ ] Focus indicators visible
- [ ] ARIA labels correct
- [ ] Skip to main content link works

#### Form Validation

- [ ] Negative income shows error
- [ ] Invalid tax class handled
- [ ] Invalid year handled
- [ ] Empty fields handled gracefully
- [ ] Error messages display correctly

#### Mode Switching

- [ ] Switching modes preserves inputs where applicable
- [ ] Results update correctly when switching modes
- [ ] Active mode indicator is clear
- [ ] Tab navigation works correctly

### 4. Export Functionality

#### PDF Export

- [ ] Basic mode PDF exports correctly
- [ ] Advanced mode PDF exports correctly
- [ ] Tax Rate Table PDF exports correctly
- [ ] Comparison mode PDF exports correctly
- [ ] PDF includes all inputs
- [ ] PDF includes all results
- [ ] PDF has Ordio branding
- [ ] PDF filename is correct

#### Excel Export

- [ ] Basic mode Excel exports correctly
- [ ] Advanced mode Excel exports correctly
- [ ] Tax Rate Table Excel exports correctly
- [ ] Comparison mode Excel exports correctly
- [ ] Excel includes all inputs
- [ ] Excel includes all results
- [ ] Excel has Ordio branding
- [ ] Excel filename is correct
- [ ] Excel column widths are appropriate

#### Email Gating

- [ ] Email modal appears on first export
- [ ] Email validation works
- [ ] Email submission to HubSpot works
- [ ] Email stored in localStorage
- [ ] Subsequent exports skip email collection
- [ ] Email modal handles errors gracefully

### 5. SEO Testing

#### Schema Markup

- [ ] Validate with Google Rich Results Test
- [ ] WebPage schema is valid
- [ ] BreadcrumbList schema is valid
- [ ] HowTo schema is valid
- [ ] FAQPage schema is valid
- [ ] All FAQs have proper schema

#### Meta Tags

- [ ] Title tag is correct
- [ ] Description tag is correct
- [ ] Keywords tag is present
- [ ] Open Graph tags are correct
- [ ] Twitter Card tags are correct
- [ ] Canonical URL is correct

#### Content

- [ ] FAQ section displays correctly
- [ ] All FAQs are expandable
- [ ] Internal links work correctly
- [ ] Content density is sufficient
- [ ] No duplicate content

### 6. Performance Testing

#### Page Load

- [ ] Initial page load < 3 seconds
- [ ] First Contentful Paint < 1.5 seconds
- [ ] Largest Contentful Paint < 2.5 seconds
- [ ] Time to Interactive < 3.5 seconds

#### Calculation Speed

- [ ] Basic mode calculation < 100ms
- [ ] Advanced mode calculation < 100ms
- [ ] Tax Rate Table calculation < 500ms (for 20 rows)
- [ ] Comparison mode calculation < 200ms

#### Export Generation

- [ ] PDF export < 2 seconds
- [ ] Excel export < 1 second
- [ ] Libraries load only when needed

#### Mobile Performance

- [ ] PageSpeed Insights mobile score > 90
- [ ] No layout shifts (CLS < 0.1)
- [ ] No console errors
- [ ] No network errors

### 7. Edge Cases

- [ ] Income = 0
- [ ] Income = negative (should be prevented)
- [ ] Income = very large (1,000,000€+)
- [ ] Tax class = invalid value
- [ ] Year = invalid value
- [ ] Number of children = negative
- [ ] Number of children > 10
- [ ] Werbungskosten = negative
- [ ] Sonderausgaben = negative
- [ ] Tax Rate Table: min > max
- [ ] Tax Rate Table: step = 0
- [ ] Comparison: empty scenarios

### 8. Browser Console

- [ ] No JavaScript errors
- [ ] No console warnings
- [ ] No console.log statements (production)
- [ ] No network errors
- [ ] No CORS errors

### 9. Cross-Browser Compatibility

- [ ] All features work in Chrome
- [ ] All features work in Firefox
- [ ] All features work in Safari
- [ ] All features work in Edge
- [ ] Calculations are consistent across browsers

### 10. Integration Testing

- [ ] Email submission integrates with HubSpot
- [ ] Export functions work with external libraries
- [ ] Alpine.js component initializes correctly
- [ ] All modules load in correct order
- [ ] No race conditions

## Post-Deployment Testing

### 11. Live Site Testing

- [ ] Page loads at `/tools/einkommensteuer-rechner`
- [ ] All assets load correctly
- [ ] No 404 errors
- [ ] HTTPS works correctly
- [ ] Canonical URL is correct

### 12. Analytics & Tracking

- [ ] Page views tracked correctly
- [ ] Export events tracked correctly
- [ ] Form interactions tracked correctly
- [ ] No tracking errors

## Test Results Template

```
Test Date: YYYY-MM-DD
Tester: [Name]
Browser: [Browser + Version]
Device: [Desktop/Mobile]

Results:
- Calculation Tests: [X/Y passed]
- UI/UX Tests: [X/Y passed]
- Export Tests: [X/Y passed]
- SEO Tests: [X/Y passed]
- Performance Tests: [X/Y passed]

Issues Found:
1. [Issue description]
2. [Issue description]

Notes:
[Additional notes]
```

## Known Issues

None currently identified.

## Test Data Examples

### Basic Mode Test Cases

1. **Low Income**

   - Income: 10,000€
   - Tax Class: I
   - Expected: Tax = 0 (below Grundfreibetrag)

2. **Standard Income**

   - Income: 50,000€
   - Tax Class: I
   - Expected: Tax ≈ 7,470€ (verify with BMF calculator)

3. **High Income**
   - Income: 100,000€
   - Tax Class: I
   - Expected: Tax ≈ 25,000€ (verify with BMF calculator)

### Advanced Mode Test Cases

1. **With Children**

   - Income: 60,000€
   - Tax Class: I
   - Children: 2
   - Expected: Lower taxable income due to Kinderfreibetrag

2. **With Church Tax**

   - Income: 50,000€
   - Tax Class: I
   - Church Tax: Yes
   - State: Bayern
   - Expected: Church tax = 8% of income tax

3. **Custom Deductions**
   - Income: 60,000€
   - Tax Class: I
   - Werbungskosten: 2,000€
   - Sonderausgaben: 500€
   - Expected: Lower taxable income

## Next Steps After Testing

1. Fix any identified issues
2. Re-test fixed issues
3. Update documentation if needed
4. Deploy to production
5. Monitor analytics for errors
6. Collect user feedback
