feat: 重构测试框架并优化代码结构

refactor(tests): 将e2e_tests迁移到tests_suite和api_integration_tests
style: 为Java类添加文档注释
docs: 更新.gitignore和配置文件
test: 添加性能测试和Playwright测试脚本
chore: 清理旧测试文件和配置
This commit is contained in:
张翔
2026-03-14 13:49:39 +08:00
parent 9e187f42e5
commit c50ccd258f
178 changed files with 8655 additions and 2519 deletions
+58
View File
@@ -0,0 +1,58 @@
import pytest
from typing import Generator, Dict, Any
from faker import Faker
from test_utils.data_manager.data_generator import UserDataFactory
fake = Faker("zh_CN")
@pytest.fixture(scope="function")
def test_user_data() -> Dict[str, Any]:
return UserDataFactory.create_user_data()
@pytest.fixture(scope="function")
def test_role_data() -> Dict[str, Any]:
return {
"role_name": fake.word(),
"role_key": fake.word(),
"description": fake.sentence(),
"status": "0",
"permissions": []
}
@pytest.fixture(scope="function")
def test_menu_data() -> Dict[str, Any]:
return {
"menu_name": fake.word(),
"parent_id": 0,
"order_num": fake.random_int(1, 100),
"path": f"/{fake.word()}",
"component": f"{fake.word()}/{fake.word()}",
"menu_type": "C",
"visible": "0",
"status": "0"
}
@pytest.fixture(scope="function")
def test_dict_data() -> Dict[str, Any]:
return {
"dict_name": fake.word(),
"dict_type": fake.word(),
"status": "0",
"remark": fake.sentence()
}
@pytest.fixture(scope="function")
def test_config_data() -> Dict[str, Any]:
return {
"config_name": fake.word(),
"config_key": f"sys.{fake.word()}",
"config_value": fake.word(),
"config_type": "Y",
"remark": fake.sentence()
}