Skip to content

Testing and Verification

The scaffold itself has no automated test framework, so verification uses a manual process.

  1. Generate a test project

    终端窗口
    npm run dev

    Choose a frontend / backend combination and a project name to generate into the working directory.

  2. Verify the frontend

    终端窗口
    cd <project>/frontend
    npm install
    npm run build

    The build should complete without errors. During development, npm run dev lets you check page rendering and API integration.

  3. Verify the backend

    终端窗口
    # Python
    cd <project>/backend
    uv sync
    JWT_SECRET_KEY="$(openssl rand -base64 48)" uv run uvicorn app.main:app --reload --port 8088
    # Java
    cd <project>/backend
    mvn spring-boot:run

    Confirm the backend starts, initializes the database and writes seed data, and that you can log in with admin / 123456.

  4. Verify Docker

    终端窗口
    docker build -t test .
    docker run -p 5173:5173 -e JWT_SECRET_KEY="$(openssl rand -base64 48)" test

    Visit http://localhost:5173 to confirm the frontend loads and login works.

  1. Log in as an administrator, reorder groups and move an item across groups in menu management, save, refresh, and confirm the order persists.
  2. Create a custom menu, grant it to a role, and confirm it appears in the dynamic sidebar; delete it and confirm its permission and grants disappear.
  3. Export full data, confirm the download and one-time password dialog, and verify the password cannot be displayed again after closing.
  4. Import the archive with the correct password and confirm ordinary APIs return 503 during import and the job ends with success.
  5. After a successful import, confirm old tokens return 401 and an administrator from the archive can log in.
  6. Try a wrong password, damaged archive, and incompatible version; confirm rollback and that ordinary APIs recover.

At minimum, verify the combinations affected by your changes. Because frontend and backend pair freely, when changing a frontend template you should also verify it against both the Python and Java backends; the same applies when changing a backend template.

  • npm run build (scaffold) passes
  • The generated project’s frontend build passes
  • The backend starts and completes initialization
  • admin / 123456 can log in
  • Permission menus display correctly by role
  • Menu ordering, cross-group moves, and custom-menu permissions work
  • The export archive decrypts and contains the full table manifest
  • A successful import freezes ordinary requests and invalidates every session
  • A failed import rolls back and releases the freeze
  • The Docker image builds and runs