Files
zugferd-service/tests/fixtures/MANIFEST.md
T
m3ta-chiron ccf8ad67fa
CI / test (push) Canceled after 0s
CI / docker (push) Canceled after 0s
feat(tests): fixture sweep, anonymized real-invoice regression corpus, CI
- test_fixture_sweep: extract+validate every fixture PDF on every run;
  known extractor/validator gaps are catalogued explicitly and the sweep
  fails on any deviation from that catalogue
- tests/fixtures/real/: anonymized XML from real production invoices that
  revealed bugs (verified to contain no real-world data); first entry
  locks in the FC-tax-number/basis-quantity/spaced-VAT-ID regressions
- CI workflow: uv sync --frozen from lockfile + pytest + docker build
2026-09-11 16:06:27 +02:00

64 lines
3.4 KiB
Markdown

# ZUGFeRD Test Fixture Manifest
This directory contains sample PDFs for testing ZUGFeRD extraction and validation.
## Files
| Filename | Profile | Description |
|-----------|----------|-------------|
| EN16931_1_Teilrechnung.pdf | EN16931 | Official FeRD test invoice - partial invoice (Teilrechnung) with full UN/CEFACT data |
| EN16931_Einfach.pdf | EN16931 | Official FeRD test invoice - simple invoice (Einfach) with UN/CEFACT data |
| attributeBasedXMP_zugferd_2p0_EN16931_Einfach.pdf | EN16931 | ZUGFeRD 2.0 EN16931 profile using attribute-based XMP metadata |
| zugferd_invoice.pdf | ZUGFeRD 1.0 | Basic ZUGFeRD v1.0 invoice (likely BASIC or COMFORT profile) |
| validAvoir_FR_type380_BASICWL.pdf | BASIC WL | French credit note (avoir) with BASIC WL profile |
| zugferd_2p1_EXTENDED_PDFA-3A.pdf | EXTENDED | ZUGFeRD 2.1 EXTENDED profile with PDF/A-3A conformance |
| validXRechnung.pdf | XRechnung | German XRechnung format (similar to EN16931 but German profile) |
| ZTESTZUGFERD_1_INVDSS_012015738820PDF-1.pdf | ZUGFeRD 1.0 | Historical ZUGFeRD v1.0 test invoice from 2015 |
| MustangBeispiel20221026.pdf | EN16931 | Modern sample from Mustang project (October 2022) |
| ORDER-X_EX01_ORDER_FULL_DATA-COMFORT.pdf | ORDER-X | Order-X format (related to ZUGFeRD but for orders) |
| EmptyPDFA1.pdf | None | Empty PDF/A-1 document - no ZUGFeRD data (negative test case) |
## Real-World Invoices (anonymized) - `real/`
Anonymized XML from real production invoices that once revealed service bugs.
Each file must contain **no real names, addresses, tax numbers, bank details,
or document numbers** (verified at creation time). Never commit original
invoice PDFs here.
| Filename | Profile | Origin bug |
|-----------|----------|------------|
| extended_fc_steuernummer_basisqty.xml | EXTENDED | FC-only tax registration ignored, unit price with basis quantity 100 misread, spaced VAT ID rejected, contact email dropped (2026-09) |
## Profile Coverage
- **MINIMUM**: Not covered (future addition)
- **BASIC**: Covered by `zugferd_invoice.pdf`
- **BASIC WL**: Covered by `validAvoir_FR_type380_BASICWL.pdf`
- **EN16931**: Covered by multiple samples
- **EXTENDED**: Covered by `zugferd_2p1_EXTENDED_PDFA-3A.pdf`
- **None (negative test)**: Covered by `EmptyPDFA1.pdf`
## Version Coverage
- ZUGFeRD 1.0: `ZTESTZUGFERD_1_INVDSS_012015738820PDF-1.pdf`, `zugferd_invoice.pdf`
- ZUGFeRD 2.0: `attributeBasedXMP_zugferd_2p0_EN16931_Einfach.pdf`
- ZUGFeRD 2.1: `zugferd_2p1_EXTENDED_PDFA-3A.pdf`
- XRechnung: `validXRechnung.pdf`
## Source URLs
- ZUGFeRD Mustang project: https://github.com/ZUGFeRD/mustangproject
- Library test resources: `library/src/test/resources/`
- Validator test resources: `validator/src/test/resources/`
- CLI test resources: `Mustang-CLI/src/test/resources/`
- FeRD test invoices: https://www.ferd-net.de/download/testrechnungen (URL was 404 - samples obtained from Mustang project)
- factur-x library tests: https://github.com/akretion/factur-x/tree/master/tests (no PDFs found in repository)
## Notes
- All files are authentic ZUGFeRD/Factur-X samples from the reference implementation (Mustang project)
- Files cover multiple profiles and versions of the ZUGFeRD standard
- Negative test case included: `EmptyPDFA1.pdf` is a valid PDF/A-1 but contains no ZUGFeRD XML data
- ORDER-X sample included for completeness, though it's a different but related format
- File sizes range from 38KB to 684KB