# Prozentrechner 2026 - Next Steps & Testing Guide

**Last Updated:** 2026-04-01

## 2026-04-01 SEO / AEO sprint (completed in repo)

- GSC query export: `docs/content/tools/prozentrechner/data/gsc-queries.json`; notes: `data/gsc-compare-notes.md`.
- **Metrics anchor:** [`docs/content/tools/prozentrechner/DATA_DRIVEN_SYNTHESIS.md`](../../content/tools/prozentrechner/DATA_DRIVEN_SYNTHESIS.md) — SISTRIX + GSC page + GA4 + top queries from committed JSON; regenerate after each export refresh (`generate-tool-data-synthesis.php`, see [DATA_COLLECTION_TOOLS.md](../../content/tools/DATA_COLLECTION_TOOLS.md) § *Per-tool synthesis*).
- PAA filtered in `data/paa-questions.json` (on-topic vs noise).
- Meta, OG, hero, JSON-LD (`WebPage` / `WebApplication`), SEO blocks (Rechenweg, cluster links), FAQ JSON (13 Fragen), `<!-- SEO Content Sections -->` marker for validators.
- Content expansion: Intent-Keywords, Rechenweg-Beispiele, Cluster-Links (Lexikon, Payroll, Zinseszins), Excel-Komma-Hinweis, Trust-Zeile CSV.

### Pending (blocked on deploy or manual QA)

| Item | Status | Notes |
|------|--------|--------|
| **Production HTML** zeigt neues `<title>` / Meta | Pending deploy | **Spotcheck 2026-04-01:** Live = `Prozentrechner 2026: Prozente berechnen - Ordio`; Repo (`tools_prozentrechner.php`) = `Prozentrechner online – 8 Modi, Rabatt, MwSt, Excel \| Ordio`. Nach Deploy erneut prüfen. |
| **Google Rich Results Test** | Pending (manuell) | [Rich Results Test](https://search.google.com/test/rich-results) mit `https://www.ordio.com/tools/prozentrechner` **nach Deploy** — FAQPage + WebApplication + HowTo prüfen. |
| **Manuelles UI-Testing** (Checklisten §1–16) | Optional vor Major-Release | Logik ist durch `test-prozentrechner-calculations.js` (50/50) abgedeckt; Browser-Export/Modal siehe Stichproben. |

### Repo verification (automated, 2026-04-01)

Erledigt: `test-prozentrechner-calculations.js` (50/50), `validate-tool-content-completeness.php --tool=prozentrechner`, `verify-faq-jsonld-parity.php --file=tools-faqs/prozentrechner.json`, `audit-tools-content-blocks.py prozentrechner --format-check`. `DATA_DRIVEN_SYNTHESIS.md` per `generate-tool-data-synthesis.php --tool=prozentrechner` aktualisiert.

### Next steps (after deploy)

1. **Sofort nach Release:** Rich Results Test (siehe oben); Stichprobe Mobile (Tabs, Export-Modal); Live-`<title>`/Meta mit Repo abgleichen.
2. **4–8 Wochen:** Globale Collectors (`collect-tools-performance-gsc.php`, `collect-tools-performance-ga4.php`; optional GA4 `--compare-28d`). Pro-URL Queries: `collect-tool-gsc-queries.php --tool=prozentrechner`; für Zeitraum-Vergleich zweites Export mit `--start`/`--end` und Diff: `compare-gsc-query-exports.php` — [PAGE_IMPROVEMENT_ITERATION_CHECKLIST.md](../../content/PAGE_IMPROVEMENT_ITERATION_CHECKLIST.md) §2. Synthesis neu: `generate-tool-data-synthesis.php --tool=prozentrechner --output=docs/content/tools/prozentrechner/DATA_DRIVEN_SYNTHESIS.md` (optional `--gsc-queries-compare=`).
3. **Termin:** Review-Termin im Kalender setzen (z. B. **~2026-06-01** für 8 Wochen ab Anfang April).

### Automated verification (lokal / CI — 2026-04-01)

```bash
node v2/scripts/dev-helpers/test-prozentrechner-calculations.js   # 50/50
php v2/scripts/tools/validate-tool-content-completeness.php --tool=prozentrechner
php v2/scripts/dev-helpers/verify-faq-jsonld-parity.php --file=tools-faqs/prozentrechner.json
python3 v2/scripts/tools/audit-tools-content-blocks.py prozentrechner --format-check
php v2/scripts/tools/audit-tools-faq-schema-status.php
```

- **Console:** `grep -E 'console\.(log|error|warn)' v2/js/tools-prozentrechner-calculator.js` → soll leer sein.

## Overview

This document provides comprehensive manual testing instructions and deployment checklist for the Prozentrechner 2026 update.

## Pre-Deployment Checklist

### Code Changes

- [x] Schema `dateCreated` updated (2026-04-01 SEO sprint; WebApplication) ✅
- [x] VAT tooltip enhanced with restaurant food clarification ✅
- [x] All calculation formulas verified correct ✅
- [x] Test suite created and all tests passing (50/50) ✅
- [x] No console statements in production code ✅

### Content Updates

- [x] VAT tooltip updated with restaurant food clarification ✅
- [x] **13** FAQs in `v2/data/tools-faqs/prozentrechner.json` (JSON-LD parity script OK) ✅
- [x] Schema markup present in repo (WebApplication, Calculator, FAQPage via Footer-Script, HowTo) ✅
- [ ] **Google Rich Results Test** auf `https://www.ordio.com/tools/prozentrechner` nach Deploy (manuell)

### Documentation

- [x] Main documentation updated ✅
- [x] Research report updated ✅
- [x] Tool-by-tool analysis updated ✅
- [x] Update summary created ✅

## Manual Testing Checklist

### 1. Basic Percentage Mode Testing

**Test Case 1.1: Standard Calculation**
- [ ] Enter percentage: 20
- [ ] Enter base value: 100
- [ ] Verify result: 20
- [ ] Verify formula displays correctly

**Test Case 1.2: Decimal Percentage**
- [ ] Enter percentage: 15.5
- [ ] Enter base value: 200
- [ ] Verify result: 31
- [ ] Verify rounding is correct

**Test Case 1.3: Zero Percent**
- [ ] Enter percentage: 0
- [ ] Enter base value: 100
- [ ] Verify result: 0

**Test Case 1.4: 100 Percent**
- [ ] Enter percentage: 100
- [ ] Enter base value: 100
- [ ] Verify result: 100

**Test Case 1.5: Edge Cases**
- [ ] Enter percentage > 100 (should show validation error)
- [ ] Enter negative percentage (should show validation error)
- [ ] Enter zero base value (should work, result = 0)
- [ ] Enter very large numbers (verify precision)

### 2. Reverse Percentage Mode Testing

**Test Case 2.1: Standard Calculation**
- [ ] Enter part: 25
- [ ] Enter whole: 100
- [ ] Verify result: 25%
- [ ] Verify formula displays correctly

**Test Case 2.2: Part Equals Whole**
- [ ] Enter part: 100
- [ ] Enter whole: 100
- [ ] Verify result: 100%

**Test Case 2.3: Part Greater Than Whole**
- [ ] Enter part: 150
- [ ] Enter whole: 100
- [ ] Verify result: 150%

**Test Case 2.4: Division by Zero Protection**
- [ ] Enter part: 25
- [ ] Enter whole: 0
- [ ] Verify error message: "Der Gesamtwert darf nicht 0 sein."

### 3. Percentage Change Mode Testing

**Test Case 3.1: Increase**
- [ ] Enter old value: 3000
- [ ] Enter new value: 3300
- [ ] Verify result: 10% increase
- [ ] Verify change type shows "increase"

**Test Case 3.2: Decrease**
- [ ] Enter old value: 50
- [ ] Enter new value: 45
- [ ] Verify result: -10% decrease
- [ ] Verify change type shows "decrease"

**Test Case 3.3: No Change**
- [ ] Enter old value: 100
- [ ] Enter new value: 100
- [ ] Verify result: 0%
- [ ] Verify change type shows "no-change"

**Test Case 3.4: Division by Zero Protection**
- [ ] Enter old value: 0
- [ ] Enter new value: 100
- [ ] Verify error message: "Der Ausgangswert darf nicht 0 sein."

### 4. Percentage Difference Mode Testing

**Test Case 4.1: Standard Calculation**
- [ ] Enter value 1: 80
- [ ] Enter value 2: 100
- [ ] Verify result: 22.22%
- [ ] Verify formula displays correctly

**Test Case 4.2: Identical Values**
- [ ] Enter value 1: 100
- [ ] Enter value 2: 100
- [ ] Verify result: 0%

**Test Case 4.3: Both Zero**
- [ ] Enter value 1: 0
- [ ] Enter value 2: 0
- [ ] Verify result: 0%

**Test Case 4.4: Very Different Values**
- [ ] Enter value 1: 10
- [ ] Enter value 2: 1000
- [ ] Verify result: 196.04%
- [ ] Verify calculation accuracy

### 5. Compound Percentage Mode Testing

**Test Case 5.1: Standard Calculation**
- [ ] Enter initial value: 1000
- [ ] Enter percentage: 5
- [ ] Enter periods: 3
- [ ] Verify result: 1157.63
- [ ] Verify breakdown table shows all periods
- [ ] Verify breakdown calculations are correct

**Test Case 5.2: One Period**
- [ ] Enter initial value: 1000
- [ ] Enter percentage: 5
- [ ] Enter periods: 1
- [ ] Verify result: 1050
- [ ] Verify breakdown table shows 1 period

**Test Case 5.3: Zero Periods**
- [ ] Enter initial value: 1000
- [ ] Enter percentage: 5
- [ ] Enter periods: 0
- [ ] Verify error message: "Die Anzahl der Perioden muss mindestens 1 sein."

**Test Case 5.4: Negative Percentage**
- [ ] Enter initial value: 1000
- [ ] Enter percentage: -5
- [ ] Enter periods: 3
- [ ] Verify result: 857.37
- [ ] Verify breakdown shows decreasing values

**Test Case 5.5: Decimal Periods**
- [ ] Enter initial value: 1000
- [ ] Enter percentage: 5
- [ ] Enter periods: 3.5
- [ ] Verify error message: "Die Anzahl der Perioden muss eine ganze Zahl sein."

### 6. Discount Calculator Mode Testing

**Test Case 6.1: Standard Calculation**
- [ ] Enter original price: 100
- [ ] Enter discount percentage: 20
- [ ] Verify discount amount: 20€
- [ ] Verify final price: 80€
- [ ] Verify savings percentage displays correctly

**Test Case 6.2: Zero Discount**
- [ ] Enter original price: 100
- [ ] Enter discount percentage: 0
- [ ] Verify discount amount: 0€
- [ ] Verify final price: 100€

**Test Case 6.3: 100% Discount**
- [ ] Enter original price: 100
- [ ] Enter discount percentage: 100
- [ ] Verify discount amount: 100€
- [ ] Verify final price: 0€

**Test Case 6.4: Decimal Discount**
- [ ] Enter original price: 100
- [ ] Enter discount percentage: 15.5
- [ ] Verify discount amount: 15.5€
- [ ] Verify final price: 84.5€

**Test Case 6.5: Edge Cases**
- [ ] Enter discount > 100% (should show validation error)
- [ ] Enter negative discount (should show validation error)
- [ ] Enter zero original price (should work, result = 0)

### 7. VAT Calculator Mode Testing

**Test Case 7.1: Net to Gross (19%)**
- [ ] Select "Netto → Brutto"
- [ ] Select VAT rate: 19%
- [ ] Enter net price: 100
- [ ] Verify gross price: 119€
- [ ] Verify VAT amount: 19€
- [ ] Verify formula displays correctly

**Test Case 7.2: Net to Gross (7%)**
- [ ] Select "Netto → Brutto"
- [ ] Select VAT rate: 7%
- [ ] Enter net price: 100
- [ ] Verify gross price: 107€
- [ ] Verify VAT amount: 7€

**Test Case 7.3: Gross to Net (19%)**
- [ ] Select "Brutto → Netto"
- [ ] Select VAT rate: 19%
- [ ] Enter gross price: 119
- [ ] Verify net price: 100€
- [ ] Verify VAT amount: 19€

**Test Case 7.4: Gross to Net (7%)**
- [ ] Select "Brutto → Netto"
- [ ] Select VAT rate: 7%
- [ ] Enter gross price: 107
- [ ] Verify net price: 100€
- [ ] Verify VAT amount: 7€

**Test Case 7.5: Zero Net Price**
- [ ] Select "Netto → Brutto"
- [ ] Select VAT rate: 19%
- [ ] Enter net price: 0
- [ ] Verify gross price: 0€
- [ ] Verify VAT amount: 0€

**Test Case 7.6: Large Price**
- [ ] Select "Netto → Brutto"
- [ ] Select VAT rate: 19%
- [ ] Enter net price: 1000000
- [ ] Verify gross price: 1190000€
- [ ] Verify VAT amount: 190000€

**Test Case 7.7: VAT Tooltip**
- [ ] Hover over VAT rate info icon
- [ ] Verify tooltip shows restaurant food clarification
- [ ] Verify tooltip mentions "Seit 2026 gilt für Speisen in Restaurants, Cafés und Catering dauerhaft der ermäßigte Satz von 7%."

### 8. Profit Margin Mode Testing

**Test Case 8.1: Standard Calculation**
- [ ] Enter cost price: 50
- [ ] Enter selling price: 75
- [ ] Verify profit amount: 25€
- [ ] Verify profit margin: 33.33%
- [ ] Verify markup: 50%
- [ ] Verify formula displays correctly

**Test Case 8.2: Equal Prices**
- [ ] Enter cost price: 100
- [ ] Enter selling price: 100
- [ ] Verify error message: "Verkaufspreis muss höher als Einkaufspreis sein."

**Test Case 8.3: Selling Less Than Cost**
- [ ] Enter cost price: 100
- [ ] Enter selling price: 50
- [ ] Verify error message: "Verkaufspreis muss höher als Einkaufspreis sein."

**Test Case 8.4: Very Small Margin**
- [ ] Enter cost price: 100
- [ ] Enter selling price: 101
- [ ] Verify profit amount: 1€
- [ ] Verify profit margin: 0.99%
- [ ] Verify markup: 1%

**Test Case 8.5: Large Margin**
- [ ] Enter cost price: 20
- [ ] Enter selling price: 100
- [ ] Verify profit amount: 80€
- [ ] Verify profit margin: 80%
- [ ] Verify markup: 400%

### 9. Export Functionality Testing

**Test Case 9.1: Excel Export**
- [ ] Perform a calculation in any mode
- [ ] Click "Excel exportieren"
- [ ] If first export: Verify email modal appears
- [ ] Enter name and email
- [ ] Submit email
- [ ] Verify Excel file downloads
- [ ] Open Excel file and verify:
  - [ ] Input values are correct
  - [ ] Results are correct
  - [ ] Formulas are included
  - [ ] Formatting is correct

**Test Case 9.2: PDF Export**
- [ ] Perform a calculation in any mode
- [ ] Click "PDF exportieren"
- [ ] If first export: Verify email modal appears
- [ ] Enter name and email (if not already collected)
- [ ] Submit email
- [ ] Verify PDF generates
- [ ] Open PDF and verify:
  - [ ] Content is readable
  - [ ] Calculations are correct
  - [ ] Formatting is correct

**Test Case 9.3: CSV Export**
- [ ] Perform a calculation in any mode
- [ ] Click "CSV exportieren"
- [ ] Verify CSV file downloads
- [ ] Open CSV file and verify:
  - [ ] Data is correctly formatted
  - [ ] Values are correct

**Test Case 9.4: Email Gating**
- [ ] Clear localStorage (to simulate first-time user)
- [ ] Perform a calculation
- [ ] Click any export button
- [ ] Verify email modal appears
- [ ] Enter invalid email (should show error)
- [ ] Enter valid email
- [ ] Submit
- [ ] Verify export proceeds
- [ ] Verify email is stored in localStorage
- [ ] Try another export (should not show modal again)

### 10. Calculation History Testing

**Test Case 10.1: History Storage**
- [ ] Perform multiple calculations in different modes
- [ ] Verify calculations are added to history
- [ ] Verify history sidebar shows calculations
- [ ] Verify timestamps are displayed correctly

**Test Case 10.2: History Restore**
- [ ] Click on a history item
- [ ] Verify inputs are restored
- [ ] Verify calculation runs automatically
- [ ] Verify results display correctly

**Test Case 10.3: History Export**
- [ ] Perform multiple calculations
- [ ] Click "Verlauf als CSV exportieren"
- [ ] Verify CSV file downloads with all history items

**Test Case 10.4: History Deletion**
- [ ] Click delete button on a history item
- [ ] Verify item is removed
- [ ] Click "Verlauf löschen"
- [ ] Confirm deletion
- [ ] Verify all history is cleared

### 11. Sharing Functionality Testing

**Test Case 11.1: URL Sharing**
- [ ] Perform a calculation
- [ ] Click "Teilen"
- [ ] Verify URL is copied to clipboard
- [ ] Open URL in new tab
- [ ] Verify calculation loads correctly
- [ ] Verify inputs are restored from URL parameters

**Test Case 11.2: Web Share API**
- [ ] Perform a calculation on mobile device
- [ ] Click "Teilen"
- [ ] Verify native share dialog appears (if supported)
- [ ] Test sharing via different apps

### 12. Responsive Design Testing

**Test Case 12.1: Mobile (375px width)**
- [ ] Test all 8 calculation modes
- [ ] Verify tab navigation works
- [ ] Verify inputs are usable
- [ ] Verify results display correctly
- [ ] Verify export buttons are accessible
- [ ] Verify history sidebar works

**Test Case 12.2: Tablet (768px width)**
- [ ] Test all 8 calculation modes
- [ ] Verify layout adapts correctly
- [ ] Verify all features work

**Test Case 12.3: Desktop (1920px width)**
- [ ] Test all 8 calculation modes
- [ ] Verify layout is optimal
- [ ] Verify all features work

### 13. Quick Examples Testing

**Test Case 13.1: Example Selection**
- [ ] Click on "Schnellbeispiele"
- [ ] Verify examples panel expands
- [ ] Click on an example
- [ ] Verify inputs are populated
- [ ] Verify calculation runs automatically
- [ ] Verify results display correctly

**Test Case 13.2: Mode-Specific Examples**
- [ ] Switch to each mode
- [ ] Verify examples change based on mode
- [ ] Test applying examples in each mode

### 14. Schema Validation

**Test Case 14.1: Google Rich Results Test**
- [ ] Go to: https://search.google.com/test/rich-results
- [ ] Enter URL: https://www.ordio.com/tools/prozentrechner
- [ ] Verify FAQPage schema validates
- [ ] Verify all 12 FAQs appear correctly
- [ ] Verify FAQ answers match content exactly

**Test Case 14.2: WebApplication Schema**
- [ ] Verify WebApplication schema is present
- [ ] Verify schema contains correct name, description
- [ ] Verify schema contains correct applicationCategory
- [ ] Verify schema contains correct offers (price: 0)
- [ ] Verify dateCreated is 2026-01-21

**Test Case 14.3: Calculator Schema**
- [ ] Verify Calculator schema is present
- [ ] Verify schema contains correct name, description
- [ ] Verify schema contains correct URL

**Test Case 14.4: HowTo Schema**
- [ ] Verify HowTo schema is present
- [ ] Verify all 3 steps are included
- [ ] Verify totalTime is "PT1M"
- [ ] Verify URLs are correct

### 15. Performance Testing

**Test Case 15.1: Calculation Speed**
- [ ] Enter values rapidly
- [ ] Verify calculations are instant
- [ ] Verify no lag or delays
- [ ] Verify debounce works correctly (300ms)

**Test Case 15.2: Large Numbers**
- [ ] Enter very large numbers (millions)
- [ ] Verify calculations are fast
- [ ] Verify precision is maintained

**Test Case 15.3: Browser Compatibility**
- [ ] Test in Chrome (latest)
- [ ] Test in Firefox (latest)
- [ ] Test in Safari (latest)
- [ ] Test in Edge (latest)

### 16. Error Handling Testing

**Test Case 16.1: Invalid Inputs**
- [ ] Enter non-numeric characters
- [ ] Verify appropriate error messages
- [ ] Enter negative values where not allowed
- [ ] Verify validation errors
- [ ] Enter values exceeding limits
- [ ] Verify validation errors

**Test Case 16.2: Missing Dependencies**
- [ ] Verify calculator works if Alpine.js loads slowly
- [ ] Verify error handling if libraries fail to load
- [ ] Verify graceful degradation

## Deployment Checklist

### Pre-Deployment

- [x] Run automated test suite: `node v2/scripts/dev-helpers/test-prozentrechner-calculations.js` (2026-04-01: 50/50) ✅
- [x] Verify all tests pass (50/50) ✅
- [ ] Review all code changes *(PR / Diff — vor Merge)*
- [x] Verify no console statements in production JS (`tools-prozentrechner-calculator.js` grep leer) ✅
- [x] JSON-LD / FAQ: `verify-faq-jsonld-parity.php --file=tools-faqs/prozentrechner.json` ✅ — **Rich Results auf Live nach Deploy**
- [x] Dokumentation: `prozentrechner-documentation.md`, dieser Guide, Backlog ✅

### Deployment Steps

1. [ ] Deploy code changes to staging
2. [ ] Run manual testing checklist (all test cases)
3. [ ] Verify schema validation (Google Rich Results Test)
4. [ ] Test on multiple browsers
5. [ ] Test on mobile devices
6. [ ] Verify export functionality works
7. [ ] Verify email gating works
8. [ ] Deploy to production

### Post-Deployment

- [ ] Verify page loads correctly
- [ ] Verify all 8 calculation modes work
- [ ] Verify schema validation passes
- [ ] Monitor for errors
- [ ] Verify exports work correctly
- [ ] Verify email collection works

## Verification Commands

**Run Automated Tests:**
```bash
node v2/scripts/dev-helpers/test-prozentrechner-calculations.js
```

**Check for Console Statements:**
```bash
grep -r "console\.\(log\|error\|warn\|debug\|info\)" v2/js/tools-prozentrechner-calculator.js
```

**Validate Schema JSON:**
```bash
# Extract schema from PHP file and validate
# Or use online JSON validator
```

**Check File Sizes:**
```bash
ls -lh v2/js/tools-prozentrechner-calculator.min.js
ls -lh v2/pages/tools_prozentrechner.php
```

## Summary

The Prozentrechner is updated for 2026 including the **2026-04-01 SEO/AEO sprint** (meta, Inhalte, 13 FAQs, Validatoren). **Automated calculation tests** pass (50/50). **Deploy** when ready; dann **Rich Results Test** auf Production und **GSC/GA-Review** in 4–8 Wochen (siehe „Next steps“ oben). Die lange **manuelle Checkliste** (§1–16) bleibt für Voll-Regression oder große UX-Änderungen optional.
