# 014 - Testing Infrastructure
## Context
`src/testing/` y `tests/support/` concentran fixtures, helpers de golden tests, roundtrip tests, property tests y fuzz targets.
Fuente: `plan_libreria_xml_generica_rust.md`, secciones "Estrategia de testing" y "Feature flags".
## Dependencies
[x] 002 - Workspace Scaffold.
## Instructions
[x] Crear `src/testing/` para helpers internos.
[x] Crear `tests/support/` para helpers de integracion.
[x] Crear `tests/fixtures/xml`.
[x] Crear `tests/golden`.
[x] Crear helpers para comparar XML serializado.
[x] Crear helpers roundtrip parser/writer.
[x] Agregar property-based tests donde aplique.
[x] Preparar fuzz targets para parser.
[x] Documentar como actualizar golden files.
## Checklist
[x] Fixtures XML simples existen.
[x] Fixtures XML con namespaces existen.
[x] Fixtures XML mal formado existen.
[x] Golden helpers existen.
[x] Roundtrip helpers existen.
[x] Property tests para escaping existen.
[x] Fuzz target inicial para parser existe.
[x] Documentacion de golden tests existe.
## Verification
Ejecutar:
```bash
cargo test testing
cargo test golden
cargo test roundtrip
```
Criterio medible:
[x] Minimo 3 fixtures XML validos.
[x] Minimo 3 fixtures XML invalidos.
[x] Minimo 3 golden files.
[x] Helpers son usados por writer o parser.
## Acceptance Criteria
[x] Los modulos pueden reutilizar fixtures sin duplicarlos.
[x] Los golden tests fallan con diff legible.
[x] La infraestructura no depende de dominios.
## Worklog
[x] Completada. Se implementaron helpers genericos en `src/testing/`, soporte de integracion en `tests/support/`, fixtures XML validos/invalidos, tests de roundtrip, property tests de escaping con `proptest` sin features pesadas, documentacion de golden files y harness inicial de fuzzing para parser. Los tests del writer usan el helper de comparacion golden y se corrigio el roundtrip de processing instructions del parser para evitar acumulacion de espacios.