Pewarta Proxy

📋 Server Request & Proxy Logs

Loading active proxy settings...
Developed by Khairul Adha (adhexa.id)
Mengambil log server...

⚙️ Pengaturan Proxy Target

Skip to content

test: end-to-end coverage of the record -> synthesize -> export chain - #66

Merged
chen3feng merged 1 commit into
mainfrom
test/e2e-main-chain
Oct 30, 2026
Merged

chen3feng merged 1 commit into
mainfrom
test/e2e-main-chain

Conversation

@chen3feng

Copy link
Copy Markdown
Owner

Part of #41 (server side; browser automation split out).

Why

smoke-test.sh checks features one at a time — health, engines, settings, synthesis, mp3, profiles, pairing. Nothing drove them in sequence, and /api/transcribe had no automated coverage at all, even though it is what fills the transcript field for cloned voices.

What

New scripts/e2e-test.sh walks the chain a user walks:

Step Call Assertion
record bundled ZipVoice test clip file exists, server healthy
transcribe POST /api/transcribe 200, ≥5 chars, transcript mentions 武汉 (the clip is about 武汉大学)
synthesize POST /api/engines/<id>/synthesize 200 + RIFF, using the ASR transcript as prompt_text
history GET /api/history[/{id}/audio] the new entry appears; WAV and MP3 both valid
export POST /api/profiles → GET …/export → DELETE → POST …/import zip starts with PK, re-import reports imported:1

It fails instead of skipping when SenseVoice is absent — skipping would hide the one link no other test covers — and removes the history entry and voices it created.

CI: the smoke job now downloads and caches SenseVoice (234 MB, keyed on download-stt.sh) and runs the script after the smoke sweep. Docs updated in both languages.

Local result

Against the 15-engine install on this machine (M4 Pro): 12 passed, 0 failed, transcript 那还是36年前,1987年,我呢考上了武汉大学的计算机系。

Not included

Browser-level UI automation (the second checkbox in #41). That needs a Node/Playwright toolchain beside a Rust repo whose UI is one static file; worth its own issue rather than smuggling Node into CI here.

Issue #41 asked for the main chain to be exercised automatically. The
smoke test sweeps features one at a time; nothing drove them in sequence,
and transcription in particular had no automated coverage at all.

`scripts/e2e-test.sh` walks the chain a user walks, against a running
server:

  record      a bundled ZipVoice test clip stands in for the microphone
  transcribe  POST /api/transcribe, then assert the text mentions 武汉
  synthesize  feed that transcript back as prompt_text, so the clone runs
              on machine output rather than a hand-written string
  export      history WAV and MP3, then a voice package that is exported,
              deleted and re-imported

It fails hard when the STT model is missing instead of skipping (that
would hide the one link nothing else covers), and it deletes the history
entry and voices it created.

CI's smoke job now downloads and caches SenseVoice and runs the script
after the smoke sweep.

Verified locally against the 15-engine install: 12 passed, 0 failed.

Browser-level UI automation is deliberately not included: it would add a
Node/Playwright toolchain to a Rust repo whose UI is one static file. Left
to its own issue.
@chen3feng
chen3feng merged commit 24d0c5e into main Oct 30, 2026
4 checks passed
@chen3feng
chen3feng deleted the test/e2e-main-chain branch October 30, 2026 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant