diff --git a/.github/workflows/hrp-release.yml b/.github/workflows/hrp-release.yml index 4b3fbf8f..304584bb 100644 --- a/.github/workflows/hrp-release.yml +++ b/.github/workflows/hrp-release.yml @@ -34,16 +34,5 @@ jobs: extra_files: LICENSE README.md docs/CHANGELOG.md post_command: | echo "ASSET_PATH=$INPUT_PROJECT_PATH/$BUILD_ARTIFACTS_FOLDER/$RELEASE_ASSET_FILE" >> $GITHUB_ENV - - name: Setup aliyun OSS - uses: manyuanrong/setup-ossutil@v2.0 - with: - endpoint: "oss-cn-beijing.aliyuncs.com" - access-key-id: ${{ secrets.ALIYUN_ACCESSKEY_ID }} - access-key-secret: ${{ secrets.ALIYUN_ACCESSKEY_SECRET }} - - name: Upload artifacts to aliyun OSS - run: | - ossutil cp -rf internal/version/VERSION oss://httprunner/ - ossutil cp -rf scripts/install.sh oss://httprunner/ - ossutil cp -rf ${{ env.ASSET_PATH }} oss://httprunner/ - name: Test install.sh run: bash -c "$(curl -ksSL https://httprunner.com/script/install.sh)" diff --git a/.github/workflows/smoketest.yml b/.github/workflows/smoketest.yml index a91515ca..83df9a2b 100644 --- a/.github/workflows/smoketest.yml +++ b/.github/workflows/smoketest.yml @@ -4,64 +4,19 @@ on: push: branches: - master - - v2 - - v3 pull_request: env: DISABLE_GA: "true" jobs: - smoke-test-httprunner: - - name: smoketest - httprunner - ${{ matrix.python-version }} on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - services: - service-httpbin: - image: kennethreitz/httpbin - ports: - - 80:80 - strategy: - fail-fast: false - max-parallel: 6 - matrix: - python-version: ['3.7', '3.8', '3.9', '3.10'] - os: [ubuntu-latest] # FIXME: docker services are not supported on macos-latest, windows-latest - - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - architecture: x64 - - name: Install dependencies - run: | - pip install poetry - poetry --version - poetry install -vv -E upload - - name: Test build package - run: | - poetry build - ls -l dist/ - - name: Test commands - run: | - poetry run hrun -V - poetry run httprunner run -h - - name: Run smoketest - postman echo - run: | - poetry run hrun examples/postman_echo/request_methods - - name: Run smoketest - httpbin - run: | - poetry run hrun examples/httpbin/ - smoke-test-hrp: name: smoketest - hrp - ${{ matrix.go-version }} on ${{ matrix.os }} strategy: fail-fast: false matrix: go-version: - - 1.18.x + - 1.23.x os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: @@ -75,11 +30,6 @@ jobs: run: make build - name: Run smoketest - run with parameters run: ./output/hrp run examples/hrp/parameters_test.json - - name: Run smoketest - boom with parameters - run: ./output/hrp boom examples/hrp/parameters_test.json --spawn-count 10 --spawn-rate 10 --loop-count 10 - - name: Run smoketest - boom with rendezvous - run: | - ./output/hrp boom examples/hrp/rendezvous_test.json --spawn-count 10 --spawn-rate 10 --loop-count 10 - name: Run hrp convert --pytest run: ./output/hrp convert examples/postman_echo/request_methods/ - name: Run hrp pytest diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index cb66a908..0a854858 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -4,71 +4,18 @@ on: push: branches: - master - - v2 - - v3 pull_request: env: DISABLE_GA: "true" jobs: - py-httprunner: - runs-on: ${{ matrix.os }} - services: - service-httpbin: - image: kennethreitz/httpbin - ports: - - 80:80 - strategy: - fail-fast: false - max-parallel: 12 - matrix: - python-version: ['3.7', '3.8', '3.9', '3.10'] - os: [ubuntu-latest] # FIXME: docker services are not supported on macos-latest, windows-latest - - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - architecture: x64 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install poetry - poetry --version - poetry install -vv - - name: Run unittest for httprunner - run: | - poetry run httprunner - poetry run hmake - poetry run hrun - poetry run coverage run --source=httprunner -m pytest httprunner - - name: coverage report - run: | - poetry run coverage xml - poetry run coverage report -m - - name: Codecov - uses: codecov/codecov-action@v3 - with: - # User defined upload name. Visible in Codecov UI - name: httprunner - # Repository upload token - get it from codecov.io - token: ${{ secrets.CODECOV_TOKEN }} - # Path to coverage file to upload - file: ./coverage.xml - # Flag upload to group coverage metrics (e.g. unittests | integration | ui,chrome) - flags: unittests - # Specify whether or not CI build should fail if Codecov runs into an error during upload - fail_ci_if_error: true - - go-hrp: + test-hrp: strategy: fail-fast: false matrix: go-version: - - 1.18.x + - 1.23.x os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: diff --git a/docs/cmd/hrp.md b/docs/cmd/hrp.md index 944e56ab..22b7a5a2 100644 --- a/docs/cmd/hrp.md +++ b/docs/cmd/hrp.md @@ -63,4 +63,4 @@ Copyright © 2017-present debugtalk. Apache-2.0 License. * [hrp startproject](hrp_startproject.md) - Create a scaffold project * [hrp wiki](hrp_wiki.md) - visit https://httprunner.com -###### Auto generated by spf13/cobra on 27-Jun-2025 +###### Auto generated by spf13/cobra on 28-Jun-2025 diff --git a/docs/cmd/hrp_adb.md b/docs/cmd/hrp_adb.md index f7b1b740..1d75c96a 100644 --- a/docs/cmd/hrp_adb.md +++ b/docs/cmd/hrp_adb.md @@ -23,4 +23,4 @@ simple utils for android device management * [hrp adb install](hrp_adb_install.md) - push package to the device and install them automatically * [hrp adb screencap](hrp_adb_screencap.md) - Start android screen capture -###### Auto generated by spf13/cobra on 27-Jun-2025 +###### Auto generated by spf13/cobra on 28-Jun-2025 diff --git a/docs/cmd/hrp_adb_devices.md b/docs/cmd/hrp_adb_devices.md index 015e76e9..a0aa341b 100644 --- a/docs/cmd/hrp_adb_devices.md +++ b/docs/cmd/hrp_adb_devices.md @@ -24,4 +24,4 @@ hrp adb devices [flags] * [hrp adb](hrp_adb.md) - simple utils for android device management -###### Auto generated by spf13/cobra on 27-Jun-2025 +###### Auto generated by spf13/cobra on 28-Jun-2025 diff --git a/docs/cmd/hrp_adb_install.md b/docs/cmd/hrp_adb_install.md index d47962af..16c1e90a 100644 --- a/docs/cmd/hrp_adb_install.md +++ b/docs/cmd/hrp_adb_install.md @@ -28,4 +28,4 @@ hrp adb install [flags] PACKAGE * [hrp adb](hrp_adb.md) - simple utils for android device management -###### Auto generated by spf13/cobra on 27-Jun-2025 +###### Auto generated by spf13/cobra on 28-Jun-2025 diff --git a/docs/cmd/hrp_adb_screencap.md b/docs/cmd/hrp_adb_screencap.md index 8e950a6b..22179c91 100644 --- a/docs/cmd/hrp_adb_screencap.md +++ b/docs/cmd/hrp_adb_screencap.md @@ -25,4 +25,4 @@ hrp adb screencap [flags] * [hrp adb](hrp_adb.md) - simple utils for android device management -###### Auto generated by spf13/cobra on 27-Jun-2025 +###### Auto generated by spf13/cobra on 28-Jun-2025 diff --git a/docs/cmd/hrp_build.md b/docs/cmd/hrp_build.md index dc5ebdb2..109582be 100644 --- a/docs/cmd/hrp_build.md +++ b/docs/cmd/hrp_build.md @@ -36,4 +36,4 @@ hrp build $path ... [flags] * [hrp](hrp.md) - All-in-One Testing Framework for API, UI and Performance -###### Auto generated by spf13/cobra on 27-Jun-2025 +###### Auto generated by spf13/cobra on 28-Jun-2025 diff --git a/docs/cmd/hrp_convert.md b/docs/cmd/hrp_convert.md index d8c37ed1..1d34c9c9 100644 --- a/docs/cmd/hrp_convert.md +++ b/docs/cmd/hrp_convert.md @@ -34,4 +34,4 @@ hrp convert $path... [flags] * [hrp](hrp.md) - All-in-One Testing Framework for API, UI and Performance -###### Auto generated by spf13/cobra on 27-Jun-2025 +###### Auto generated by spf13/cobra on 28-Jun-2025 diff --git a/docs/cmd/hrp_ios.md b/docs/cmd/hrp_ios.md index 63500f19..d91fab1b 100644 --- a/docs/cmd/hrp_ios.md +++ b/docs/cmd/hrp_ios.md @@ -29,4 +29,4 @@ simple utils for ios device management * [hrp ios uninstall](hrp_ios_uninstall.md) - uninstall package automatically * [hrp ios xctest](hrp_ios_xctest.md) - run xctest -###### Auto generated by spf13/cobra on 27-Jun-2025 +###### Auto generated by spf13/cobra on 28-Jun-2025 diff --git a/docs/cmd/hrp_ios_apps.md b/docs/cmd/hrp_ios_apps.md index 1e42aec4..eb02b1fc 100644 --- a/docs/cmd/hrp_ios_apps.md +++ b/docs/cmd/hrp_ios_apps.md @@ -26,4 +26,4 @@ hrp ios apps [flags] * [hrp ios](hrp_ios.md) - simple utils for ios device management -###### Auto generated by spf13/cobra on 27-Jun-2025 +###### Auto generated by spf13/cobra on 28-Jun-2025 diff --git a/docs/cmd/hrp_ios_devices.md b/docs/cmd/hrp_ios_devices.md index 13e29866..fbd2a6ee 100644 --- a/docs/cmd/hrp_ios_devices.md +++ b/docs/cmd/hrp_ios_devices.md @@ -24,4 +24,4 @@ hrp ios devices [flags] * [hrp ios](hrp_ios.md) - simple utils for ios device management -###### Auto generated by spf13/cobra on 27-Jun-2025 +###### Auto generated by spf13/cobra on 28-Jun-2025 diff --git a/docs/cmd/hrp_ios_install.md b/docs/cmd/hrp_ios_install.md index c3985c73..74bcc464 100644 --- a/docs/cmd/hrp_ios_install.md +++ b/docs/cmd/hrp_ios_install.md @@ -25,4 +25,4 @@ hrp ios install [flags] PACKAGE * [hrp ios](hrp_ios.md) - simple utils for ios device management -###### Auto generated by spf13/cobra on 27-Jun-2025 +###### Auto generated by spf13/cobra on 28-Jun-2025 diff --git a/docs/cmd/hrp_ios_mount.md b/docs/cmd/hrp_ios_mount.md index 26efd7d9..b08ceb11 100644 --- a/docs/cmd/hrp_ios_mount.md +++ b/docs/cmd/hrp_ios_mount.md @@ -28,4 +28,4 @@ hrp ios mount [flags] * [hrp ios](hrp_ios.md) - simple utils for ios device management -###### Auto generated by spf13/cobra on 27-Jun-2025 +###### Auto generated by spf13/cobra on 28-Jun-2025 diff --git a/docs/cmd/hrp_ios_ps.md b/docs/cmd/hrp_ios_ps.md index 5696a24e..7e44e89a 100644 --- a/docs/cmd/hrp_ios_ps.md +++ b/docs/cmd/hrp_ios_ps.md @@ -26,4 +26,4 @@ hrp ios ps [flags] * [hrp ios](hrp_ios.md) - simple utils for ios device management -###### Auto generated by spf13/cobra on 27-Jun-2025 +###### Auto generated by spf13/cobra on 28-Jun-2025 diff --git a/docs/cmd/hrp_ios_reboot.md b/docs/cmd/hrp_ios_reboot.md index 9feb9fb4..0ff1628f 100644 --- a/docs/cmd/hrp_ios_reboot.md +++ b/docs/cmd/hrp_ios_reboot.md @@ -25,4 +25,4 @@ hrp ios reboot [flags] * [hrp ios](hrp_ios.md) - simple utils for ios device management -###### Auto generated by spf13/cobra on 27-Jun-2025 +###### Auto generated by spf13/cobra on 28-Jun-2025 diff --git a/docs/cmd/hrp_ios_tunnel.md b/docs/cmd/hrp_ios_tunnel.md index b80eeedc..07698c8d 100644 --- a/docs/cmd/hrp_ios_tunnel.md +++ b/docs/cmd/hrp_ios_tunnel.md @@ -24,4 +24,4 @@ hrp ios tunnel [flags] * [hrp ios](hrp_ios.md) - simple utils for ios device management -###### Auto generated by spf13/cobra on 27-Jun-2025 +###### Auto generated by spf13/cobra on 28-Jun-2025 diff --git a/docs/cmd/hrp_ios_uninstall.md b/docs/cmd/hrp_ios_uninstall.md index d2ebcb5a..4674cf29 100644 --- a/docs/cmd/hrp_ios_uninstall.md +++ b/docs/cmd/hrp_ios_uninstall.md @@ -26,4 +26,4 @@ hrp ios uninstall [flags] PACKAGE * [hrp ios](hrp_ios.md) - simple utils for ios device management -###### Auto generated by spf13/cobra on 27-Jun-2025 +###### Auto generated by spf13/cobra on 28-Jun-2025 diff --git a/docs/cmd/hrp_ios_xctest.md b/docs/cmd/hrp_ios_xctest.md index 001fb2e1..57807f93 100644 --- a/docs/cmd/hrp_ios_xctest.md +++ b/docs/cmd/hrp_ios_xctest.md @@ -28,4 +28,4 @@ hrp ios xctest [flags] * [hrp ios](hrp_ios.md) - simple utils for ios device management -###### Auto generated by spf13/cobra on 27-Jun-2025 +###### Auto generated by spf13/cobra on 28-Jun-2025 diff --git a/docs/cmd/hrp_mcp-server.md b/docs/cmd/hrp_mcp-server.md index f906af4b..28e05be4 100644 --- a/docs/cmd/hrp_mcp-server.md +++ b/docs/cmd/hrp_mcp-server.md @@ -28,4 +28,4 @@ hrp mcp-server [flags] * [hrp](hrp.md) - All-in-One Testing Framework for API, UI and Performance -###### Auto generated by spf13/cobra on 27-Jun-2025 +###### Auto generated by spf13/cobra on 28-Jun-2025 diff --git a/docs/cmd/hrp_mcphost.md b/docs/cmd/hrp_mcphost.md index bebdbc4f..dce4bb76 100644 --- a/docs/cmd/hrp_mcphost.md +++ b/docs/cmd/hrp_mcphost.md @@ -31,4 +31,4 @@ hrp mcphost [flags] * [hrp](hrp.md) - All-in-One Testing Framework for API, UI and Performance -###### Auto generated by spf13/cobra on 27-Jun-2025 +###### Auto generated by spf13/cobra on 28-Jun-2025 diff --git a/docs/cmd/hrp_pytest.md b/docs/cmd/hrp_pytest.md index a2b0a11c..20f2acca 100644 --- a/docs/cmd/hrp_pytest.md +++ b/docs/cmd/hrp_pytest.md @@ -24,4 +24,4 @@ hrp pytest $path ... [flags] * [hrp](hrp.md) - All-in-One Testing Framework for API, UI and Performance -###### Auto generated by spf13/cobra on 27-Jun-2025 +###### Auto generated by spf13/cobra on 28-Jun-2025 diff --git a/docs/cmd/hrp_report.md b/docs/cmd/hrp_report.md index d781cea7..c1a63415 100644 --- a/docs/cmd/hrp_report.md +++ b/docs/cmd/hrp_report.md @@ -33,4 +33,4 @@ hrp report [result_folder] [flags] * [hrp](hrp.md) - All-in-One Testing Framework for API, UI and Performance -###### Auto generated by spf13/cobra on 27-Jun-2025 +###### Auto generated by spf13/cobra on 28-Jun-2025 diff --git a/docs/cmd/hrp_run.md b/docs/cmd/hrp_run.md index 12c2cb62..3bfca80f 100644 --- a/docs/cmd/hrp_run.md +++ b/docs/cmd/hrp_run.md @@ -46,4 +46,4 @@ hrp run $path... [flags] * [hrp](hrp.md) - All-in-One Testing Framework for API, UI and Performance -###### Auto generated by spf13/cobra on 27-Jun-2025 +###### Auto generated by spf13/cobra on 28-Jun-2025 diff --git a/docs/cmd/hrp_server.md b/docs/cmd/hrp_server.md index da60a80d..cd8c3e21 100644 --- a/docs/cmd/hrp_server.md +++ b/docs/cmd/hrp_server.md @@ -30,4 +30,4 @@ hrp server start [flags] * [hrp](hrp.md) - All-in-One Testing Framework for API, UI and Performance -###### Auto generated by spf13/cobra on 27-Jun-2025 +###### Auto generated by spf13/cobra on 28-Jun-2025 diff --git a/docs/cmd/hrp_startproject.md b/docs/cmd/hrp_startproject.md index e0605b43..64784a0e 100644 --- a/docs/cmd/hrp_startproject.md +++ b/docs/cmd/hrp_startproject.md @@ -29,4 +29,4 @@ hrp startproject $project_name [flags] * [hrp](hrp.md) - All-in-One Testing Framework for API, UI and Performance -###### Auto generated by spf13/cobra on 27-Jun-2025 +###### Auto generated by spf13/cobra on 28-Jun-2025 diff --git a/docs/cmd/hrp_wiki.md b/docs/cmd/hrp_wiki.md index 042fd8c0..643ae924 100644 --- a/docs/cmd/hrp_wiki.md +++ b/docs/cmd/hrp_wiki.md @@ -24,4 +24,4 @@ hrp wiki [flags] * [hrp](hrp.md) - All-in-One Testing Framework for API, UI and Performance -###### Auto generated by spf13/cobra on 27-Jun-2025 +###### Auto generated by spf13/cobra on 28-Jun-2025 diff --git a/examples/uitest/android_e2e_delay_test.json b/examples/uitest/android_e2e_delay_test.json index d3707119..d289d61f 100644 --- a/examples/uitest/android_e2e_delay_test.json +++ b/examples/uitest/android_e2e_delay_test.json @@ -8,7 +8,13 @@ "android": [ { "serial": "$device", - "log_on": true + "log_on": true, + "adb_server_host": "localhost", + "adb_server_port": 5037, + "uia2_ip": "localhost", + "uia2_port": 6790, + "uia2_server_package_name": "io.appium.uiautomator2.server", + "uia2_server_test_package_name": "io.appium.uiautomator2.server.test" } ] }, @@ -16,6 +22,7 @@ { "name": "启动抖音", "android": { + "os_type": "android", "actions": [ { "method": "app_terminate", @@ -33,7 +40,7 @@ "params": "抖音", "options": { "max_retry_times": 5, - "offset": [ + "tap_offset": [ 0, -50 ] @@ -57,6 +64,7 @@ { "name": "点击放大镜", "android": { + "os_type": "android", "actions": [ { "method": "tap_xy", @@ -64,9 +72,7 @@ 0.9, 0.08 ], - "options": { - - } + "options": {} }, { "method": "sleep", @@ -78,13 +84,12 @@ { "name": "输入账号名称", "android": { + "os_type": "android", "actions": [ { "method": "input", "params": "$ups", - "options": { - - } + "options": {} }, { "method": "sleep", @@ -96,13 +101,12 @@ { "name": "点击搜索", "android": { + "os_type": "android", "actions": [ { "method": "tap_ocr", "params": "搜索", - "options": { - - } + "options": {} }, { "method": "sleep", @@ -113,14 +117,16 @@ }, { "name": "端到端采集", + "loops": 5, "android": { + "os_type": "android", "actions": [ { "method": "tap_ocr", "params": "直播中", "options": { - "ignore_NotFoundError": true, - "index": -1 + "index": -1, + "ignore_NotFoundError": true } }, { @@ -139,8 +145,7 @@ } } ] - }, - "loops": 5 + } } ] } diff --git a/examples/uitest/android_expert_test.json b/examples/uitest/android_expert_test.json index 859ec03a..1b11d98d 100644 --- a/examples/uitest/android_expert_test.json +++ b/examples/uitest/android_expert_test.json @@ -10,8 +10,14 @@ "android": [ { "serial": "$device", + "log_on": true, + "adb_server_host": "localhost", + "adb_server_port": 5037, "uia2": true, - "log_on": true + "uia2_ip": "localhost", + "uia2_port": 6790, + "uia2_server_package_name": "io.appium.uiautomator2.server", + "uia2_server_test_package_name": "io.appium.uiautomator2.server.test" } ] }, @@ -19,6 +25,7 @@ { "name": "app_launch 以及 ui_foreground_app equal 断言", "android": { + "os_type": "android", "actions": [ { "method": "app_launch", @@ -42,6 +49,7 @@ { "name": "home 以及 swipe_to_tap_app 默认配置", "android": { + "os_type": "android", "actions": [ { "method": "home" @@ -61,6 +69,7 @@ { "name": "处理弹窗 close_popups 默认配置 以及 ui_ocr exists 断言", "android": { + "os_type": "android", "actions": [ { "method": "close_popups", @@ -80,6 +89,7 @@ { "name": "【直播】feed头像或卡片进房 swipe_to_tap_texts 自定义配置", "android": { + "os_type": "android", "actions": [ { "method": "swipe_to_tap_texts", @@ -112,6 +122,7 @@ { "name": "sleep 10s", "android": { + "os_type": "android", "actions": [ { "method": "sleep", @@ -123,9 +134,10 @@ { "name": "【直播】swipe 自定义配置 以及 back", "android": { + "os_type": "android", "actions": [ { - "method": "swipe", + "method": "swipe_coordinate", "params": [ 0.5, 0.7, @@ -141,8 +153,7 @@ "params": 5 }, { - "method": "back", - "options": {} + "method": "back" }, { "method": "sleep", @@ -154,6 +165,7 @@ { "name": "【搜索】点击放大镜 tap_xy 自定义配置", "android": { + "os_type": "android", "actions": [ { "method": "tap_xy", @@ -175,6 +187,7 @@ { "name": "【搜索】输入query词 input", "android": { + "os_type": "android", "actions": [ { "method": "input", @@ -193,6 +206,7 @@ { "name": "【搜索】点击搜索按钮 tap_ocr 自定义配置", "android": { + "os_type": "android", "actions": [ { "method": "tap_ocr", @@ -211,6 +225,7 @@ { "name": "选择直播页签 tap_ocr 默认配置", "android": { + "os_type": "android", "actions": [ { "method": "tap_ocr", @@ -227,6 +242,7 @@ { "name": "【生活服务】进入直播间 tap_xy", "android": { + "os_type": "android", "actions": [ { "method": "tap_xy", @@ -246,6 +262,7 @@ { "name": "【生活服务】点击货架商品 tap_ocr 自定义配置", "android": { + "os_type": "android", "actions": [ { "method": "tap_cv", @@ -267,6 +284,7 @@ { "name": "app_terminate 以及 ui_foreground_app not_equal 断言", "android": { + "os_type": "android", "actions": [ { "method": "app_terminate", @@ -290,6 +308,7 @@ { "name": "home 以及 swipe_to_tap_app 自定义配置", "android": { + "os_type": "android", "actions": [ { "method": "home" @@ -300,7 +319,7 @@ "options": { "max_retry_times": 5, "interval": 1, - "offset": [ + "tap_offset": [ 0, -50 ] @@ -316,6 +335,7 @@ { "name": "处理弹窗 close_popups 自定义配置 以及 ui_ocr exists 断言", "android": { + "os_type": "android", "actions": [ { "method": "close_popups", @@ -338,6 +358,7 @@ { "name": "返回主界面,并打开本地时间戳", "android": { + "os_type": "android", "actions": [ { "method": "home" @@ -366,7 +387,9 @@ }, { "name": "screeshot 以及 sleep_random", + "loops": 3, "android": { + "os_type": "android", "actions": [ { "method": "screenshot", @@ -380,8 +403,7 @@ ] } ] - }, - "loops": 3 + } } ] -} \ No newline at end of file +} diff --git a/examples/uitest/harmony_e2e_delay_test.json b/examples/uitest/harmony_e2e_delay_test.json index dec1492e..dc57f7ed 100644 --- a/examples/uitest/harmony_e2e_delay_test.json +++ b/examples/uitest/harmony_e2e_delay_test.json @@ -16,6 +16,7 @@ { "name": "启动抖音", "harmony": { + "os_type": "harmony", "actions": [ { "method": "app_terminate", @@ -24,9 +25,7 @@ { "method": "swipe_to_tap_app", "params": "com.ss.hm.ugc.aweme", - "options": { - - } + "options": {} }, { "method": "home" @@ -36,7 +35,7 @@ "params": "抖音", "options": { "max_retry_times": 5, - "offset": [ + "tap_offset": [ 0, -50 ] @@ -60,6 +59,7 @@ { "name": "点击放大镜", "harmony": { + "os_type": "harmony", "actions": [ { "method": "tap_xy", @@ -67,9 +67,7 @@ 0.9, 0.08 ], - "options": { - - } + "options": {} }, { "method": "sleep", @@ -81,13 +79,12 @@ { "name": "输入账号名称", "harmony": { + "os_type": "harmony", "actions": [ { "method": "input", "params": "$ups", - "options": { - - } + "options": {} }, { "method": "sleep", @@ -99,13 +96,12 @@ { "name": "点击搜索", "harmony": { + "os_type": "harmony", "actions": [ { "method": "tap_ocr", "params": "搜索", - "options": { - - } + "options": {} }, { "method": "sleep", @@ -116,14 +112,16 @@ }, { "name": "端到端采集", + "loops": 5, "harmony": { + "os_type": "harmony", "actions": [ { "method": "tap_ocr", "params": "直播中", "options": { - "ignore_NotFoundError": true, - "index": -1 + "index": -1, + "ignore_NotFoundError": true } }, { @@ -142,8 +140,7 @@ } } ] - }, - "loops": 5 + } } ] } diff --git a/examples/uitest/ios_expert_test.json b/examples/uitest/ios_expert_test.json index 55a0e3d6..3693d169 100644 --- a/examples/uitest/ios_expert_test.json +++ b/examples/uitest/ios_expert_test.json @@ -20,6 +20,7 @@ { "name": "启动应用程序 app_launch", "ios": { + "os_type": "ios", "actions": [ { "method": "app_launch", @@ -35,6 +36,7 @@ { "name": "home 以及 swipe_to_tap_app 默认配置", "ios": { + "os_type": "ios", "actions": [ { "method": "home" @@ -54,6 +56,7 @@ { "name": "处理弹窗 close_popups 默认配置 以及 ui_ocr exists 断言", "ios": { + "os_type": "ios", "actions": [ { "method": "close_popups", @@ -73,6 +76,7 @@ { "name": "【直播】feed头像或卡片进房 swipe_to_tap_texts 自定义配置", "ios": { + "os_type": "ios", "actions": [ { "method": "swipe_to_tap_texts", @@ -105,6 +109,7 @@ { "name": "sleep 10s", "ios": { + "os_type": "ios", "actions": [ { "method": "sleep", @@ -116,9 +121,10 @@ { "name": "【直播】swipe 自定义配置 以及 back", "ios": { + "os_type": "ios", "actions": [ { - "method": "swipe", + "method": "swipe_coordinate", "params": [ 0.5, 0.7, @@ -134,8 +140,7 @@ "params": 5 }, { - "method": "back", - "options": {} + "method": "back" }, { "method": "sleep", @@ -147,6 +152,7 @@ { "name": "【搜索】点击放大镜 tap_xy 自定义配置", "ios": { + "os_type": "ios", "actions": [ { "method": "tap_xy", @@ -168,6 +174,7 @@ { "name": "【搜索】输入query词 input", "ios": { + "os_type": "ios", "actions": [ { "method": "input", @@ -186,6 +193,7 @@ { "name": "【搜索】点击搜索按钮 tap_ocr 自定义配置", "ios": { + "os_type": "ios", "actions": [ { "method": "tap_ocr", @@ -204,6 +212,7 @@ { "name": "选择直播页签 tap_ocr 默认配置", "ios": { + "os_type": "ios", "actions": [ { "method": "tap_ocr", @@ -220,6 +229,7 @@ { "name": "【生活服务】进入直播间 tap_xy", "ios": { + "os_type": "ios", "actions": [ { "method": "tap_xy", @@ -239,6 +249,7 @@ { "name": "【生活服务】点击货架商品 tap_ocr 自定义配置", "ios": { + "os_type": "ios", "actions": [ { "method": "tap_cv", @@ -260,6 +271,7 @@ { "name": "终止应用程序 app_terminate", "ios": { + "os_type": "ios", "actions": [ { "method": "app_terminate", @@ -275,6 +287,7 @@ { "name": "home 以及 swipe_to_tap_app 自定义配置", "ios": { + "os_type": "ios", "actions": [ { "method": "home" @@ -285,7 +298,7 @@ "options": { "max_retry_times": 5, "interval": 1, - "offset": [ + "tap_offset": [ 0, -50 ] @@ -301,6 +314,7 @@ { "name": "处理弹窗 close_popups 自定义配置 以及 ui_ocr exists 断言", "ios": { + "os_type": "ios", "actions": [ { "method": "close_popups", @@ -323,6 +337,7 @@ { "name": "返回主界面,并打开本地时间戳", "ios": { + "os_type": "ios", "actions": [ { "method": "home" @@ -351,7 +366,9 @@ }, { "name": "screeshot 以及 sleep_random", + "loops": 3, "ios": { + "os_type": "ios", "actions": [ { "method": "screenshot", @@ -365,8 +382,7 @@ ] } ] - }, - "loops": 3 + } } ] -} \ No newline at end of file +}