Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 5 additions & 23 deletions tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ everything that needs a JVM, an external oracle, or a running engine.
| XLSForm fixture inputs are valid XLSForm | external oracle ([pyxform](https://github.com/XLSForm/pyxform)) | pytest — `tests/validation/test_xlsform_pyxform.py` |
| LimeSurvey accepts the blessed TSV snapshots | live LimeSurvey (docker) | pytest — `tests/live/limesurvey/test_registry_entities.py` |
| What LimeSurvey *stores* when a respondent answers | live LimeSurvey (docker) + Playwright | pytest — `tests/live/limesurvey/test_response_roundtrip.py` |
| qwacback's Go converter emits the same DDI shape as `buildDdiXml` | live qwacback (docker) | pytest — `tests/live/qwacback/test_qwacback_equivalence.py` |

qwacback still runs its own Go XLSForm → DDI converter. It plans to replace it
with this library ([qwacback#3](https://github.com/CorrelAid/qwacback/issues/3)), and the
equivalence test is the parity check for that swap. After the swap it compares
the library with itself and can go.
qwacback converts XLSForm → DDI with this library since
[qwacback#3](https://github.com/CorrelAid/qwacback/issues/3) (a `ddi-emitter`
sidecar). The qwacback equivalence test that guarded that swap (ported from
survey2ddi in formtransform#14) was retired afterwards: it compared the library
with itself. qwacback keeps its own equivalence check for its wiring (`scripts/equivalence-test.mjs`, `internal/converter/ddi_client_test.go` there).

## Layout

Expand Down Expand Up @@ -65,9 +65,6 @@ tests/
answers/<slug>.json # what the respondent enters
expected/<slug>.json # blessed exported response
output/ # generated TSVs (gitignored)
qwacback/
docker-compose.yml # qwacback alone (public ghcr image; QWACBACK_IMAGE overrides)
test_qwacback_equivalence.py # same XLSForm → buildDdiXml vs. qwacback, DDI shape compared
build_ddi.mjs # buildDdiXml from dist/ over stdin/stdout
fixtures/surveys/<name>/ # one folder per whole survey, like a registry entity
xlsform.json | xlsform.xlsx # authored source
Expand Down Expand Up @@ -183,21 +180,6 @@ one — a note stores nothing, and the blessed snapshot records that).
Needs node + Playwright/Chromium on top of the docker stack; skips if Playwright
is not resolvable (locally or globally).

### qwacback equivalence (`tests/live/qwacback/test_qwacback_equivalence.py`)

Ported from survey2ddi (formtransform#14). For every answer type qwacback
supports, the same XLSForm goes through `buildDdiXml` and qwacback's
`POST /api/convert/xlsform-to-ddi`, and the `<var>`/`<varGrp>` shapes are
compared. qwacback returns a bare `<var>` or `<varGrp>` when there's only one,
so the test wraps it in a `<dataDscr>`. `note` is a strict xfail, by design:
formtransform emits no `<var>` for a note.

The fixture starts qwacback from its own compose file, or uses `QWACBACK_URL`.
It pulls the public `ghcr.io/correlaid/qwacback:latest`. To test an unreleased
qwacback, build it (`docker build -t qwacback:local ../qwacback`) and set
`QWACBACK_IMAGE=qwacback:local`. If the image can't be pulled, the tests skip
with that reason.

## Running

```bash
Expand Down
8 changes: 0 additions & 8 deletions tests/live/qwacback/build_ddi.mjs

This file was deleted.

120 changes: 0 additions & 120 deletions tests/live/qwacback/conftest.py

This file was deleted.

23 changes: 0 additions & 23 deletions tests/live/qwacback/docker-compose.yml

This file was deleted.

Loading
Loading