<?xml version="1.0" encoding="UTF-8"?>
<robot generator="Robot 7.3.2 (Python 3.9.6 on darwin)" generated="2026-04-16T22:17:36.948416" rpa="false" schemaversion="5">
<suite id="s1" name="Profit Analysis" source="/Users/lihu/.jenkins/workspace/bitradex-api-automation/tests/invite/profit_analysis.robot">
<kw name="测试环境初始化" owner="common" type="SETUP">
<kw name="Get Variable Value" owner="BuiltIn">
<msg time="2026-04-16T22:17:37.037574" level="INFO">${cli_env} = bitradex_test</msg>
<var>${cli_env}</var>
<arg>\${TEST_ENV}</arg>
<arg>${env}</arg>
<doc>Returns variable value or ``default`` if the variable does not exist.</doc>
<status status="PASS" start="2026-04-16T22:17:37.037478" elapsed="0.000113"/>
</kw>
<if>
<branch type="IF" condition="'${cli_env}' == '${env}'">
<kw name="Log" owner="BuiltIn">
<msg time="2026-04-16T22:17:37.037778" level="INFO">未检测到命令行TEST_ENV变量，使用默认值: bitradex_test</msg>
<arg>未检测到命令行TEST_ENV变量，使用默认值: ${env}</arg>
<doc>Logs the given message with the given level.</doc>
<status status="PASS" start="2026-04-16T22:17:37.037721" elapsed="0.000076"/>
</kw>
<status status="PASS" start="2026-04-16T22:17:37.037636" elapsed="0.000175"/>
</branch>
<branch type="ELSE">
<kw name="Log" owner="BuiltIn">
<arg>检测到命令行TEST_ENV变量: ${cli_env}</arg>
<doc>Logs the given message with the given level.</doc>
<status status="NOT RUN" start="2026-04-16T22:17:37.037861" elapsed="0.000031"/>
</kw>
<status status="NOT RUN" start="2026-04-16T22:17:37.037821" elapsed="0.000084"/>
</branch>
<status status="PASS" start="2026-04-16T22:17:37.037625" elapsed="0.000288"/>
</if>
<kw name="设置测试环境" owner="common">
<kw name="Log" owner="BuiltIn">
<msg time="2026-04-16T22:17:37.038172" level="INFO">设置环境: bitradex_test</msg>
<arg>设置环境: ${env}</arg>
<doc>Logs the given message with the given level.</doc>
<status status="PASS" start="2026-04-16T22:17:37.038123" elapsed="0.000066"/>
</kw>
<if>
<branch type="IF" condition="'${env}' == 'test'">
<kw name="Set Global Variable" owner="BuiltIn">
<arg>${BASE_URL}</arg>
<arg>https://api.example.com</arg>
<doc>Makes a variable available globally in all tests and suites.</doc>
<status status="NOT RUN" start="2026-04-16T22:17:37.038276" elapsed="0.000007"/>
</kw>
<kw name="Set Global Variable" owner="BuiltIn">
<arg>${ENV_NAME}</arg>
<arg>测试环境</arg>
<doc>Makes a variable available globally in all tests and suites.</doc>
<status status="NOT RUN" start="2026-04-16T22:17:37.038322" elapsed="0.000007"/>
</kw>
<kw name="Set Global Variable" owner="BuiltIn">
<arg>${TIMEOUT}</arg>
<arg>30</arg>
<doc>Makes a variable available globally in all tests and suites.</doc>
<status status="NOT RUN" start="2026-04-16T22:17:37.038366" elapsed="0.000006"/>
</kw>
<kw name="Set Global Variable" owner="BuiltIn">
<arg>${HOST_NAME}</arg>
<arg>api.example.com</arg>
<doc>Makes a variable available globally in all tests and suites.</doc>
<status status="NOT RUN" start="2026-04-16T22:17:37.038411" elapsed="0.000006"/>
</kw>
<kw name="Set Global Variable" owner="BuiltIn">
<arg>${APP_PREFIX}</arg>
<arg>Test</arg>
<doc>Makes a variable available globally in all tests and suites.</doc>
<status status="NOT RUN" start="2026-04-16T22:17:37.038454" elapsed="0.000006"/>
</kw>
<status status="NOT RUN" start="2026-04-16T22:17:37.038214" elapsed="0.000258"/>
</branch>
<branch type="ELSE IF" condition="'${env}' == 'prod'">
<kw name="Set Global Variable" owner="BuiltIn">
<arg>${BASE_URL}</arg>
<arg>https://app.bitradex.mobi</arg>
<doc>Makes a variable available globally in all tests and suites.</doc>
<status status="NOT RUN" start="2026-04-16T22:17:37.038550" elapsed="0.000008"/>
</kw>
<kw name="Set Global Variable" owner="BuiltIn">
<arg>${ENV_NAME}</arg>
<arg>生产环境</arg>
<doc>Makes a variable available globally in all tests and suites.</doc>
<status status="NOT RUN" start="2026-04-16T22:17:37.038600" elapsed="0.000007"/>
</kw>
<kw name="Set Global Variable" owner="BuiltIn">
<arg>${TIMEOUT}</arg>
<arg>30</arg>
<doc>Makes a variable available globally in all tests and suites.</doc>
<status status="NOT RUN" start="2026-04-16T22:17:37.038648" elapsed="0.000007"/>
</kw>
<kw name="Set Global Variable" owner="BuiltIn">
<arg>${HOST_NAME}</arg>
<arg>app.bitradex.mobi</arg>
<doc>Makes a variable available globally in all tests and suites.</doc>
<status status="NOT RUN" start="2026-04-16T22:17:37.038694" elapsed="0.000007"/>
</kw>
<kw name="Set Global Variable" owner="BuiltIn">
<arg>${APP_PREFIX}</arg>
<arg>Prod</arg>
<doc>Makes a variable available globally in all tests and suites.</doc>
<status status="NOT RUN" start="2026-04-16T22:17:37.038741" elapsed="0.000007"/>
</kw>
<kw name="Set Global Variable" owner="BuiltIn">
<arg>${DEFAULT_APP_VERSION}</arg>
<arg>1.1.9</arg>
<doc>Makes a variable available globally in all tests and suites.</doc>
<status status="NOT RUN" start="2026-04-16T22:17:37.038787" elapsed="0.000007"/>
</kw>
<kw name="Set Global Variable" owner="BuiltIn">
<arg>${DEFAULT_BUILD_CODE}</arg>
<arg>7032</arg>
<doc>Makes a variable available globally in all tests and suites.</doc>
<status status="NOT RUN" start="2026-04-16T22:17:37.038833" elapsed="0.000007"/>
</kw>
<kw name="Set Global Variable" owner="BuiltIn">
<arg>${DEFAULT_APP_CHANNEL}</arg>
<arg>ios-prod</arg>
<doc>Makes a variable available globally in all tests and suites.</doc>
<status status="NOT RUN" start="2026-04-16T22:17:37.038878" elapsed="0.000006"/>
</kw>
<status status="NOT RUN" start="2026-04-16T22:17:37.038480" elapsed="0.000415"/>
</branch>
<branch type="ELSE">
<kw name="Set Global Variable" owner="BuiltIn">
<msg time="2026-04-16T22:17:37.039223" level="INFO">${BASE_URL} = https://app.bitradex-test.com</msg>
<arg>${BASE_URL}</arg>
<arg>https://app.bitradex-test.com</arg>
<doc>Makes a variable available globally in all tests and suites.</doc>
<status status="PASS" start="2026-04-16T22:17:37.038940" elapsed="0.000300"/>
</kw>
<kw name="Set Global Variable" owner="BuiltIn">
<msg time="2026-04-16T22:17:37.039534" level="INFO">${ENV_NAME} = BitRadeX测试环境</msg>
<arg>${ENV_NAME}</arg>
<arg>BitRadeX测试环境</arg>
<doc>Makes a variable available globally in all tests and suites.</doc>
<status status="PASS" start="2026-04-16T22:17:37.039282" elapsed="0.000268"/>
</kw>
<kw name="Set Global Variable" owner="BuiltIn">
<msg time="2026-04-16T22:17:37.039850" level="INFO">${TIMEOUT} = 30</msg>
<arg>${TIMEOUT}</arg>
<arg>30</arg>
<doc>Makes a variable available globally in all tests and suites.</doc>
<status status="PASS" start="2026-04-16T22:17:37.039593" elapsed="0.000273"/>
</kw>
<kw name="Set Global Variable" owner="BuiltIn">
<msg time="2026-04-16T22:17:37.040169" level="INFO">${HOST_NAME} = app.bitradex-test.com</msg>
<arg>${HOST_NAME}</arg>
<arg>app.bitradex-test.com</arg>
<doc>Makes a variable available globally in all tests and suites.</doc>
<status status="PASS" start="2026-04-16T22:17:37.039908" elapsed="0.000277"/>
</kw>
<kw name="Set Global Variable" owner="BuiltIn">
<msg time="2026-04-16T22:17:37.040508" level="INFO">${APP_PREFIX} = Test</msg>
<arg>${APP_PREFIX}</arg>
<arg>Test</arg>
<doc>Makes a variable available globally in all tests and suites.</doc>
<status status="PASS" start="2026-04-16T22:17:37.040227" elapsed="0.000299"/>
</kw>
<kw name="Set Global Variable" owner="BuiltIn">
<msg time="2026-04-16T22:17:37.040849" level="INFO">${DEFAULT_APP_VERSION} = 1.2.0</msg>
<arg>${DEFAULT_APP_VERSION}</arg>
<arg>1.2.0</arg>
<doc>Makes a variable available globally in all tests and suites.</doc>
<status status="PASS" start="2026-04-16T22:17:37.040573" elapsed="0.000292"/>
</kw>
<kw name="Set Global Variable" owner="BuiltIn">
<msg time="2026-04-16T22:17:37.041198" level="INFO">${DEFAULT_BUILD_CODE} = 7034</msg>
<arg>${DEFAULT_BUILD_CODE}</arg>
<arg>7034</arg>
<doc>Makes a variable available globally in all tests and suites.</doc>
<status status="PASS" start="2026-04-16T22:17:37.040914" elapsed="0.000302"/>
</kw>
<kw name="Set Global Variable" owner="BuiltIn">
<msg time="2026-04-16T22:17:37.041513" level="INFO">${DEFAULT_APP_CHANNEL} = ios-test-flight</msg>
<arg>${DEFAULT_APP_CHANNEL}</arg>
<arg>ios-test-flight</arg>
<doc>Makes a variable available globally in all tests and suites.</doc>
<status status="PASS" start="2026-04-16T22:17:37.041259" elapsed="0.000271"/>
</kw>
<status status="PASS" start="2026-04-16T22:17:37.038903" elapsed="0.002697"/>
</branch>
<status status="PASS" start="2026-04-16T22:17:37.038207" elapsed="0.003401"/>
</if>
<kw name="Log" owner="BuiltIn">
<msg time="2026-04-16T22:17:37.041705" level="INFO">已设置测试环境: BitRadeX测试环境 (https://app.bitradex-test.com)</msg>
<arg>已设置测试环境: ${ENV_NAME} (${BASE_URL})</arg>
<doc>Logs the given message with the given level.</doc>
<status status="PASS" start="2026-04-16T22:17:37.041644" elapsed="0.000078"/>
</kw>
<kw name="Create Session" owner="RequestsLibrary">
<msg time="2026-04-16T22:17:37.041850" level="INFO">Creating Session using : alias=api_session, url=https://app.bitradex-test.com, headers={},                     cookies={}, auth=None, timeout=30, proxies=None, verify=False,                     debug=0 </msg>
<arg>api_session</arg>
<arg>${BASE_URL}</arg>
<arg>timeout=${TIMEOUT}</arg>
<doc>Create Session: create a HTTP session to a server</doc>
<status status="PASS" start="2026-04-16T22:17:37.041763" elapsed="0.000169"/>
</kw>
<arg>${cli_env}</arg>
<doc>设置测试环境，支持多环境配置</doc>
<status status="PASS" start="2026-04-16T22:17:37.038022" elapsed="0.003938"/>
</kw>
<kw name="Log" owner="BuiltIn">
<msg time="2026-04-16T22:17:37.042044" level="INFO">测试环境初始化完成</msg>
<arg>测试环境初始化完成</arg>
<doc>Logs the given message with the given level.</doc>
<status status="PASS" start="2026-04-16T22:17:37.042006" elapsed="0.000056"/>
</kw>
<doc>初始化测试环境，设置默认配置</doc>
<status status="PASS" start="2026-04-16T22:17:37.037156" elapsed="0.004928"/>
</kw>
<test id="s1-t1" name="获取用户收益信息" line="13">
<kw name="Create Dictionary" owner="BuiltIn">
<msg time="2026-04-16T22:17:37.042779" level="INFO">&amp;{params} = { user-id=65340186169 }</msg>
<var>&amp;{params}</var>
<arg>user-id=${USER_ID}</arg>
<doc>Creates and returns a dictionary based on the given ``items``.</doc>
<status status="PASS" start="2026-04-16T22:17:37.042643" elapsed="0.000148"/>
</kw>
<kw name="获取统一请求头" owner="common">
<kw name="Create Dictionary" owner="BuiltIn">
<msg time="2026-04-16T22:17:37.043521" level="INFO">&amp;{headers} = { user-agent=BitradeX-Test 1.2.7(7051);iPhone | app-version-name=1.2.7 | client-lang=cn | check_agent=app_traffic | api-version=1 | content-type=application/json | app-version-code=7051 | app-channel=...</msg>
<var>&amp;{headers}</var>
<arg>user-agent=BitradeX-${APP_PREFIX} ${app_version}(${build_code});iPhone</arg>
<arg>app-version-name=${app_version}</arg>
<arg>client-lang=cn</arg>
<arg>check_agent=app_traffic</arg>
<arg>api-version=1</arg>
<arg>content-type=application/json</arg>
<arg>app-version-code=${build_code}</arg>
<arg>app-channel=${app_channel}</arg>
<arg>app-os=ios</arg>
<arg>platform=USER</arg>
<arg>client-code=C729D1EE-AF40-4C94-8B5A-BBA1E4432D9D</arg>
<arg>client-device-name=iPhone</arg>
<arg>accept=application/json, text/plain, */*</arg>
<arg>lang=cn</arg>
<arg>accept-language=zh_CN</arg>
<arg>platform-account-id=9</arg>
<arg>tenant-id=1</arg>
<arg>device=app</arg>
<arg>host=${HOST_NAME}</arg>
<doc>Creates and returns a dictionary based on the given ``items``.</doc>
<status status="PASS" start="2026-04-16T22:17:37.043234" elapsed="0.000303"/>
</kw>
<if>
<branch type="IF" condition="'${token}' != '${EMPTY}'">
<kw name="Set To Dictionary" owner="Collections">
<arg>${headers}</arg>
<arg>authorization=Bearer ${token}</arg>
<doc>Adds the given ``key_value_pairs`` and/or ``items`` to the ``dictionary``.</doc>
<status status="PASS" start="2026-04-16T22:17:37.043890" elapsed="0.000212"/>
</kw>
<status status="PASS" start="2026-04-16T22:17:37.043600" elapsed="0.000525"/>
</branch>
<status status="PASS" start="2026-04-16T22:17:37.043589" elapsed="0.000549"/>
</if>
<return>
<value>&amp;{headers}</value>
<status status="PASS" start="2026-04-16T22:17:37.044160" elapsed="0.000023"/>
</return>
<msg time="2026-04-16T22:17:37.044279" level="INFO">${headers} = {'user-agent': 'BitradeX-Test 1.2.7(7051);iPhone', 'app-version-name': '1.2.7', 'client-lang': 'cn', 'check_agent': 'app_traffic', 'api-version': '1', 'content-type': 'application/json', 'app-version-...</msg>
<var>${headers}</var>
<arg>app_version=1.2.7</arg>
<arg>build_code=7051</arg>
<arg>token=${ACCESS_TOKEN}</arg>
<doc>获取统一的应用请求头配置</doc>
<status status="PASS" start="2026-04-16T22:17:37.042981" elapsed="0.001312"/>
</kw>
<kw name="Set To Dictionary" owner="Collections">
<arg>${headers}</arg>
<arg>uid=${USER_ID}</arg>
<doc>Adds the given ``key_value_pairs`` and/or ``items`` to the ``dictionary``.</doc>
<status status="PASS" start="2026-04-16T22:17:37.044391" elapsed="0.000090"/>
</kw>
<kw name="GET On Session" owner="RequestsLibrary">
<msg time="2026-04-16T22:17:37.967107" level="INFO">GET Request : url=https://app.bitradex-test.com/v1/invite/public/user-team/profit/user?user-id=65340186169 
 path_url=/v1/invite/public/user-team/profit/user?user-id=65340186169 
 headers={'user-agent': 'BitradeX-Test 1.2.7(7051);iPhone', 'Accept-Encoding': 'gzip, deflate', 'accept': 'application/json, text/plain, */*', 'Connection': 'keep-alive', 'app-version-name': '1.2.7', 'client-lang': 'cn', 'check_agent': 'app_traffic', 'api-version': '1', 'content-type': 'application/json', 'app-version-code': '7051', 'app-channel': 'ios-test-flight', 'app-os': 'ios', 'platform': 'USER', 'client-code': 'C729D1EE-AF40-4C94-8B5A-BBA1E4432D9D', 'client-device-name': 'iPhone', 'lang': 'cn', 'accept-language': 'zh_CN', 'platform-account-id': '9', 'tenant-id': '1', 'device': 'app', 'host': 'app.bitradex-test.com', 'authorization': 'Bearer eyJhbGciOiJSUzI1NiJ9.eyJhY2NvdW50SWQiOiI2NTM0MDE4NjE2OSIsInN1YiI6Im4wMTlAeW9wbWFpbC5uZXQiLCJzY29wZSI6ImF1dGgiLCJsYXN0QXV0aFRpbWUiOjE3NzYzNDczNzYyMzUsInNpZ25UeXBlIjoiVVAiLCJhY2NvdW50TGV2ZWwiOiIxIiwidXNlck5hbWUiOiJuMDE5QHlvcG1haWwubmV0IiwiZXhwIjoxNzc2NDMzNzc2LCJkZXZpY2UiOiJhcHAiLCJ1c2VySWQiOjY1MzQwMTg2MTY5LCJ1c2VyQ29kZSI6IjllOWFlMmRjNGZiMDcwYjhmMjY3MWRmNTQyYzBmNWNjIn0.Yfb24htZ0T-V99afB8n0spcQLkGodZMzDp4v_GvsielgzxhbGZ3TqQ_HvX8JGPMyEfKb0a6bIv7e70d8Eiz4C2yoKaSGdBZI2q_y5S_XJs7wRstzgBCJliU7e6lJCpnd4Ivav9n1z_z4nh_p0NXfAY1WjXvkCZ3x-oBuX5NzR7U', 'uid': '65340186169'} 
 body=None 
 </msg>
<msg time="2026-04-16T22:17:37.967851" level="INFO">GET Response : url=https://app.bitradex-test.com/v1/invite/public/user-team/profit/user?user-id=65340186169 
 status=200, reason=OK 
 headers={'Date': 'Thu, 16 Apr 2026 14:17:37 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'X-Frame-Options': 'SAMEORIGIN', 'Speculation-Rules': '"/cdn-cgi/speculation"', 'Vary': 'Origin, Access-Control-Request-Method, Access-Control-Request-Headers', 'X-Forwarded-For': '141.11.146.71', 'X-Trace-ID': 'f7fefeac4c979754b9afbae90df41d91', 'X-Transparent': '00-f7fefeac4c979754b9afbae90df41d91-7b88f559ae9b8c9a-01', 'X-Upstream-Addr': '10.9.149.153:8080', 'X-Upstream-Header-Time': '0.069', 'X-Upstream-Service': 'default-gateway-app-80', 'X-Upstream-Status': '200', 'cf-cache-status': 'DYNAMIC', 'Content-Encoding': 'gzip', 'Server': 'cloudflare', 'CF-RAY': '9ed3d08a9c3409d8-HKG', 'alt-svc': 'h3=":443"; ma=86400'} 
 body={"code":0,"msg":"success","msgInfo":[],"data":{"uid":65340186169,"level":2,"levelName":"VIP2","yesterdayEarnings":23666.43113097,"thirtyDayEarnings":615327.209400769664,"totalEarnings":3351528.682600929664},"ts":1776349057870} 
 </msg>
<msg time="2026-04-16T22:17:37.968003" level="INFO">/Users/lihu/Library/Python/3.9/lib/python/site-packages/urllib3/connectionpool.py:1064: InsecureRequestWarning: Unverified HTTPS request is being made to host '127.0.0.1'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
  warnings.warn(</msg>
<msg time="2026-04-16T22:17:37.968286" level="INFO">${response} = &lt;Response [200]&gt;</msg>
<var>${response}</var>
<arg>api_session</arg>
<arg>/v1/invite/public/user-team/profit/user</arg>
<arg>params=&amp;{params}</arg>
<arg>headers=${headers}</arg>
<arg>expected_status=any</arg>
<doc>Sends a GET request on a previously created HTTP Session.</doc>
<status status="PASS" start="2026-04-16T22:17:37.044548" elapsed="0.923775"/>
</kw>
<kw name="Run Keyword And Return Status" owner="BuiltIn">
<kw name="Dictionary Should Contain Key" owner="Collections">
<arg>${response.json()}</arg>
<arg>code</arg>
<doc>Fails if ``key`` is not found from ``dictionary``.</doc>
<status status="PASS" start="2026-04-16T22:17:37.969301" elapsed="0.000837"/>
</kw>
<msg time="2026-04-16T22:17:37.970243" level="INFO">${has_code} = True</msg>
<var>${has_code}</var>
<arg>Dictionary Should Contain Key</arg>
<arg>${response.json()}</arg>
<arg>code</arg>
<doc>Runs the given keyword with given arguments and returns the status as a Boolean value.</doc>
<status status="PASS" start="2026-04-16T22:17:37.968950" elapsed="0.001314"/>
</kw>
<kw name="Set Variable" owner="BuiltIn">
<msg time="2026-04-16T22:17:37.970941" level="INFO">${biz_code} = </msg>
<var>${biz_code}</var>
<arg>${EMPTY}</arg>
<doc>Returns the given values which can then be assigned to a variables.</doc>
<status status="PASS" start="2026-04-16T22:17:37.970440" elapsed="0.000529"/>
</kw>
<if>
<branch type="IF" condition="${has_code}">
<kw name="Set Variable" owner="BuiltIn">
<msg time="2026-04-16T22:17:37.971960" level="INFO">${biz_code} = 0</msg>
<var>${biz_code}</var>
<arg>${response.json()['code']}</arg>
<doc>Returns the given values which can then be assigned to a variables.</doc>
<status status="PASS" start="2026-04-16T22:17:37.971338" elapsed="0.000645"/>
</kw>
<status status="PASS" start="2026-04-16T22:17:37.971137" elapsed="0.000882"/>
</branch>
<status status="PASS" start="2026-04-16T22:17:37.971093" elapsed="0.000959"/>
</if>
<if>
<branch type="IF" condition="${response.status_code} == 401 or '${biz_code}' == '401'">
<kw name="Run Keyword And Ignore Error" owner="BuiltIn">
<var>${refresh_status}</var>
<var>${refresh_result}</var>
<arg>刷新Token并重试</arg>
<arg>/v1/invite/public/user-team/profit/user</arg>
<arg>${REFRESH_TOKEN}</arg>
<arg>params=${params}</arg>
<doc>Runs the given keyword with the given arguments and ignores possible error.</doc>
<status status="NOT RUN" start="2026-04-16T22:17:37.972633" elapsed="0.000022"/>
</kw>
<if>
<branch type="IF" condition="'${refresh_status}' == 'PASS'">
<kw name="Set Variable" owner="BuiltIn">
<var>${response}</var>
<arg>${refresh_result}</arg>
<doc>Returns the given values which can then be assigned to a variables.</doc>
<status status="NOT RUN" start="2026-04-16T22:17:37.972851" elapsed="0.000019"/>
</kw>
<status status="NOT RUN" start="2026-04-16T22:17:37.972747" elapsed="0.000158"/>
</branch>
<branch type="ELSE">
<kw name="Skip" owner="BuiltIn">
<arg>Token已失效且refreshToken不可用: ${refresh_result}</arg>
<doc>Skips the rest of the current test.</doc>
<status status="NOT RUN" start="2026-04-16T22:17:37.973033" elapsed="0.000018"/>
</kw>
<status status="NOT RUN" start="2026-04-16T22:17:37.972931" elapsed="0.000153"/>
</branch>
<status status="NOT RUN" start="2026-04-16T22:17:37.972729" elapsed="0.000379"/>
</if>
<status status="NOT RUN" start="2026-04-16T22:17:37.972138" elapsed="0.000994"/>
</branch>
<status status="PASS" start="2026-04-16T22:17:37.972120" elapsed="0.001035"/>
</if>
<kw name="验证接口响应成功" owner="common">
<kw name="Should Be Equal As Integers" owner="BuiltIn">
<msg time="2026-04-16T22:17:37.974371" level="INFO">Argument types are:
&lt;class 'int'&gt;
&lt;class 'str'&gt;</msg>
<arg>${response.status_code}</arg>
<arg>200</arg>
<doc>Fails if objects are unequal after converting them to integers.</doc>
<status status="PASS" start="2026-04-16T22:17:37.973853" elapsed="0.000595"/>
</kw>
<kw name="Set Variable" owner="BuiltIn">
<msg time="2026-04-16T22:17:37.975107" level="INFO">${status_code} = 200</msg>
<var>${status_code}</var>
<arg>${response.status_code}</arg>
<doc>Returns the given values which can then be assigned to a variables.</doc>
<status status="PASS" start="2026-04-16T22:17:37.974574" elapsed="0.000561"/>
</kw>
<kw name="Log" owner="BuiltIn">
<msg time="2026-04-16T22:17:37.975409" level="INFO">接口响应成功，状态码: 200</msg>
<arg>接口响应成功，状态码: ${status_code}</arg>
<doc>Logs the given message with the given level.</doc>
<status status="PASS" start="2026-04-16T22:17:37.975265" elapsed="0.000190"/>
</kw>
<arg>${response}</arg>
<doc>验证接口响应状态码为200</doc>
<status status="PASS" start="2026-04-16T22:17:37.973426" elapsed="0.002101"/>
</kw>
<kw name="验证响应字段值" owner="common">
<kw name="验证响应JSON字段" owner="common">
<kw name="Set Variable" owner="BuiltIn">
<msg time="2026-04-16T22:17:37.977184" level="INFO">${json_data} = {'code': 0, 'msg': 'success', 'msgInfo': [], 'data': {'uid': 65340186169, 'level': 2, 'levelName': 'VIP2', 'yesterdayEarnings': 23666.43113097, 'thirtyDayEarnings': 615327.2094007697, 'totalEarnings':...</msg>
<var>${json_data}</var>
<arg>${response.json()}</arg>
<doc>Returns the given values which can then be assigned to a variables.</doc>
<status status="PASS" start="2026-04-16T22:17:37.976713" elapsed="0.000499"/>
</kw>
<kw name="Get From Dictionary" owner="Collections">
<msg time="2026-04-16T22:17:37.977527" level="INFO">${actual_value} = 0</msg>
<var>${actual_value}</var>
<arg>${json_data}</arg>
<arg>${field_path}</arg>
<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc>
<status status="PASS" start="2026-04-16T22:17:37.977332" elapsed="0.000219"/>
</kw>
<kw name="Should Be Equal" owner="BuiltIn">
<arg>${actual_value}</arg>
<arg>${expected_value}</arg>
<doc>Fails if the given objects are unequal.</doc>
<status status="PASS" start="2026-04-16T22:17:37.977669" elapsed="0.000181"/>
</kw>
<arg>${response}</arg>
<arg>${field_path}</arg>
<arg>${expected_value}</arg>
<doc>验证响应JSON字段的值</doc>
<status status="PASS" start="2026-04-16T22:17:37.976405" elapsed="0.001508"/>
</kw>
<arg>${response}</arg>
<arg>code</arg>
<arg>${0}</arg>
<doc>验证响应JSON字段的值</doc>
<status status="PASS" start="2026-04-16T22:17:37.975802" elapsed="0.002169"/>
</kw>
<kw name="验证响应包含字段" owner="common">
<kw name="Set Variable" owner="BuiltIn">
<msg time="2026-04-16T22:17:37.979165" level="INFO">${json_data} = {'code': 0, 'msg': 'success', 'msgInfo': [], 'data': {'uid': 65340186169, 'level': 2, 'levelName': 'VIP2', 'yesterdayEarnings': 23666.43113097, 'thirtyDayEarnings': 615327.2094007697, 'totalEarnings':...</msg>
<var>${json_data}</var>
<arg>${response.json()}</arg>
<doc>Returns the given values which can then be assigned to a variables.</doc>
<status status="PASS" start="2026-04-16T22:17:37.978574" elapsed="0.000628"/>
</kw>
<kw name="Dictionary Should Contain Key" owner="Collections">
<arg>${json_data}</arg>
<arg>${field_name}</arg>
<doc>Fails if ``key`` is not found from ``dictionary``.</doc>
<status status="PASS" start="2026-04-16T22:17:37.979342" elapsed="0.000194"/>
</kw>
<kw name="Log" owner="BuiltIn">
<msg time="2026-04-16T22:17:37.979781" level="INFO">响应包含字段: data</msg>
<arg>响应包含字段: ${field_name}</arg>
<doc>Logs the given message with the given level.</doc>
<status status="PASS" start="2026-04-16T22:17:37.979644" elapsed="0.000179"/>
</kw>
<arg>${response}</arg>
<arg>data</arg>
<doc>验证响应JSON包含指定字段</doc>
<status status="PASS" start="2026-04-16T22:17:37.978243" elapsed="0.001640"/>
</kw>
<kw name="Get From Dictionary" owner="Collections">
<msg time="2026-04-16T22:17:37.980574" level="INFO">${data} = {'uid': 65340186169, 'level': 2, 'levelName': 'VIP2', 'yesterdayEarnings': 23666.43113097, 'thirtyDayEarnings': 615327.2094007697, 'totalEarnings': 3351528.68260093}</msg>
<var>${data}</var>
<arg>${response.json()}</arg>
<arg>data</arg>
<doc>Returns a value from the given ``dictionary`` based on the given ``key``.</doc>
<status status="PASS" start="2026-04-16T22:17:37.980043" elapsed="0.000556"/>
</kw>
<kw name="Dictionary Should Contain Key" owner="Collections">
<arg>${data}</arg>
<arg>uid</arg>
<doc>Fails if ``key`` is not found from ``dictionary``.</doc>
<status status="PASS" start="2026-04-16T22:17:37.980733" elapsed="0.000266"/>
</kw>
<kw name="Dictionary Should Contain Key" owner="Collections">
<arg>${data}</arg>
<arg>level</arg>
<doc>Fails if ``key`` is not found from ``dictionary``.</doc>
<status status="PASS" start="2026-04-16T22:17:37.981117" elapsed="0.000121"/>
</kw>
<kw name="Dictionary Should Contain Key" owner="Collections">
<arg>${data}</arg>
<arg>totalEarnings</arg>
<doc>Fails if ``key`` is not found from ``dictionary``.</doc>
<status status="PASS" start="2026-04-16T22:17:37.981350" elapsed="0.000109"/>
</kw>
<kw name="Log" owner="BuiltIn">
<msg time="2026-04-16T22:17:37.982011" level="INFO">用户 65340186169 的总收益为: 3351528.68260093</msg>
<arg>用户 ${USER_ID} 的总收益为: ${data['totalEarnings']}</arg>
<doc>Logs the given message with the given level.</doc>
<status status="PASS" start="2026-04-16T22:17:37.981574" elapsed="0.000476"/>
</kw>
<kw name="完整输出JSON响应" owner="common">
<kw name="Set Variable" owner="BuiltIn">
<msg time="2026-04-16T22:17:37.983469" level="INFO">${json_data} = {'code': 0, 'msg': 'success', 'msgInfo': [], 'data': {'uid': 65340186169, 'level': 2, 'levelName': 'VIP2', 'yesterdayEarnings': 23666.43113097, 'thirtyDayEarnings': 615327.2094007697, 'totalEarnings':...</msg>
<var>${json_data}</var>
<arg>${response.json()}</arg>
<doc>Returns the given values which can then be assigned to a variables.</doc>
<status status="PASS" start="2026-04-16T22:17:37.982485" elapsed="0.001025"/>
</kw>
<kw name="Evaluate" owner="BuiltIn">
<msg time="2026-04-16T22:17:37.984658" level="INFO">${json_str} = {
  "code": 0,
  "msg": "success",
  "msgInfo": [],
  "data": {
    "uid": 65340186169,
    "level": 2,
    "levelName": "VIP2",
    "yesterdayEarnings": 23666.43113097,
    "thirtyDayEarnings": 61532...</msg>
<var>${json_str}</var>
<arg>json.dumps($json_data, ensure_ascii=False, indent=2)</arg>
<arg>json</arg>
<doc>Evaluates the given expression in Python and returns the result.</doc>
<status status="PASS" start="2026-04-16T22:17:37.983911" elapsed="0.000796"/>
</kw>
<kw name="Log" owner="BuiltIn">
<msg time="2026-04-16T22:17:37.985263" level="INFO">{
  "code": 0,
  "msg": "success",
  "msgInfo": [],
  "data": {
    "uid": 65340186169,
    "level": 2,
    "levelName": "VIP2",
    "yesterdayEarnings": 23666.43113097,
    "thirtyDayEarnings": 615327.2094007697,
    "totalEarnings": 3351528.68260093
  },
  "ts": 1776349057870
}</msg>
<arg>${json_str}</arg>
<arg>console=yes</arg>
<doc>Logs the given message with the given level.</doc>
<status status="PASS" start="2026-04-16T22:17:37.984981" elapsed="0.000393"/>
</kw>
<arg>${response}</arg>
<doc>输出纯净JSON数据</doc>
<status status="PASS" start="2026-04-16T22:17:37.982234" elapsed="0.003242"/>
</kw>
<kw name="本次测试简报" owner="common">
<kw name="Set Variable" owner="BuiltIn">
<msg time="2026-04-16T22:17:37.986967" level="INFO">${status_code} = 200</msg>
<var>${status_code}</var>
<arg>${response.status_code}</arg>
<doc>Returns the given values which can then be assigned to a variables.</doc>
<status status="PASS" start="2026-04-16T22:17:37.986269" elapsed="0.000758"/>
</kw>
<kw name="Run Keyword And Return Status" owner="BuiltIn">
<kw name="Should Contain" owner="BuiltIn">
<arg>${response.text}</arg>
<arg>"data"</arg>
<doc>Fails if ``container`` does not contain ``item`` one or more times.</doc>
<status status="PASS" start="2026-04-16T22:17:37.987842" elapsed="0.000717"/>
</kw>
<msg time="2026-04-16T22:17:37.988775" level="INFO">${has_data} = True</msg>
<var>${has_data}</var>
<arg>Should Contain</arg>
<arg>${response.text}</arg>
<arg>"data"</arg>
<doc>Runs the given keyword with given arguments and returns the status as a Boolean value.</doc>
<status status="PASS" start="2026-04-16T22:17:37.987558" elapsed="0.001272"/>
</kw>
<kw name="Set Variable If" owner="BuiltIn">
<msg time="2026-04-16T22:17:37.989249" level="INFO">${data_status} = 通过</msg>
<var>${data_status}</var>
<arg>${has_data}</arg>
<arg>通过</arg>
<arg>无数据字段</arg>
<doc>Sets variable based on the given condition.</doc>
<status status="PASS" start="2026-04-16T22:17:37.989081" elapsed="0.000197"/>
</kw>
<kw name="Set Variable If" owner="BuiltIn">
<msg time="2026-04-16T22:17:37.989604" level="INFO">${test_result} = PASS</msg>
<var>${test_result}</var>
<arg>${status_code} == 200 and ${has_data}</arg>
<arg>PASS</arg>
<arg>FAIL</arg>
<doc>Sets variable based on the given condition.</doc>
<status status="PASS" start="2026-04-16T22:17:37.989395" elapsed="0.000232"/>
</kw>
<kw name="Set Variable If" owner="BuiltIn">
<msg time="2026-04-16T22:17:37.989898" level="INFO">${failure_reason} = 数据验证失败</msg>
<var>${failure_reason}</var>
<arg>${status_code} != 200</arg>
<arg>状态码异常(期望:200,实际:${status_code})</arg>
<arg>数据验证失败</arg>
<doc>Sets variable based on the given condition.</doc>
<status status="PASS" start="2026-04-16T22:17:37.989737" elapsed="0.000184"/>
</kw>
<kw name="Set Variable" owner="BuiltIn">
<msg time="2026-04-16T22:17:37.990294" level="INFO">${summary_content} = 🧪 测试过程: 获取用户收益信息 | 📡 请求接口: /v1/invite/public/user-team/profit/user | 📊 响应状态: 200 | ✅ 数据验证: 通过 | 🎯 测试结果: PASS</msg>
<var>${summary_content}</var>
<arg>🧪 测试过程: ${test_name} | 📡 请求接口: ${api_path} | 📊 响应状态: ${status_code} | ✅ 数据验证: ${data_status} | 🎯 测试结果: ${test_result}</arg>
<doc>Returns the given values which can then be assigned to a variables.</doc>
<status status="PASS" start="2026-04-16T22:17:37.990027" elapsed="0.000295"/>
</kw>
<kw name="Set Variable If" owner="BuiltIn">
<msg time="2026-04-16T22:17:37.990620" level="INFO">${final_summary} = 🧪 测试过程: 获取用户收益信息 | 📡 请求接口: /v1/invite/public/user-team/profit/user | 📊 响应状态: 200 | ✅ 数据验证: 通过 | 🎯 测试结果: PASS</msg>
<var>${final_summary}</var>
<arg>'${test_result}' == 'FAIL'</arg>
<arg>${summary_content} | ❌ 失败原因: ${failure_reason}</arg>
<arg>${summary_content}</arg>
<doc>Sets variable based on the given condition.</doc>
<status status="PASS" start="2026-04-16T22:17:37.990429" elapsed="0.000216"/>
</kw>
<kw name="Log" owner="BuiltIn">
<msg time="2026-04-16T22:17:37.990898" level="INFO">🧪 测试过程: 获取用户收益信息 | 📡 请求接口: /v1/invite/public/user-team/profit/user | 📊 响应状态: 200 | ✅ 数据验证: 通过 | 🎯 测试结果: PASS</msg>
<arg>${final_summary}</arg>
<doc>Logs the given message with the given level.</doc>
<status status="PASS" start="2026-04-16T22:17:37.990757" elapsed="0.000182"/>
</kw>
<arg>获取用户收益信息</arg>
<arg>/v1/invite/public/user-team/profit/user</arg>
<arg>${response}</arg>
<doc>根据测试执行情况自动生成详细的测试过程总结</doc>
<status status="PASS" start="2026-04-16T22:17:37.985846" elapsed="0.005161"/>
</kw>
<doc>验证获取用户收益信息接口功能</doc>
<tag>invite</tag>
<tag>profit</tag>
<status status="PASS" start="2026-04-16T22:17:37.042114" elapsed="0.949292"/>
</test>
<doc>用户及团队收益分析-获取用户收益信息</doc>
<status status="PASS" start="2026-04-16T22:17:36.948977" elapsed="1.043013"/>
</suite>
<statistics>
<total>
<stat pass="1" fail="0" skip="0">All Tests</stat>
</total>
<tag>
<stat pass="1" fail="0" skip="0">invite</stat>
<stat pass="1" fail="0" skip="0">profit</stat>
</tag>
<suite>
<stat name="Profit Analysis" id="s1" pass="1" fail="0" skip="0">Profit Analysis</stat>
</suite>
</statistics>
<errors>
</errors>
</robot>
