Files
ZNJJ-api-server/test/golden
2026-07-28 13:45:43 +08:00
..
2026-07-28 13:45:43 +08:00
2026-07-28 13:45:43 +08:00

Stage-code golden tests

These tests call the running FastAPI service and its configured FastGPT workflow. Each conversation step asserts only the nextStageCode carried by the SSE stage_code event.

Edit cases.json to add or update conversation cases:

{
  "name": "example",
  "clientMode": "browser_addon",
  "steps": [
    {
      "text": "继续",
      "expect": {
        "stageCode": "browser_addon.1002"
      }
    }
  ]
}

Start the API, then run:

RUN_GOLDEN=1 \
GOLDEN_BASE_URL=http://127.0.0.1:8000 \
pytest -m golden_live test/golden -v

Without RUN_GOLDEN=1, the cases are skipped and do not make network calls.