测试工具httprunner试用

2023-09-06 19:24:35 浏览数 (2)

https://github.com/httprunner/httprunner是一个API 测试工具,支持 HTTP(S) / HTTP2 / WebSocket / RPC 等网络协议,涵盖接口测试、性能测试、数字体验监测等测试类型。简单易用,功能强大,具有丰富的插件化机制和高度的可扩展能力。

下面体验下如何使用,首先安装

代码语言:javascript复制
% bash -c "$(curl -ksSL https://httprunner.com/script/install.sh)"
✔ Detect target hrp package...
Latest version: v4.3.1
Current OS: darwin
Current ARCH: amd64
Download package: hrp-v4.3.1-darwin-amd64.tar.gz
! Invalid download url: https://httprunner.oss-cn-beijing.aliyuncs.com/hrp-v4.3.1-darwin-amd64.tar.gz
Download url: https://github.com/httprunner/httprunner/releases/download/v4.3.1/hrp-v4.3.1-darwin-amd64.tar.gz

✔ Downloading...
$ curl -kL https://github.com/httprunner/httprunner/releases/download/v4.3.1/hrp-v4.3.1-darwin-amd64.tar.gz -o hrp-v4.3.1-darwin-amd64.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 7579k  100 7579k    0     0  28629      0  0:04:31  0:04:31 --:--:-- 39030

✔ Created temp dir...
$ mktemp -d -t hrp.XXXX
/var/folders/2n/42n_1dfd6kjd6s3k7bt4cb3h0000gn/T/hrp.XXXX.ljrysUnc
$ mv hrp-v4.3.1-darwin-amd64.tar.gz /var/folders/2n/42n_1dfd6kjd6s3k7bt4cb3h0000gn/T/hrp.XXXX.ljrysUnc && cd /var/folders/2n/42n_1dfd6kjd6s3k7bt4cb3h0000gn/T/hrp.XXXX.ljrysUnc

✔ Extracting...
$ tar -xzf hrp-v4.3.1-darwin-amd64.tar.gz
$ ls -lh
total 58432
-rw-r--r--  1 xiazemin  staff    23K Dec 26 23:46 CHANGELOG.md
-rw-r--r--  1 xiazemin  staff    11K Dec 26 23:46 LICENSE
-rw-r--r--  1 xiazemin  staff   9.5K Dec 26 23:46 README.md
-rwxr-xr-x  1 xiazemin  staff    20M Dec 26 23:46 hrp
-rw-r--r--  1 xiazemin  staff   7.4M Apr 15 20:06 hrp-v4.3.1-darwin-amd64.tar.gz

✔ Installing...
bash: line 119: hrp: command not found
$ chmod  x hrp && mv hrp /usr/local/bin/

✔ Check installation...
$ command -v hrp
/usr/local/bin/hrp
$ hrp -v
{"level":"info","path":"/Users/xiazemin/.hrp/x509","time":"2023-04-15T20:06:24 08:00","message":"create folder"}
hrp version v4.3.1
$ hrp -h

██╗  ██╗████████╗████████╗██████╗ ██████╗ ██╗   ██╗███╗   ██╗███╗   ██╗███████╗██████╗
██║  ██║╚══██╔══╝╚══██╔══╝██╔══██╗██╔══██╗██║   ██║████╗  ██║████╗  ██║██╔════╝██╔══██╗
███████║   ██║      ██║   ██████╔╝██████╔╝██║   ██║██╔██╗ ██║██╔██╗ ██║█████╗  ██████╔╝
██╔══██║   ██║      ██║   ██╔═══╝ ██╔══██╗██║   ██║██║╚██╗██║██║╚██╗██║██╔══╝  ██╔══██╗
██║  ██║   ██║      ██║   ██║     ██║  ██║╚██████╔╝██║ ╚████║██║ ╚████║███████╗██║  ██║
╚═╝  ╚═╝   ╚═╝      ╚═╝   ╚═╝     ╚═╝  ╚═╝ ╚═════╝ ╚═╝  ╚═══╝╚═╝  ╚═══╝╚══════╝╚═╝  ╚═╝

HttpRunner is an open source API testing tool that supports HTTP(S)/HTTP2/WebSocket/RPC
network protocols, covering API testing, performance testing and digital experience
monitoring (DEM) test types. Enjoy! ✨ 


	

0 人点赞