我的测试用例示例
from django.contrib.staticfiles.testing import StaticLiveServerTestCase
...
class CustomerTest(StaticLiveServerTestCase):
@classmethod
def setUpClass(cls):
super(CustomerTest, cls).setUpClass()
...
@classmethod
def tearDownClass(cls):
super(CustomerTest, cls).tearDownClass()
...
def setUp(self):
super(CustomerTest, self).setUp()
...
def tearDown(self):
super(CustomerTest, self).tearDown()
...
def test_create(self):
print("A")
def test_search(self):
print("B")
结果:AB
这里发现的问题是,当我改变测试的优先级时,它不会改变结果
def test_search(self):
print("B")
def test_create(self):
print("A")
结果仍然:AB
预期结果:BA
那个么,在集成测试中,我如何改变我的测试用例的优先级呢
目前没有回答
相关问题 更多 >
编程相关推荐