-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add day28 for httprunner test structure layer
- Loading branch information
Showing
6 changed files
with
46 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
base_url=https://www.google.com |
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,5 @@ | ||
reports/* | ||
__pycache__/* | ||
*.pyc | ||
.python-version | ||
logs/* |
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,11 @@ | ||
name: google search | ||
base_url: ${ENV(base_url)} | ||
variables: | ||
keyword: httprunner in api | ||
request: | ||
url: /search | ||
method: GET | ||
params: | ||
q: $keyword | ||
validate: | ||
- eq: ["status_code", 200] |
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,5 @@ | ||
|
||
import time | ||
|
||
def sleep(n_secs): | ||
time.sleep(n_secs) |
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,13 @@ | ||
config: | ||
name: testcase validate search result | ||
base_url: ${ENV(base_url)} | ||
variables: | ||
keyword: httprunner in testcase | ||
|
||
teststeps: | ||
- name: validate title | ||
api: api/google_search.yml | ||
extract: | ||
- title: "<title>(.*)</title>" | ||
validate: | ||
- startswith: ["$title", "$keyword"] |
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,11 @@ | ||
config: | ||
name: "testsuite google search" | ||
base_url: ${ENV(base_url)} | ||
variables: | ||
keyword: httprunner in testsuite | ||
|
||
testcases: | ||
- name: call validate_title | ||
testcase: testcases/validate_title.yml | ||
- name: call validate_title2 | ||
testcase: testcases/validate_title.yml |