aitest5 加载中…
SuperIM · TestBot

SuperIM API 集成测试

生成时间 2026-09-14 11:18:00 +0000
模式 live · http://imapi:10066
Python 3.12.14 · pytest 9.1.1
用例总数
26
通过
9
失败
17
跳过
总耗时
0.12s
结果 用例 耗时
failed
test_friend_apply_and_accept
tests/api/test_friend.py::test_friend_apply_and_accept
tests/conftest.py:54: in primary return login_account(api_client.clone(), settings.primary) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ src/testbot/session.py:36: in login_account raise AssertionError(f"登录失败 {account.username}: code={resp.code} msg={resp.msg}") E AssertionError: 登录失败 testbota: code=206 msg=账号或密码错误,请重试
0.00s
failed
test_friend_apply_rejects_self
tests/api/test_friend.py::test_friend_apply_rejects_self
tests/conftest.py:54: in primary return login_account(api_client.clone(), settings.primary) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ src/testbot/session.py:36: in login_account raise AssertionError(f"登录失败 {account.username}: code={resp.code} msg={resp.msg}") E AssertionError: 登录失败 testbota: code=206 msg=账号或密码错误,请重试
0.07s
failed
test_friend_apply_requires_vercode
tests/api/test_friend.py::test_friend_apply_requires_vercode
tests/conftest.py:54: in primary return login_account(api_client.clone(), settings.primary) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ src/testbot/session.py:36: in login_account raise AssertionError(f"登录失败 {account.username}: code={resp.code} msg={resp.msg}") E AssertionError: 登录失败 testbota: code=206 msg=账号或密码错误,请重试
0.00s
failed
test_create_list_members_and_disband
tests/api/test_group.py::test_create_list_members_and_disband
tests/conftest.py:54: in primary return login_account(api_client.clone(), settings.primary) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ src/testbot/session.py:36: in login_account raise AssertionError(f"登录失败 {account.username}: code={resp.code} msg={resp.msg}") E AssertionError: 登录失败 testbota: code=206 msg=账号或密码错误,请重试
0.00s
failed
test_group_create_requires_members
tests/api/test_group.py::test_group_create_requires_members
tests/conftest.py:54: in primary return login_account(api_client.clone(), settings.primary) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ src/testbot/session.py:36: in login_account raise AssertionError(f"登录失败 {account.username}: code={resp.code} msg={resp.msg}") E AssertionError: 登录失败 testbota: code=206 msg=账号或密码错误,请重试
0.00s
failed
test_conversation_detail_requires_channel
tests/api/test_im_chat.py::test_conversation_detail_requires_channel
tests/conftest.py:54: in primary return login_account(api_client.clone(), settings.primary) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ src/testbot/session.py:36: in login_account raise AssertionError(f"登录失败 {account.username}: code={resp.code} msg={resp.msg}") E AssertionError: 登录失败 testbota: code=206 msg=账号或密码错误,请重试
0.00s
failed
test_conversation_list
tests/api/test_im_chat.py::test_conversation_list
tests/conftest.py:54: in primary return login_account(api_client.clone(), settings.primary) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ src/testbot/session.py:36: in login_account raise AssertionError(f"登录失败 {account.username}: code={resp.code} msg={resp.msg}") E AssertionError: 登录失败 testbota: code=206 msg=账号或密码错误,请重试
0.00s
failed
test_group_chat_send_and_history
tests/api/test_im_chat.py::test_group_chat_send_and_history
tests/conftest.py:54: in primary return login_account(api_client.clone(), settings.primary) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ src/testbot/session.py:36: in login_account raise AssertionError(f"登录失败 {account.username}: code={resp.code} msg={resp.msg}") E AssertionError: 登录失败 testbota: code=206 msg=账号或密码错误,请重试
0.00s
failed
test_private_chat_send_and_history
tests/api/test_im_chat.py::test_private_chat_send_and_history
tests/conftest.py:54: in primary return login_account(api_client.clone(), settings.primary) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ src/testbot/session.py:36: in login_account raise AssertionError(f"登录失败 {account.username}: code={resp.code} msg={resp.msg}") E AssertionError: 登录失败 testbota: code=206 msg=账号或密码错误,请重试
0.00s
failed
test_typing_requires_channel
tests/api/test_im_chat.py::test_typing_requires_channel
tests/conftest.py:54: in primary return login_account(api_client.clone(), settings.primary) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ src/testbot/session.py:36: in login_account raise AssertionError(f"登录失败 {account.username}: code={resp.code} msg={resp.msg}") E AssertionError: 登录失败 testbota: code=206 msg=账号或密码错误,请重试
0.00s
failed
test_login_success_returns_token
tests/api/test_login.py::test_login_success_returns_token
tests/conftest.py:54: in primary return login_account(api_client.clone(), settings.primary) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ src/testbot/session.py:36: in login_account raise AssertionError(f"登录失败 {account.username}: code={resp.code} msg={resp.msg}") E AssertionError: 登录失败 testbota: code=206 msg=账号或密码错误,请重试
0.00s
failed
test_login_then_user_info
tests/api/test_login.py::test_login_then_user_info
tests/conftest.py:54: in primary return login_account(api_client.clone(), settings.primary) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ src/testbot/session.py:36: in login_account raise AssertionError(f"登录失败 {account.username}: code={resp.code} msg={resp.msg}") E AssertionError: 登录失败 testbota: code=206 msg=账号或密码错误,请重试
0.00s
failed
test_duplicate_register_rejected
tests/api/test_register.py::test_duplicate_register_rejected
tests/conftest.py:54: in primary return login_account(api_client.clone(), settings.primary) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ src/testbot/session.py:36: in login_account raise AssertionError(f"登录失败 {account.username}: code={resp.code} msg={resp.msg}") E AssertionError: 登录失败 testbota: code=206 msg=账号或密码错误,请重试
0.00s
failed
test_register_check_and_challenge_then_register
tests/api/test_register.py::test_register_check_and_challenge_then_register
tests/api/test_register.py:44: in test_register_check_and_challenge_then_register assert check.code == SUCCESS E AssertionError: assert 10097 == 200 E + where 10097 = ApiResponse(http_status=200, code=10097, msg='查询用户信息失败', data=None, elapsed_ms=1.2027959965053014, raw={'code': 10097,...e': '***'}, http_status=200, response_body={'code': '***', 'msg': '查询用户信息失败', 'data': None}, elapsed_ms=1.2, error='')).code
HTTP 1 次
POST /api/v1/user/register/check HTTP 200 1.2 ms
请求
{
  "account": "tb831f562b",
  "auth_code": "***",
  "code": "***",
  "type": 2
}
响应
{
  "code": "***",
  "data": null,
  "msg": "\u67e5\u8be2\u7528\u6237\u4fe1\u606f\u5931\u8d25"
}
0.00s
failed
test_register_rejects_short_password
tests/api/test_register.py::test_register_rejects_short_password
tests/api/test_register.py:35: in test_register_rejects_short_password assert resp.code == PARAM_ERROR E AssertionError: assert 10301 == 10001 E + where 10301 = ApiResponse(http_status=200, code=10301, msg='人机验证失败', data=None, elapsed_ms=2.6707259967224672, raw={'code': 10301, '...er': 'ok'}}, http_status=200, response_body={'code': '***', 'msg': '人机验证失败', 'data': None}, elapsed_ms=2.67, error='')).code
HTTP 2 次
POST /api/v1/user/registration-challenge HTTP 200 2.93 ms
请求
{
  "account": "tb14ee1d5c",
  "device_id": "testbot-device-001",
  "operation_id": "bfe434e8-8c1a-4b13-bc79-cb327c4ddee7"
}
响应
{
  "code": "***",
  "data": {
    "challenge_id": "0d8cc750-7d7e-4e01-9383-23f1ed22b726",
    "expires_at": "2026-09-14T11:23:00Z",
    "image_base64": "iVBORw0KGgoAAAANSUhEUgAAAEgAAAAYCAIAAADWASznAAAAf0lEQVR4nOyVwQrAMAhD5+j//3J22MWLoJSy9dmcHARJWFKHpIuI+2sBq3CM7YbhP8zsHSRFc7Qow6nyZ/Rg/xjWmFGf+5EhRZme6WG1kxk9HtgoYo316Ni5YxsAa6xfx6qLVnesqgcbRayxfh3L3I2/8T2wUcQaw3bsCQAA//+a1oQmwIoEEgAAAABJRU5ErkJggg==",
    "kind": "IMAGE",
    "mime_type": "image/png"
  },
  "msg": "\u6210\u529f"
}
POST /api/v1/user/username/register HTTP 200 2.67 ms
请求
{
  "account": "tb14ee1d5c",
  "confirmation": "***",
  "device": {
    "channel": "testbot",
    "device_id": "testbot-device-001",
    "device_model": "pytest",
    "device_name": "SuperIM-TestBot",
    "mobile_device_type": 1
  },
  "flag": 0,
  "gender": 1,
  "human_verification": {
    "answer": "ok",
    "challenge_id": "0d8cc750-7d7e-4e01-9383-23f1ed22b726"
  },
  "nickname": "Bot14ee",
  "operation_id": "20306fa2-658a-4d9c-b207-2ea4f31167e3",
  "password": "***",
  "profile": {
    "display_name": "Bot14ee",
    "gender": 1
  },
  "username": "tb14ee1d5c"
}
响应
{
  "code": "***",
  "data": null,
  "msg": "\u4eba\u673a\u9a8c\u8bc1\u5931\u8d25"
}
0.01s
failed
test_search_by_username
tests/api/test_user.py::test_search_by_username
tests/conftest.py:54: in primary return login_account(api_client.clone(), settings.primary) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ src/testbot/session.py:36: in login_account raise AssertionError(f"登录失败 {account.username}: code={resp.code} msg={resp.msg}") E AssertionError: 登录失败 testbota: code=206 msg=账号或密码错误,请重试
0.00s
failed
test_search_self_by_uid
tests/api/test_user.py::test_search_self_by_uid
tests/conftest.py:54: in primary return login_account(api_client.clone(), settings.primary) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ src/testbot/session.py:36: in login_account raise AssertionError(f"登录失败 {account.username}: code={resp.code} msg={resp.msg}") E AssertionError: 登录失败 testbota: code=206 msg=账号或密码错误,请重试
0.00s
passed
test_group_list_without_auth_fails
tests/api/test_group.py::test_group_list_without_auth_fails
HTTP 1 次
GET /api/v1/group/list HTTP 200 1.7 ms
请求
null
响应
{
  "code": "***",
  "msg": "token\u5931\u6548,\u8bf7\u91cd\u65b0\u767b\u5f55\uff01"
}
0.01s
passed
test_common_config
tests/api/test_health.py::test_common_config
HTTP 1 次
GET /api/v1/common/config HTTP 200 1.39 ms
请求
null
响应
{
  "code": "***",
  "data": null,
  "msg": "\u6210\u529f"
}
0.00s
passed
test_health_live
tests/api/test_health.py::test_health_live
HTTP 1 次
GET /health/live HTTP 200 1.31 ms
请求
null
响应
{
  "status": "alive"
}
0.00s
passed
test_health_ready
tests/api/test_health.py::test_health_ready
HTTP 1 次
GET /health/ready HTTP 200 0.93 ms
请求
null
响应
{
  "checks": {
    "mysql": "up",
    "redis": "up"
  },
  "status": "ready"
}
0.00s
passed
test_login_empty_username
tests/api/test_login.py::test_login_empty_username
HTTP 1 次
POST /api/v1/user/login HTTP 200 1.16 ms
请求
{
  "device": {
    "channel": "testbot",
    "device_id": "testbot-device-001",
    "device_model": "pytest",
    "device_name": "SuperIM-TestBot",
    "mobile_device_type": 1
  },
  "flag": 0,
  "operation_id": "e63aa5f4-ea01-4c39-8300-cf82b98b17f6",
  "password": "***",
  "username": ""
}
响应
{
  "code": "***",
  "data": null,
  "msg": "\u7528\u6237\u540d\u4e0d\u80fd\u4e3a\u7a7a\uff01"
}
0.00s
passed
test_login_wrong_password
tests/api/test_login.py::test_login_wrong_password
HTTP 1 次
POST /api/v1/user/login HTTP 200 3.65 ms
请求
{
  "device": {
    "channel": "testbot",
    "device_id": "testbot-device-001",
    "device_model": "pytest",
    "device_name": "SuperIM-TestBot",
    "mobile_device_type": 1
  },
  "flag": 0,
  "operation_id": "a83f20e3-0801-48b2-80c6-78633bb9436a",
  "password": "***",
  "username": "testbota"
}
响应
{
  "code": "***",
  "data": null,
  "msg": "\u8d26\u53f7\u6216\u5bc6\u7801\u9519\u8bef\uff0c\u8bf7\u91cd\u8bd5"
}
0.00s
passed
test_protected_endpoint_requires_token
tests/api/test_login.py::test_protected_endpoint_requires_token
HTTP 1 次
GET /api/v1/user/info HTTP 200 1.47 ms
请求
null
响应
{
  "code": "***",
  "msg": "token\u5931\u6548,\u8bf7\u91cd\u65b0\u767b\u5f55\uff01"
}
0.01s
passed
test_register_check_rejects_short_username
tests/api/test_register.py::test_register_check_rejects_short_username
HTTP 1 次
POST /api/v1/user/register/check HTTP 200 0.94 ms
请求
{
  "account": "ab",
  "auth_code": "***",
  "code": "***",
  "type": 2
}
响应
{
  "code": "***",
  "data": null,
  "msg": "\u8d26\u53f7\u5fc5\u987b\u662f\u957f\u5ea64-15\u4f4d\u5b57\u6bcd\u6570\u5b57\u7ec4\u5408"
}
0.00s
passed
test_register_rejects_empty_username
tests/api/test_register.py::test_register_rejects_empty_username
HTTP 1 次
POST /api/v1/user/username/register HTTP 200 1.0 ms
请求
{
  "account": "",
  "confirmation": "***",
  "device": {
    "channel": "testbot",
    "device_id": "testbot-device-001",
    "device_model": "pytest",
    "device_name": "SuperIM-TestBot",
    "mobile_device_type": 1
  },
  "flag": 0,
  "gender": 1,
  "human_verification": {
    "answer": "ok",
    "challenge_id": "x"
  },
  "nickname": "Nick",
  "operation_id": "f5e2a9fd-17bb-4d6b-a568-c5f9628b133b",
  "password": "***",
  "profile": {
    "display_name": "Nick",
    "gender": 1
  },
  "username": ""
}
响应
{
  "code": "***",
  "data": null,
  "msg": "\u53c2\u6570\u9519\u8bef"
}
0.00s