mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-11 18:11:21 +08:00
change: rename schema model name and class name
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
# NOTICE: Generated By HttpRunner. DO'NOT EDIT!
|
||||
import unittest
|
||||
|
||||
from httprunner.runner import TestCaseRunner
|
||||
from httprunner.schema import TestsConfig, TestStep
|
||||
from httprunner.runner import HttpRunner
|
||||
from httprunner.schema import TConfig, TStep
|
||||
|
||||
|
||||
class TestCaseHardcode(unittest.TestCase):
|
||||
config = TestsConfig(
|
||||
config = TConfig(
|
||||
**{
|
||||
"name": "request methods testcase in hardcode",
|
||||
"base_url": "https://postman-echo.com",
|
||||
@@ -16,7 +16,7 @@ class TestCaseHardcode(unittest.TestCase):
|
||||
)
|
||||
|
||||
teststeps = [
|
||||
TestStep(
|
||||
TStep(
|
||||
**{
|
||||
"name": "get with params",
|
||||
"request": {
|
||||
@@ -28,7 +28,7 @@ class TestCaseHardcode(unittest.TestCase):
|
||||
"validate": [{"eq": ["status_code", 200]}],
|
||||
}
|
||||
),
|
||||
TestStep(
|
||||
TStep(
|
||||
**{
|
||||
"name": "post raw text",
|
||||
"request": {
|
||||
@@ -43,7 +43,7 @@ class TestCaseHardcode(unittest.TestCase):
|
||||
"validate": [{"eq": ["status_code", 200]}],
|
||||
}
|
||||
),
|
||||
TestStep(
|
||||
TStep(
|
||||
**{
|
||||
"name": "post form data",
|
||||
"request": {
|
||||
@@ -58,7 +58,7 @@ class TestCaseHardcode(unittest.TestCase):
|
||||
"validate": [{"eq": ["status_code", 200]}],
|
||||
}
|
||||
),
|
||||
TestStep(
|
||||
TStep(
|
||||
**{
|
||||
"name": "put request",
|
||||
"request": {
|
||||
@@ -76,4 +76,4 @@ class TestCaseHardcode(unittest.TestCase):
|
||||
]
|
||||
|
||||
def test_start(self):
|
||||
TestCaseRunner(self.config, self.teststeps).run()
|
||||
HttpRunner(self.config, self.teststeps).run()
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
# NOTICE: Generated By HttpRunner. DO'NOT EDIT!
|
||||
import unittest
|
||||
|
||||
from httprunner.runner import TestCaseRunner
|
||||
from httprunner.schema import TestsConfig, TestStep
|
||||
from httprunner.runner import HttpRunner
|
||||
from httprunner.schema import TConfig, TStep
|
||||
|
||||
|
||||
class TestCaseRequestWithFunctions(unittest.TestCase):
|
||||
config = TestsConfig(
|
||||
config = TConfig(
|
||||
**{
|
||||
"name": "request methods testcase with functions",
|
||||
"variables": {"foo1": "session_bar1"},
|
||||
@@ -17,7 +17,7 @@ class TestCaseRequestWithFunctions(unittest.TestCase):
|
||||
)
|
||||
|
||||
teststeps = [
|
||||
TestStep(
|
||||
TStep(
|
||||
**{
|
||||
"name": "get with params",
|
||||
"variables": {
|
||||
@@ -40,7 +40,7 @@ class TestCaseRequestWithFunctions(unittest.TestCase):
|
||||
],
|
||||
}
|
||||
),
|
||||
TestStep(
|
||||
TStep(
|
||||
**{
|
||||
"name": "post raw text",
|
||||
"variables": {"foo1": "hello world", "foo3": "$session_foo2"},
|
||||
@@ -64,7 +64,7 @@ class TestCaseRequestWithFunctions(unittest.TestCase):
|
||||
],
|
||||
}
|
||||
),
|
||||
TestStep(
|
||||
TStep(
|
||||
**{
|
||||
"name": "post form data",
|
||||
"variables": {"foo1": "bar1", "foo2": "bar2"},
|
||||
@@ -87,4 +87,4 @@ class TestCaseRequestWithFunctions(unittest.TestCase):
|
||||
]
|
||||
|
||||
def test_start(self):
|
||||
TestCaseRunner(self.config, self.teststeps).run()
|
||||
HttpRunner(self.config, self.teststeps).run()
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
# NOTICE: Generated By HttpRunner. DO'NOT EDIT!
|
||||
import unittest
|
||||
|
||||
from httprunner.runner import TestCaseRunner
|
||||
from httprunner.schema import TestsConfig, TestStep
|
||||
from httprunner.runner import HttpRunner
|
||||
from httprunner.schema import TConfig, TStep
|
||||
|
||||
|
||||
class TestCaseRequestWithTestcaseReference(unittest.TestCase):
|
||||
config = TestsConfig(
|
||||
config = TConfig(
|
||||
**{
|
||||
"name": "request methods testcase: reference testcase",
|
||||
"variables": {"foo1": "session_bar1"},
|
||||
@@ -17,7 +17,7 @@ class TestCaseRequestWithTestcaseReference(unittest.TestCase):
|
||||
)
|
||||
|
||||
teststeps = [
|
||||
TestStep(
|
||||
TStep(
|
||||
**{
|
||||
"name": "request with variables",
|
||||
"variables": {"foo1": "override_bar1"},
|
||||
@@ -27,4 +27,4 @@ class TestCaseRequestWithTestcaseReference(unittest.TestCase):
|
||||
]
|
||||
|
||||
def test_start(self):
|
||||
TestCaseRunner(self.config, self.teststeps).run()
|
||||
HttpRunner(self.config, self.teststeps).run()
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
# NOTICE: Generated By HttpRunner. DO'NOT EDIT!
|
||||
import unittest
|
||||
|
||||
from httprunner.runner import TestCaseRunner
|
||||
from httprunner.schema import TestsConfig, TestStep
|
||||
from httprunner.runner import HttpRunner
|
||||
from httprunner.schema import TConfig, TStep
|
||||
|
||||
|
||||
class TestCaseRequestWithVariables(unittest.TestCase):
|
||||
config = TestsConfig(
|
||||
config = TConfig(
|
||||
**{
|
||||
"name": "request methods testcase with variables",
|
||||
"variables": {"foo1": "session_bar1"},
|
||||
@@ -17,7 +17,7 @@ class TestCaseRequestWithVariables(unittest.TestCase):
|
||||
)
|
||||
|
||||
teststeps = [
|
||||
TestStep(
|
||||
TStep(
|
||||
**{
|
||||
"name": "get with params",
|
||||
"variables": {"foo1": "bar1", "foo2": "session_bar2"},
|
||||
@@ -35,7 +35,7 @@ class TestCaseRequestWithVariables(unittest.TestCase):
|
||||
],
|
||||
}
|
||||
),
|
||||
TestStep(
|
||||
TStep(
|
||||
**{
|
||||
"name": "post raw text",
|
||||
"variables": {"foo1": "hello world", "foo3": "$session_foo2"},
|
||||
@@ -59,7 +59,7 @@ class TestCaseRequestWithVariables(unittest.TestCase):
|
||||
],
|
||||
}
|
||||
),
|
||||
TestStep(
|
||||
TStep(
|
||||
**{
|
||||
"name": "post form data",
|
||||
"variables": {"foo1": "bar1", "foo2": "bar2"},
|
||||
@@ -82,4 +82,4 @@ class TestCaseRequestWithVariables(unittest.TestCase):
|
||||
]
|
||||
|
||||
def test_start(self):
|
||||
TestCaseRunner(self.config, self.teststeps).run()
|
||||
HttpRunner(self.config, self.teststeps).run()
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
# NOTICE: Generated By HttpRunner. DO'NOT EDIT!
|
||||
import unittest
|
||||
|
||||
from httprunner.runner import TestCaseRunner
|
||||
from httprunner.schema import TestsConfig, TestStep
|
||||
from httprunner.runner import HttpRunner
|
||||
from httprunner.schema import TConfig, TStep
|
||||
|
||||
|
||||
class TestCaseValidateWithFunctions(unittest.TestCase):
|
||||
config = TestsConfig(
|
||||
config = TConfig(
|
||||
**{
|
||||
"name": "request methods testcase: validate with functions",
|
||||
"variables": {"foo1": "session_bar1"},
|
||||
@@ -17,7 +17,7 @@ class TestCaseValidateWithFunctions(unittest.TestCase):
|
||||
)
|
||||
|
||||
teststeps = [
|
||||
TestStep(
|
||||
TStep(
|
||||
**{
|
||||
"name": "get with params",
|
||||
"variables": {
|
||||
@@ -42,4 +42,4 @@ class TestCaseValidateWithFunctions(unittest.TestCase):
|
||||
]
|
||||
|
||||
def test_start(self):
|
||||
TestCaseRunner(self.config, self.teststeps).run()
|
||||
HttpRunner(self.config, self.teststeps).run()
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
# NOTICE: Generated By HttpRunner. DO'NOT EDIT!
|
||||
import unittest
|
||||
|
||||
from httprunner.runner import TestCaseRunner
|
||||
from httprunner.schema import TestsConfig, TestStep
|
||||
from httprunner.runner import HttpRunner
|
||||
from httprunner.schema import TConfig, TStep
|
||||
|
||||
|
||||
class TestCaseValidateWithVariables(unittest.TestCase):
|
||||
config = TestsConfig(
|
||||
config = TConfig(
|
||||
**{
|
||||
"name": "request methods testcase: validate with variables",
|
||||
"variables": {"foo1": "session_bar1"},
|
||||
@@ -17,7 +17,7 @@ class TestCaseValidateWithVariables(unittest.TestCase):
|
||||
)
|
||||
|
||||
teststeps = [
|
||||
TestStep(
|
||||
TStep(
|
||||
**{
|
||||
"name": "get with params",
|
||||
"variables": {"foo1": "bar1", "foo2": "session_bar2"},
|
||||
@@ -35,7 +35,7 @@ class TestCaseValidateWithVariables(unittest.TestCase):
|
||||
],
|
||||
}
|
||||
),
|
||||
TestStep(
|
||||
TStep(
|
||||
**{
|
||||
"name": "post raw text",
|
||||
"variables": {"foo1": "hello world", "foo3": "$session_foo2"},
|
||||
@@ -59,7 +59,7 @@ class TestCaseValidateWithVariables(unittest.TestCase):
|
||||
],
|
||||
}
|
||||
),
|
||||
TestStep(
|
||||
TStep(
|
||||
**{
|
||||
"name": "post form data",
|
||||
"variables": {"foo1": "bar1", "foo2": "bar2"},
|
||||
@@ -82,4 +82,4 @@ class TestCaseValidateWithVariables(unittest.TestCase):
|
||||
]
|
||||
|
||||
def test_start(self):
|
||||
TestCaseRunner(self.config, self.teststeps).run()
|
||||
HttpRunner(self.config, self.teststeps).run()
|
||||
|
||||
Reference in New Issue
Block a user