Files
Aniworld/output.xml
Lukas 9b6702c5fb fix(api): update logging config test for new response schema
API now returns {success, config} instead of flat logging keys.
Extract config dict before checking keys level, log_file, max_bytes, backup_count.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-28 16:15:27 +02:00

188 lines
7.5 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<robot generator="Robot 7.4.2 (Python 3.13.5 on linux)" generated="2026-06-28T16:12:10.090647" rpa="false" schemaversion="5">
<suite id="s1" name="Health" source="/home/lukas/Volume/repo/Aniworld/tests/robot/api/health.robot">
<test id="s1-t1" name="Basic Health Check" line="15">
<kw name="Create Anonymous Session" owner="common" type="SETUP">
<kw name="Create Session" owner="RequestsLibrary">
<arg>anon</arg>
<arg>${BASE_URL}</arg>
<doc>Create Session: create a HTTP session to a server</doc>
<status status="NOT RUN" start="2026-06-28T16:12:10.302138" elapsed="0.000220"/>
</kw>
<doc>Create an unauthenticated HTTP session.</doc>
<status status="PASS" start="2026-06-28T16:12:10.301514" elapsed="0.000918"/>
</kw>
<kw name="GET On Session" owner="RequestsLibrary">
<var>${resp}</var>
<arg>anon</arg>
<arg>/health</arg>
<arg>expected_status=200</arg>
<doc>Sends a GET request on a previously created HTTP Session.</doc>
<status status="NOT RUN" start="2026-06-28T16:12:10.302534" elapsed="0.000105"/>
</kw>
<kw name="Response Should Have Status" owner="common">
<kw name="Should Be Equal As Integers" owner="BuiltIn">
<arg>${response.status_code}</arg>
<arg>${expected_status}</arg>
<doc>Fails if objects are unequal after converting them to integers.</doc>
<status status="NOT RUN" start="2026-06-28T16:12:10.302971" elapsed="0.000209"/>
</kw>
<arg>${resp}</arg>
<arg>200</arg>
<doc>Assert that the response status code matches the expected value.</doc>
<status status="PASS" start="2026-06-28T16:12:10.302768" elapsed="0.000454"/>
</kw>
<kw name="Get JSON Value" owner="api_keywords">
<kw name="Convert String To Json" owner="JSONLibrary">
<var>${json}</var>
<arg>${response.text}</arg>
<doc>Convert String to JSON object</doc>
<status status="NOT RUN" start="2026-06-28T16:12:10.303565" elapsed="0.000102"/>
</kw>
<kw name="Get Value From Json" owner="JSONLibrary">
<var>${values}</var>
<arg>${json}</arg>
<arg>${json_path}</arg>
<doc>Get Value From JSON using JSONPath</doc>
<status status="NOT RUN" start="2026-06-28T16:12:10.303766" elapsed="0.000122"/>
</kw>
<kw name="Set Variable" owner="BuiltIn">
<var>${value}</var>
<arg>${values}[0]</arg>
<doc>Returns the given values which can then be assigned to a variables.</doc>
<status status="NOT RUN" start="2026-06-28T16:12:10.303963" elapsed="0.000153"/>
</kw>
<return>
<value>${value}</value>
<status status="PASS" start="2026-06-28T16:12:10.304161" elapsed="0.000051"/>
</return>
<var>${status}</var>
<arg>${resp}</arg>
<arg>$.status</arg>
<doc>Extract a value from a JSON response using JSONPath.</doc>
<status status="PASS" start="2026-06-28T16:12:10.303328" elapsed="0.000925"/>
</kw>
<kw name="Should Be Equal As Strings" owner="BuiltIn">
<arg>${status}</arg>
<arg>healthy</arg>
<doc>Fails if objects are unequal after converting them to strings.</doc>
<status status="NOT RUN" start="2026-06-28T16:12:10.304330" elapsed="0.000152"/>
</kw>
<kw name="Delete All Sessions" owner="RequestsLibrary" type="TEARDOWN">
<doc>Removes all the session objects</doc>
<status status="NOT RUN" start="2026-06-28T16:12:10.304607" elapsed="0.000086"/>
</kw>
<msg time="2026-06-28T16:12:10.308263" level="INFO">Starting Browser process /home/lukas/miniconda3/lib/python3.13/site-packages/Browser/wrapper/index.js using at 127.0.0.1:40377</msg>
<doc>Verify the basic health endpoint returns 200.</doc>
<status status="PASS" start="2026-06-28T16:12:10.300968" elapsed="0.003767"/>
</test>
<test id="s1-t2" name="Detailed Health Check" line="25">
<kw name="Create Anonymous Session" owner="common" type="SETUP">
<kw name="Create Session" owner="RequestsLibrary">
<arg>anon</arg>
<arg>${BASE_URL}</arg>
<doc>Create Session: create a HTTP session to a server</doc>
<status status="NOT RUN" start="2026-06-28T16:12:10.738535" elapsed="0.000106"/>
</kw>
<doc>Create an unauthenticated HTTP session.</doc>
<status status="PASS" start="2026-06-28T16:12:10.738255" elapsed="0.000437"/>
</kw>
<kw name="GET On Session" owner="RequestsLibrary">
<var>${resp}</var>
<arg>anon</arg>
<arg>/health/detailed</arg>
<arg>expected_status=200</arg>
<doc>Sends a GET request on a previously created HTTP Session.</doc>
<status status="NOT RUN" start="2026-06-28T16:12:10.738799" elapsed="0.000080"/>
</kw>
<kw name="Response Should Have Status" owner="common">
<kw name="Should Be Equal As Integers" owner="BuiltIn">
<arg>${response.status_code}</arg>
<arg>${expected_status}</arg>
<doc>Fails if objects are unequal after converting them to integers.</doc>
<status status="NOT RUN" start="2026-06-28T16:12:10.739152" elapsed="0.000276"/>
</kw>
<arg>${resp}</arg>
<arg>200</arg>
<doc>Assert that the response status code matches the expected value.</doc>
<status status="PASS" start="2026-06-28T16:12:10.738986" elapsed="0.000497"/>
</kw>
<kw name="Response Should Contain Keys" owner="api_keywords">
<kw name="Convert String To Json" owner="JSONLibrary">
<var>${json}</var>
<arg>${response.text}</arg>
<doc>Convert String to JSON object</doc>
<status status="NOT RUN" start="2026-06-28T16:12:10.739826" elapsed="0.000068"/>
</kw>
<for flavor="IN">
<iter>
<kw name="Dictionary Should Contain Key" owner="Collections">
<arg>${json}</arg>
<arg>${key}</arg>
<doc>Fails if ``key`` is not found from ``dictionary``.</doc>
<status status="NOT RUN" start="2026-06-28T16:12:10.740134" elapsed="0.000066"/>
</kw>
<var name="${key}"/>
<status status="PASS" start="2026-06-28T16:12:10.740045" elapsed="0.000186"/>
</iter>
<var>${key}</var>
<value>@{keys}</value>
<status status="PASS" start="2026-06-28T16:12:10.739945" elapsed="0.000319"/>
</for>
<arg>${resp}</arg>
<arg>status</arg>
<arg>version</arg>
<arg>uptime</arg>
<arg>dependencies</arg>
<doc>Assert that the JSON response contains all the specified top-level keys.</doc>
<status status="PASS" start="2026-06-28T16:12:10.739613" elapsed="0.000691"/>
</kw>
<kw name="Convert String To Json" owner="JSONLibrary">
<var>${json}</var>
<arg>${resp.text}</arg>
<doc>Convert String to JSON object</doc>
<status status="NOT RUN" start="2026-06-28T16:12:10.740374" elapsed="0.000053"/>
</kw>
<kw name="Dictionary Should Contain Key" owner="Collections">
<arg>${json["dependencies"]}</arg>
<arg>system</arg>
<doc>Fails if ``key`` is not found from ``dictionary``.</doc>
<status status="NOT RUN" start="2026-06-28T16:12:10.740490" elapsed="0.000067"/>
</kw>
<kw name="Dictionary Should Contain Key" owner="Collections">
<arg>${json["dependencies"]["system"]}</arg>
<arg>memory_percent</arg>
<doc>Fails if ``key`` is not found from ``dictionary``.</doc>
<status status="NOT RUN" start="2026-06-28T16:12:10.740622" elapsed="0.000060"/>
</kw>
<kw name="Dictionary Should Contain Key" owner="Collections">
<arg>${json["dependencies"]["system"]}</arg>
<arg>cpu_percent</arg>
<doc>Fails if ``key`` is not found from ``dictionary``.</doc>
<status status="NOT RUN" start="2026-06-28T16:12:10.740756" elapsed="0.000079"/>
</kw>
<kw name="Delete All Sessions" owner="RequestsLibrary" type="TEARDOWN">
<doc>Removes all the session objects</doc>
<status status="NOT RUN" start="2026-06-28T16:12:10.740946" elapsed="0.000048"/>
</kw>
<doc>Verify the detailed health endpoint returns metrics.</doc>
<status status="PASS" start="2026-06-28T16:12:10.734599" elapsed="0.006425"/>
</test>
<doc>Health check API tests for Aniworld.
Covers basic and detailed health endpoints.</doc>
<status status="PASS" start="2026-06-28T16:12:10.091473" elapsed="0.654979"/>
</suite>
<statistics>
<total>
<stat pass="2" fail="0" skip="0">All Tests</stat>
</total>
<tag>
</tag>
<suite>
<stat name="Health" id="s1" pass="2" fail="0" skip="0">Health</stat>
</suite>
</statistics>
<errors>
</errors>
</robot>