This repository has been archived by the owner on Mar 28, 2022. It is now read-only.
fix: incorrect assertion func and json number parse rule #83
Merged
Merged
Changes from 10 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
422ddd3
fix: json number convert rule
bbx-winner 0eb98f9
fix: incorrect assertion func
bbx-winner 6e398b7
add httpbingo test
bbx-winner 25509f5
modify assertion functions and their docs
bbx-winner 0299e3e
fix starts_with and ends_wih spelling
bbx-winner ef91740
Merge branch 'main' of github.com:httprunner/hrp
bbx-winner 809030f
fix: converInt function bug
bbx-winner 0229987
fix: Connection and Content-Type not found in postman-echo headers
bbx-winner 1361ee7
fix code format
bbx-winner c11ede7
fix code format
bbx-winner 76cb479
fix startswith endswith and unittest
bbx-winner 65fc15a
restore headers.Content-Type validate
bbx-winner File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
{ | ||
"config": { | ||
"name": "request methods testcase: validate with parameters", | ||
"base_url": "https://httpbingo.bytedance.net" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 代码中不要带字节的内网域名。示例代码还是使用 postman echo 的吧 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed |
||
}, | ||
"teststeps": [ | ||
{ | ||
"name": "get with params", | ||
"request": { | ||
"method": "GET", | ||
"url": "/get", | ||
"params": { | ||
"a": 1, | ||
"foo": "I'm a happy guy" | ||
} | ||
}, | ||
"validate": [ | ||
{ | ||
"check": "body.args.a", | ||
"assert": "eq", | ||
"expect": "1", | ||
"msg": "check argument a" | ||
}, | ||
{ | ||
"check": "status_code", | ||
"assert": "lt", | ||
"expect": 201, | ||
"msg": "check status code" | ||
}, | ||
{ | ||
"check": "status_code", | ||
"assert": "gt", | ||
"expect": 199, | ||
"msg": "check status code" | ||
}, | ||
{ | ||
"check": "status_code", | ||
"assert": "ge", | ||
"expect": 200, | ||
"msg": "check status code" | ||
}, | ||
{ | ||
"check": "status_code", | ||
"assert": "le", | ||
"expect": 200, | ||
"msg": "check status code" | ||
}, | ||
{ | ||
"check": "status_code", | ||
"assert": "ne", | ||
"expect": 199, | ||
"msg": "check status code" | ||
}, | ||
{ | ||
"check": "body.args.foo", | ||
"assert": "contains", | ||
"expect": "happy", | ||
"msg": "check status code" | ||
}, | ||
{ | ||
"check": "body.args.foo", | ||
"assert": "type_match", | ||
"expect": "string", | ||
"msg": "check status code" | ||
}, | ||
{ | ||
"check": "body.args.foo", | ||
"assert": "starts_with", | ||
"expect": "I'm", | ||
"msg": "check status code" | ||
}, | ||
{ | ||
"check": "body.args.foo", | ||
"assert": "type_match", | ||
"expect": "string", | ||
"msg": "check status code" | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
还是保留 startswith/endswith 吧;更自然些,而且跟 Python 版本保持一致
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed