change: update docs

This commit is contained in:
lilong.129
2025-06-28 22:03:22 +08:00
parent ed0b915904
commit 8ef9b86fd1
32 changed files with 115 additions and 189 deletions

View File

@@ -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)"

View File

@@ -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

View File

@@ -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:

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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
}
}
]
}

View File

@@ -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
}
}
]
}
}

View File

@@ -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
}
}
]
}

View File

@@ -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
}
}
]
}
}