Commit 3584627f519f6e2ed84ff1083ac0cf9dcfaefaf8
1 parent
9ced5f8d
优化用例代码
Showing
2 changed files
with
3 additions
and
4 deletions
main.py
@@ -74,6 +74,6 @@ if __name__ == "__main__": | @@ -74,6 +74,6 @@ if __name__ == "__main__": | ||
74 | #检测登录接口 | 74 | #检测登录接口 |
75 | my.check_login("sy_user01") | 75 | my.check_login("sy_user01") |
76 | #创建测试套,运行测试用例,生成报告 | 76 | #创建测试套,运行测试用例,生成报告 |
77 | - report=Run_Testcase(Create_Testcase_suite()) | 77 | + report=Run_Testcase(Create_Testcase_suite("weightBizBill")) |
78 | #发送邮件 | 78 | #发送邮件 |
79 | Send_email(report) | 79 | Send_email(report) |
testcase/weightBizBill/test_weighingServiceSave.py
@@ -23,7 +23,7 @@ class test_weighingServiceSave(unittest.TestCase): | @@ -23,7 +23,7 @@ class test_weighingServiceSave(unittest.TestCase): | ||
23 | def setUp(self) : | 23 | def setUp(self) : |
24 | we.refresh_commit_token() | 24 | we.refresh_commit_token() |
25 | 25 | ||
26 | - @com.mylog | 26 | + |
27 | @unittest.case_mark(my.mark()) | 27 | @unittest.case_mark(my.mark()) |
28 | def test_weighingServiceSave_01(self): | 28 | def test_weighingServiceSave_01(self): |
29 | "称重服务:成功新增一条称重服务单" | 29 | "称重服务:成功新增一条称重服务单" |
@@ -38,7 +38,6 @@ class test_weighingServiceSave(unittest.TestCase): | @@ -38,7 +38,6 @@ class test_weighingServiceSave(unittest.TestCase): | ||
38 | self.assertEqual(re.status_code, 200) | 38 | self.assertEqual(re.status_code, 200) |
39 | self.assertTrue("'message':'交费成功','result':'交费成功','success':True" in str(re.json()).replace(" ","")) | 39 | self.assertTrue("'message':'交费成功','result':'交费成功','success':True" in str(re.json()).replace(" ","")) |
40 | 40 | ||
41 | - @com.mylog | ||
42 | @unittest.case_mark(my.mark()) | 41 | @unittest.case_mark(my.mark()) |
43 | def test_weighingServiceSave_02(self): | 42 | def test_weighingServiceSave_02(self): |
44 | "称重服务:成功新增一条称重服务单" | 43 | "称重服务:成功新增一条称重服务单" |
@@ -46,6 +45,6 @@ class test_weighingServiceSave(unittest.TestCase): | @@ -46,6 +45,6 @@ class test_weighingServiceSave(unittest.TestCase): | ||
46 | 45 | ||
47 | if __name__ == "__main__": | 46 | if __name__ == "__main__": |
48 | 47 | ||
49 | - unittest.main(verbosity=2) | 48 | + # unittest.main(verbosity=2) |
50 | 49 | ||
51 | com.run_list([test_weighingServiceSave("test_weighingServiceSave_01"),test_weighingServiceSave("test_weighingServiceSave_02")]) | 50 | com.run_list([test_weighingServiceSave("test_weighingServiceSave_01"),test_weighingServiceSave("test_weighingServiceSave_02")]) |