mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 02:21:29 +08:00
refactor: use HttpRunner as testcase base class
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
# NOTICE: Generated By HttpRunner. DO'NOT EDIT!
|
||||
from httprunner import HttpRunner, TConfig, TStep, TestCase
|
||||
from httprunner import HttpRunner, TConfig, TStep
|
||||
|
||||
|
||||
class TestCaseHardcode(TestCase):
|
||||
class TestCaseHardcode(HttpRunner):
|
||||
config = TConfig(
|
||||
**{
|
||||
"name": "request methods testcase in hardcode",
|
||||
@@ -72,5 +72,6 @@ class TestCaseHardcode(TestCase):
|
||||
),
|
||||
]
|
||||
|
||||
def test_start(self):
|
||||
HttpRunner(self.config, self.teststeps).run()
|
||||
|
||||
if __name__ == "__main__":
|
||||
TestCaseHardcode().test_start()
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# NOTICE: Generated By HttpRunner. DO'NOT EDIT!
|
||||
from httprunner import HttpRunner, TConfig, TStep, TestCase
|
||||
from httprunner import HttpRunner, TConfig, TStep
|
||||
|
||||
|
||||
class TestCaseRequestWithFunctions(TestCase):
|
||||
class TestCaseRequestWithFunctions(HttpRunner):
|
||||
config = TConfig(
|
||||
**{
|
||||
"name": "request methods testcase with functions",
|
||||
@@ -83,5 +83,6 @@ class TestCaseRequestWithFunctions(TestCase):
|
||||
),
|
||||
]
|
||||
|
||||
def test_start(self):
|
||||
HttpRunner(self.config, self.teststeps).run()
|
||||
|
||||
if __name__ == "__main__":
|
||||
TestCaseRequestWithFunctions().test_start()
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# NOTICE: Generated By HttpRunner. DO'NOT EDIT!
|
||||
from httprunner import HttpRunner, TConfig, TStep, TestCase
|
||||
from httprunner import HttpRunner, TConfig, TStep
|
||||
|
||||
|
||||
class TestCaseRequestWithTestcaseReference(TestCase):
|
||||
class TestCaseRequestWithTestcaseReference(HttpRunner):
|
||||
config = TConfig(
|
||||
**{
|
||||
"name": "request methods testcase: reference testcase",
|
||||
@@ -23,5 +23,6 @@ class TestCaseRequestWithTestcaseReference(TestCase):
|
||||
),
|
||||
]
|
||||
|
||||
def test_start(self):
|
||||
HttpRunner(self.config, self.teststeps).run()
|
||||
|
||||
if __name__ == "__main__":
|
||||
TestCaseRequestWithTestcaseReference().test_start()
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# NOTICE: Generated By HttpRunner. DO'NOT EDIT!
|
||||
from httprunner import HttpRunner, TConfig, TStep, TestCase
|
||||
from httprunner import HttpRunner, TConfig, TStep
|
||||
|
||||
|
||||
class TestCaseRequestWithVariables(TestCase):
|
||||
class TestCaseRequestWithVariables(HttpRunner):
|
||||
config = TConfig(
|
||||
**{
|
||||
"name": "request methods testcase with variables",
|
||||
@@ -78,5 +78,6 @@ class TestCaseRequestWithVariables(TestCase):
|
||||
),
|
||||
]
|
||||
|
||||
def test_start(self):
|
||||
HttpRunner(self.config, self.teststeps).run()
|
||||
|
||||
if __name__ == "__main__":
|
||||
TestCaseRequestWithVariables().test_start()
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# NOTICE: Generated By HttpRunner. DO'NOT EDIT!
|
||||
from httprunner import HttpRunner, TConfig, TStep, TestCase
|
||||
from httprunner import HttpRunner, TConfig, TStep
|
||||
|
||||
|
||||
class TestCaseValidateWithFunctions(TestCase):
|
||||
class TestCaseValidateWithFunctions(HttpRunner):
|
||||
config = TConfig(
|
||||
**{
|
||||
"name": "request methods testcase: validate with functions",
|
||||
@@ -38,5 +38,6 @@ class TestCaseValidateWithFunctions(TestCase):
|
||||
),
|
||||
]
|
||||
|
||||
def test_start(self):
|
||||
HttpRunner(self.config, self.teststeps).run()
|
||||
|
||||
if __name__ == "__main__":
|
||||
TestCaseValidateWithFunctions().test_start()
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# NOTICE: Generated By HttpRunner. DO'NOT EDIT!
|
||||
from httprunner import HttpRunner, TConfig, TStep, TestCase
|
||||
from httprunner import HttpRunner, TConfig, TStep
|
||||
|
||||
|
||||
class TestCaseValidateWithVariables(TestCase):
|
||||
class TestCaseValidateWithVariables(HttpRunner):
|
||||
config = TConfig(
|
||||
**{
|
||||
"name": "request methods testcase: validate with variables",
|
||||
@@ -78,5 +78,6 @@ class TestCaseValidateWithVariables(TestCase):
|
||||
),
|
||||
]
|
||||
|
||||
def test_start(self):
|
||||
HttpRunner(self.config, self.teststeps).run()
|
||||
|
||||
if __name__ == "__main__":
|
||||
TestCaseValidateWithVariables().test_start()
|
||||
|
||||
Reference in New Issue
Block a user