feat: 重构测试框架 — 覆盖 6 端 (管理端 + 小程序 + 4 个移动端)
目录结构: tests/web/admin/ 管理端 (Playwright) tests/web/mini_program/ 司机端小程序 (Playwright/微信 WebView) tests/app/driver_android/ 司机安卓 (Appium) tests/app/shipper_android/ 货主安卓 (Appium) tests/app/driver_ios/ 司机苹果 (Appium) tests/app/shipper_ios/ 货主苹果 (Appium) 公共模块: tests/app/_shared.py driver+ensure_logged_in 工厂 tests/app/_base_page.py App Page Object 基类 配置: test_config.yaml 拆分为 6 个独立 section + 货主账号
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
"""司机安卓端 — 冒烟测试。"""
|
||||
|
||||
import pytest
|
||||
|
||||
pytestmark = [pytest.mark.driver_android]
|
||||
|
||||
|
||||
class TestDriverAndroidSmoke:
|
||||
"""司机安卓端基础验证。"""
|
||||
|
||||
@pytest.mark.p0
|
||||
@pytest.mark.smoke
|
||||
def test_home_page_loaded(self, driver, ensure_logged_in):
|
||||
"""验证登录态有效,首页正常。"""
|
||||
ensure_logged_in(driver)
|
||||
from appium.webdriver.common.appiumby import AppiumBy
|
||||
home = driver.find_element(AppiumBy.ACCESSIBILITY_ID, "tab_home")
|
||||
assert home.is_displayed(), "首页 tab 应可见"
|
||||
Reference in New Issue
Block a user