mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-07 05:32:43 +08:00
release v4.3.0
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
# Release History
|
||||
|
||||
## v4.3.0 (2022-10-16)
|
||||
## v4.3.0 (2022-10-21)
|
||||
|
||||
- feat: support iOS UI automation with [WebDriverAgent]
|
||||
- feat support Android UI automation with [uiautomator2]
|
||||
- feat: integrage ios device management with [gidevice]
|
||||
- feat: add specified exit code for different exceptions
|
||||
- refactor: make boomer/uixt/httpstat as sub package
|
||||
|
||||
## v4.2.1 (2022-09-01)
|
||||
|
||||
@@ -41,4 +41,4 @@ Copyright 2017 debugtalk
|
||||
* [hrp traceroute](hrp_traceroute.md) - run integrated traceroute command
|
||||
* [hrp wiki](hrp_wiki.md) - visit https://httprunner.com
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2022
|
||||
###### Auto generated by spf13/cobra on 21-Oct-2022
|
||||
|
||||
@@ -44,6 +44,7 @@ hrp boom [flags]
|
||||
--profile string profile for load testing
|
||||
--prometheus-gateway string Prometheus Pushgateway url.
|
||||
--request-increase-rate string Request increase rate, disabled by default. (default "-1")
|
||||
--run-time int Stop after the specified amount of time(s), Only used --autostart. Defaults to run forever.
|
||||
--spawn-count int The number of users to spawn for load testing (default 1)
|
||||
--spawn-rate float The rate for spawning users (default 1)
|
||||
--worker worker of distributed testing
|
||||
@@ -54,4 +55,4 @@ hrp boom [flags]
|
||||
* [hrp](hrp.md) - Next-Generation API Testing Solution.
|
||||
* [hrp boom curl](hrp_boom_curl.md) - run load test with curl command
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2022
|
||||
###### Auto generated by spf13/cobra on 21-Oct-2022
|
||||
|
||||
@@ -16,4 +16,4 @@ hrp boom curl URLs [flags]
|
||||
|
||||
* [hrp boom](hrp_boom.md) - run load test with boomer
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2022
|
||||
###### Auto generated by spf13/cobra on 21-Oct-2022
|
||||
|
||||
@@ -28,4 +28,4 @@ hrp build $path ... [flags]
|
||||
|
||||
* [hrp](hrp.md) - Next-Generation API Testing Solution.
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2022
|
||||
###### Auto generated by spf13/cobra on 21-Oct-2022
|
||||
|
||||
@@ -23,4 +23,4 @@ hrp convert $path... [flags]
|
||||
* [hrp](hrp.md) - Next-Generation API Testing Solution.
|
||||
* [hrp convert curl](hrp_convert_curl.md) - convert curl command to httprunner testcase
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2022
|
||||
###### Auto generated by spf13/cobra on 21-Oct-2022
|
||||
|
||||
@@ -16,4 +16,4 @@ hrp convert curl URLs [flags]
|
||||
|
||||
* [hrp convert](hrp_convert.md) - convert to JSON/YAML/gotest/pytest testcases
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2022
|
||||
###### Auto generated by spf13/cobra on 21-Oct-2022
|
||||
|
||||
@@ -16,4 +16,4 @@ hrp curl $url [flags]
|
||||
|
||||
* [hrp](hrp.md) - Next-Generation API Testing Solution.
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2022
|
||||
###### Auto generated by spf13/cobra on 21-Oct-2022
|
||||
|
||||
@@ -26,4 +26,4 @@ hrp dns $url [flags]
|
||||
|
||||
* [hrp](hrp.md) - Next-Generation API Testing Solution.
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2022
|
||||
###### Auto generated by spf13/cobra on 21-Oct-2022
|
||||
|
||||
@@ -20,4 +20,4 @@ hrp ping $url [flags]
|
||||
|
||||
* [hrp](hrp.md) - Next-Generation API Testing Solution.
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2022
|
||||
###### Auto generated by spf13/cobra on 21-Oct-2022
|
||||
|
||||
@@ -16,4 +16,4 @@ hrp pytest $path ... [flags]
|
||||
|
||||
* [hrp](hrp.md) - Next-Generation API Testing Solution.
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2022
|
||||
###### Auto generated by spf13/cobra on 21-Oct-2022
|
||||
|
||||
@@ -36,4 +36,4 @@ hrp run $path... [flags]
|
||||
* [hrp](hrp.md) - Next-Generation API Testing Solution.
|
||||
* [hrp run curl](hrp_run_curl.md) - run API test with curl command
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2022
|
||||
###### Auto generated by spf13/cobra on 21-Oct-2022
|
||||
|
||||
@@ -16,4 +16,4 @@ hrp run curl URLs [flags]
|
||||
|
||||
* [hrp run](hrp_run.md) - run API test with go engine
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2022
|
||||
###### Auto generated by spf13/cobra on 21-Oct-2022
|
||||
|
||||
@@ -21,4 +21,4 @@ hrp startproject $project_name [flags]
|
||||
|
||||
* [hrp](hrp.md) - Next-Generation API Testing Solution.
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2022
|
||||
###### Auto generated by spf13/cobra on 21-Oct-2022
|
||||
|
||||
@@ -19,4 +19,4 @@ hrp traceroute $url [flags]
|
||||
|
||||
* [hrp](hrp.md) - Next-Generation API Testing Solution.
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2022
|
||||
###### Auto generated by spf13/cobra on 21-Oct-2022
|
||||
|
||||
@@ -16,4 +16,4 @@ hrp wiki [flags]
|
||||
|
||||
* [hrp](hrp.md) - Next-Generation API Testing Solution.
|
||||
|
||||
###### Auto generated by spf13/cobra on 21-Aug-2022
|
||||
###### Auto generated by spf13/cobra on 21-Oct-2022
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"project_name": "demo-empty-project",
|
||||
"create_time": "2022-07-11T11:45:29.942532+08:00",
|
||||
"hrp_version": "v4.1.6"
|
||||
"create_time": "2022-10-21T21:54:56.252853+08:00",
|
||||
"hrp_version": "v4.3.0"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"project_name": "demo-with-go-plugin",
|
||||
"create_time": "2022-09-28T16:40:14.674398+08:00",
|
||||
"create_time": "2022-10-21T21:52:38.979867+08:00",
|
||||
"hrp_version": "v4.3.0"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"project_name": "demo-with-py-plugin",
|
||||
"create_time": "2022-09-28T16:40:15.283869+08:00",
|
||||
"create_time": "2022-10-21T21:52:39.555851+08:00",
|
||||
"hrp_version": "v4.3.0"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"project_name": "demo-without-plugin",
|
||||
"create_time": "2022-07-11T11:45:29.800018+08:00",
|
||||
"hrp_version": "v4.1.6"
|
||||
"create_time": "2022-10-21T21:54:56.136458+08:00",
|
||||
"hrp_version": "v4.3.0"
|
||||
}
|
||||
|
||||
@@ -251,13 +251,19 @@ func LoadFile(path string, structObj interface{}) (err error) {
|
||||
decoder := json.NewDecoder(bytes.NewReader(file))
|
||||
decoder.UseNumber()
|
||||
err = decoder.Decode(structObj)
|
||||
err = errors.Wrap(code.LoadJSONError, err.Error())
|
||||
if err != nil {
|
||||
err = errors.Wrap(code.LoadJSONError, err.Error())
|
||||
}
|
||||
case ".yaml", ".yml":
|
||||
err = yaml.Unmarshal(file, structObj)
|
||||
err = errors.Wrap(code.LoadYAMLError, err.Error())
|
||||
if err != nil {
|
||||
err = errors.Wrap(code.LoadYAMLError, err.Error())
|
||||
}
|
||||
case ".env":
|
||||
err = parseEnvContent(file, structObj)
|
||||
err = errors.Wrap(code.LoadEnvError, err.Error())
|
||||
if err != nil {
|
||||
err = errors.Wrap(code.LoadEnvError, err.Error())
|
||||
}
|
||||
default:
|
||||
err = code.UnsupportedFileExtension
|
||||
}
|
||||
|
||||
@@ -134,6 +134,11 @@ var errorsMap = map[error]int{
|
||||
OCRTextNotFoundError: 84,
|
||||
}
|
||||
|
||||
func IsErrorPredefined(err error) bool {
|
||||
_, ok := errorsMap[err]
|
||||
return ok
|
||||
}
|
||||
|
||||
func GetErrorCode(err error) (exitCode int) {
|
||||
if err == nil {
|
||||
return Success
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# NOTE: Generated By hrp v4.2.0, DO NOT EDIT!
|
||||
# NOTE: Generated By hrp v4.3.0, DO NOT EDIT!
|
||||
|
||||
import sys
|
||||
import os
|
||||
@@ -10,6 +10,7 @@ from debugtalk import *
|
||||
|
||||
if __name__ == "__main__":
|
||||
import funppy
|
||||
|
||||
funppy.register("get_user_agent", get_user_agent)
|
||||
funppy.register("sleep", sleep)
|
||||
funppy.register("sum", sum)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// NOTE: Generated By hrp v4.3.0-beta-10172144, DO NOT EDIT!
|
||||
// NOTE: Generated By hrp v4.3.0, DO NOT EDIT!
|
||||
package main
|
||||
|
||||
import (
|
||||
|
||||
@@ -1 +1 @@
|
||||
v4.3.0-beta-10211541
|
||||
v4.3.0
|
||||
@@ -53,8 +53,7 @@ func LoadTestCases(iTestCases ...ITestCase) ([]*TestCase, error) {
|
||||
testCasePath := TestCasePath(path)
|
||||
tc, err := testCasePath.ToTestCase()
|
||||
if err != nil {
|
||||
log.Warn().Err(err).Str("path", path).Msg("load testcase failed")
|
||||
return err
|
||||
return nil
|
||||
}
|
||||
testCases = append(testCases, tc)
|
||||
return nil
|
||||
|
||||
@@ -84,7 +84,7 @@ func (dExt *DriverExt) SwipeUntil(direction interface{}, findCondition Action, f
|
||||
}
|
||||
} else if d, ok := direction.([]float64); ok {
|
||||
if err := dExt.SwipeRelative(d[0], d[1], d[2], d[3]); err != nil {
|
||||
log.Error().Err(err).Msgf("swipe %s failed", d)
|
||||
log.Error().Err(err).Msgf("swipe %v failed", d)
|
||||
}
|
||||
} else if d, ok := direction.([]interface{}); ok {
|
||||
sx, _ := builtin.Interface2Float64(d[0])
|
||||
|
||||
@@ -614,7 +614,10 @@ func runStepMobileUI(s *SessionRunner, step *TStep) (stepResult *StepResult, err
|
||||
fmt.Sprintf("parse action params failed: %v", err))
|
||||
}
|
||||
if err := uiDriver.DoAction(action); err != nil {
|
||||
return stepResult, errors.Wrap(code.MobileUIDriverError, err.Error())
|
||||
if !code.IsErrorPredefined(err) {
|
||||
err = errors.Wrap(code.MobileUIDriverError, err.Error())
|
||||
}
|
||||
return stepResult, err
|
||||
}
|
||||
}
|
||||
|
||||
@@ -631,7 +634,9 @@ func runStepMobileUI(s *SessionRunner, step *TStep) (stepResult *StepResult, err
|
||||
// validate
|
||||
validateResults, err := validateUI(uiDriver, step.Validators)
|
||||
if err != nil {
|
||||
err = errors.Wrap(code.MobileUIValidationError, err.Error())
|
||||
if !code.IsErrorPredefined(err) {
|
||||
err = errors.Wrap(code.MobileUIValidationError, err.Error())
|
||||
}
|
||||
return
|
||||
}
|
||||
sessionData := newSessionData()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
__version__ = "v4.3.0-beta-10211541"
|
||||
__version__ = "v4.3.0"
|
||||
__description__ = "One-stop solution for HTTP(S) testing."
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "httprunner"
|
||||
version = "v4.3.0-beta-10211541"
|
||||
version = "v4.3.0"
|
||||
description = "One-stop solution for HTTP(S) testing."
|
||||
license = "Apache-2.0"
|
||||
readme = "README.md"
|
||||
|
||||
Reference in New Issue
Block a user