运行与验证
进行默认值验证
以下命令以访问淘宝网址为例,用户使用过程中可以将网址替换成任意网址。
httpress -n 1 http://taobao.com httpress -n 1 https://taobao.com
httpress -c 1 http://taobao.com httpress -c 1 https://taobao.com
httpress -t 1 http://taobao.com httpress -t 1 https://taobao.com
httpress -z NORMAL http://taobao.com httpress -z NORMAL https://taobao.com
httpress http://taobao.com httpress https://taobao.com
进行非默认值验证
非默认值是指请求数、线程数等可以自定义,并不局限于本文档以下给出的值。
httpress -n 10 http://taobao.com httpress -n 10 https://taobao.com
httpress -n 2 -c 2 http://taobao.com httpress -n 2 -c 2 https://taobao.com
httpress -n 2 -c 2 -t 2 http://taobao.com httpress -n 2 -c 2 -t 2 https://taobao.com
httpress -k http://taobao.com httpress -k https://taobao.com
httpress -q http://taobao.com httpress -q https://taobao.com
httpress -z ABNORMAL http://taobao.com httpress -z ABNORMAL https://taobao.com
httpress -n 2 -c 2 -t 2 -k -q -z ABNORMAL http://taobao.com httpress -n 2 -c 2 -t 2 -k -q -z ABNORMAL https://taobao.com
运行
- HTTP短连接
1
httpress -n 3000000 -c 300 -t 30 http://IP:PORT1/index.html
- HTTP长连接
1
httpress -n 10000000 -c 300 -t 30 -k http://IP:PORT1/index.html
- HTTPS短连接
1
httpress -n 100000 -c 300 -t 30 https://IP:PORT2/index.html
- HTTPS长连接
1
httpress -n 10000000 -c 300 -t 30 -k https://IP:PORT2/index.html
上述命令中IP地址表示Nginx服务器的IP地址,PORT1表示Nginx服务器的HTTP端口,PORT2表示Nginx服务器的HTTPS端口。
父主题: httpress 测试指导