mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-06 16:07:45 +08:00
tests: update examples
This commit is contained in:
@@ -1,10 +1,12 @@
|
|||||||
# NOTE: Generated By HttpRunner v3.1.2
|
# NOTE: Generated By HttpRunner v3.1.3
|
||||||
# FROM: basic.yml
|
# FROM: basic.yml
|
||||||
|
|
||||||
|
|
||||||
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
|
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
|
||||||
|
|
||||||
|
|
||||||
class TestCaseBasic(HttpRunner):
|
class TestCaseBasic(HttpRunner):
|
||||||
|
|
||||||
config = Config("basic test with httpbin").base_url("https://httpbin.org/")
|
config = Config("basic test with httpbin").base_url("https://httpbin.org/")
|
||||||
|
|
||||||
teststeps = [
|
teststeps = [
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
# NOTE: Generated By HttpRunner v3.1.2
|
# NOTE: Generated By HttpRunner v3.1.3
|
||||||
# FROM: hooks.yml
|
# FROM: hooks.yml
|
||||||
|
|
||||||
|
|
||||||
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
|
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
|
||||||
|
|
||||||
|
|
||||||
class TestCaseHooks(HttpRunner):
|
class TestCaseHooks(HttpRunner):
|
||||||
|
|
||||||
config = Config("basic test with httpbin").base_url("${get_httpbin_server()}")
|
config = Config("basic test with httpbin").base_url("${get_httpbin_server()}")
|
||||||
|
|
||||||
teststeps = [
|
teststeps = [
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
# NOTE: Generated By HttpRunner v3.1.2
|
# NOTE: Generated By HttpRunner v3.1.3
|
||||||
# FROM: load_image.yml
|
# FROM: load_image.yml
|
||||||
|
|
||||||
|
|
||||||
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
|
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
|
||||||
|
|
||||||
|
|
||||||
class TestCaseLoadImage(HttpRunner):
|
class TestCaseLoadImage(HttpRunner):
|
||||||
|
|
||||||
config = Config("load images").base_url("${get_httpbin_server()}")
|
config = Config("load images").base_url("${get_httpbin_server()}")
|
||||||
|
|
||||||
teststeps = [
|
teststeps = [
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
# NOTE: Generated By HttpRunner v3.1.2
|
# NOTE: Generated By HttpRunner v3.1.3
|
||||||
# FROM: upload.yml
|
# FROM: upload.yml
|
||||||
|
|
||||||
|
|
||||||
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
|
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
|
||||||
|
|
||||||
|
|
||||||
class TestCaseUpload(HttpRunner):
|
class TestCaseUpload(HttpRunner):
|
||||||
|
|
||||||
config = Config("test upload file with httpbin").base_url("${get_httpbin_server()}")
|
config = Config("test upload file with httpbin").base_url("${get_httpbin_server()}")
|
||||||
|
|
||||||
teststeps = [
|
teststeps = [
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
# NOTE: Generated By HttpRunner v3.1.2
|
# NOTE: Generated By HttpRunner v3.1.3
|
||||||
# FROM: validate.yml
|
# FROM: validate.yml
|
||||||
|
|
||||||
|
|
||||||
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
|
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
|
||||||
|
|
||||||
|
|
||||||
class TestCaseValidate(HttpRunner):
|
class TestCaseValidate(HttpRunner):
|
||||||
|
|
||||||
config = Config("basic test with httpbin").base_url("http://httpbin.org/")
|
config = Config("basic test with httpbin").base_url("http://httpbin.org/")
|
||||||
|
|
||||||
teststeps = [
|
teststeps = [
|
||||||
|
|||||||
+1
@@ -1,6 +1,7 @@
|
|||||||
# NOTE: Generated By HttpRunner v3.1.3
|
# NOTE: Generated By HttpRunner v3.1.3
|
||||||
# FROM: request_methods/request_with_functions.yml
|
# FROM: request_methods/request_with_functions.yml
|
||||||
|
|
||||||
|
|
||||||
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
|
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+2
@@ -1,11 +1,13 @@
|
|||||||
# NOTE: Generated By HttpRunner v3.1.3
|
# NOTE: Generated By HttpRunner v3.1.3
|
||||||
# FROM: request_methods/request_with_testcase_reference.yml
|
# FROM: request_methods/request_with_testcase_reference.yml
|
||||||
|
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
sys.path.insert(0, str(Path(__file__).parent.parent))
|
sys.path.insert(0, str(Path(__file__).parent.parent))
|
||||||
|
|
||||||
|
|
||||||
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
|
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
|
||||||
|
|
||||||
from request_methods.request_with_functions_test import (
|
from request_methods.request_with_functions_test import (
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# NOTE: Generated By HttpRunner v3.1.3
|
# NOTE: Generated By HttpRunner v3.1.3
|
||||||
# FROM: request_methods/hardcode.yml
|
# FROM: request_methods/hardcode.yml
|
||||||
|
|
||||||
|
|
||||||
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
|
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# NOTE: Generated By HttpRunner v3.1.3
|
# NOTE: Generated By HttpRunner v3.1.3
|
||||||
# FROM: request_methods/request_with_functions.yml
|
# FROM: request_methods/request_with_functions.yml
|
||||||
|
|
||||||
|
|
||||||
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
|
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
import pytest
|
import pytest
|
||||||
from httprunner import parse_parameters
|
from httprunner import parse_parameters
|
||||||
|
|
||||||
|
|
||||||
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
|
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
# NOTE: Generated By HttpRunner v3.1.3
|
# NOTE: Generated By HttpRunner v3.1.3
|
||||||
# FROM: request_methods/request_with_testcase_reference.yml
|
# FROM: request_methods/request_with_testcase_reference.yml
|
||||||
|
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
sys.path.insert(0, str(Path(__file__).parent.parent))
|
sys.path.insert(0, str(Path(__file__).parent.parent))
|
||||||
|
|
||||||
|
|
||||||
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
|
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
|
||||||
|
|
||||||
from request_methods.request_with_functions_test import (
|
from request_methods.request_with_functions_test import (
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# NOTE: Generated By HttpRunner v3.1.3
|
# NOTE: Generated By HttpRunner v3.1.3
|
||||||
# FROM: request_methods/request_with_variables.yml
|
# FROM: request_methods/request_with_variables.yml
|
||||||
|
|
||||||
|
|
||||||
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
|
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# NOTE: Generated By HttpRunner v3.1.3
|
# NOTE: Generated By HttpRunner v3.1.3
|
||||||
# FROM: request_methods/validate_with_functions.yml
|
# FROM: request_methods/validate_with_functions.yml
|
||||||
|
|
||||||
|
|
||||||
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
|
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# NOTE: Generated By HttpRunner v3.1.3
|
# NOTE: Generated By HttpRunner v3.1.3
|
||||||
# FROM: request_methods/validate_with_variables.yml
|
# FROM: request_methods/validate_with_variables.yml
|
||||||
|
|
||||||
|
|
||||||
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
|
from httprunner import HttpRunner, Config, Step, RunRequest, RunTestCase
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user