mirror of
https://github.com/httprunner/httprunner.py.git
synced 2026-06-02 22:31:12 +08:00
init: move from httprunner/httprunner
This commit is contained in:
39
examples/httpbin/load_image_test.py
Normal file
39
examples/httpbin/load_image_test.py
Normal file
@@ -0,0 +1,39 @@
|
||||
# NOTE: Generated By HttpRunner v4.3.5
|
||||
# FROM: load_image.yml
|
||||
from httprunner import HttpRunner, Config, Step, RunRequest
|
||||
|
||||
|
||||
class TestCaseLoadImage(HttpRunner):
|
||||
|
||||
config = Config("load images").base_url("${get_httpbin_server()}")
|
||||
|
||||
teststeps = [
|
||||
Step(
|
||||
RunRequest("get png image")
|
||||
.get("/image/png")
|
||||
.validate()
|
||||
.assert_equal("status_code", 200)
|
||||
),
|
||||
Step(
|
||||
RunRequest("get jpeg image")
|
||||
.get("/image/jpeg")
|
||||
.validate()
|
||||
.assert_equal("status_code", 200)
|
||||
),
|
||||
Step(
|
||||
RunRequest("get webp image")
|
||||
.get("/image/webp")
|
||||
.validate()
|
||||
.assert_equal("status_code", 200)
|
||||
),
|
||||
Step(
|
||||
RunRequest("get svg image")
|
||||
.get("/image/svg")
|
||||
.validate()
|
||||
.assert_equal("status_code", 200)
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
TestCaseLoadImage().test_start()
|
||||
Reference in New Issue
Block a user