fix(robot): resolve suite setup hangs and RF7 syntax errors

- Replace blocking Run Process with Start Process for uvicorn server
- Fix RF7 IF condition syntax: ${status_code} → $status_code
- Add bash wrapper script for reliable conda env server startup
- Add Create Anonymous Session to suite setup for health check polling
- Simplify .gitignore for robot results
This commit is contained in:
2026-06-23 20:25:47 +02:00
parent 572aa0fc78
commit b5e2ba4ac4
4 changed files with 11 additions and 11 deletions

View File

@@ -9,6 +9,7 @@ Resource ${CURDIR}/resources/common.resource
Suite Setup Run Keywords
... Start Aniworld Server
... AND Create Anonymous Session
... AND Wait For Server
... AND Initialize Browser

View File

@@ -26,14 +26,12 @@ ${SERVER_PROCESS} ${EMPTY}
# ---------------------------------------------------------------------------
Start Aniworld Server
[Documentation] Start the FastAPI uvicorn server as a background process.
${result}= Run Process conda run -n AniWorld python -m uvicorn src.server.fastapi_app:app
... --host ${SERVER_HOST} --port ${SERVER_PORT}
... --no-access-log
${handle}= Start Process bash /home/lukas/Volume/repo/Aniworld/tests/robot/start_server.sh
... cwd=/home/lukas/Volume/repo/Aniworld
... stdout=${CURDIR}/../fixtures/server_stdout.log
... stderr=${CURDIR}/../fixtures/server_stderr.log
Set Suite Variable ${SERVER_PROCESS} ${result}
Sleep 3s
Set Suite Variable ${SERVER_PROCESS} ${handle}
Sleep 5s
Stop Aniworld Server
[Documentation] Terminate the uvicorn server process and clean up log files.
@@ -49,8 +47,8 @@ Wait For Server
${resp}= Run Keyword And Ignore Error
... GET On Session anon /health expected_status=any
IF '${resp}[0]' == 'PASS'
${status_code}= Set Variable ${resp}[1].status_code
IF ${status_code} == 200 or ${status_code} == 503
${status_code}= Evaluate $resp[1].status_code
IF $status_code == 200 or $status_code == 503
RETURN
END
END

View File

@@ -0,0 +1,4 @@
#!/bin/bash
# Wrapper script to start the Aniworld FastAPI server for Robot Framework tests
cd /home/lukas/Volume/repo/Aniworld
exec /home/lukas/miniconda3/envs/AniWorld/bin/python -m uvicorn src.server.fastapi_app:app --host 127.0.0.1 --port 8765 --no-access-log