提交 e9dba125348b7f016a300159adff9b4c8834c8e7

作者 Shishutong
1 个父辈 91efd421

1.run文件调整

1 1 <?xml version="1.0" encoding="UTF-8"?>
2 2 <project version="4">
3 3 <component name="ChangeListManager">
4   - <list default="true" id="129454fc-5415-4c7e-9855-d0293355ede5" name="Default Changelist" comment="1.项目维护">
5   - <change afterPath="$PROJECT_DIR$/.idea/git_toolbox_prj.xml" afterDir="false" />
  4 + <list default="true" id="129454fc-5415-4c7e-9855-d0293355ede5" name="Default Changelist" comment="1.run">
6 5 <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
  6 + <change beforePath="$PROJECT_DIR$/data/Internship_manage/test_07_apply_audit.xlsx" beforeDir="false" afterPath="$PROJECT_DIR$/data/Internship_manage/test_07_apply_audit.xlsx" afterDir="false" />
  7 + <change beforePath="$PROJECT_DIR$/data/Internship_manage/test_08_log_marking.xlsx" beforeDir="false" afterPath="$PROJECT_DIR$/data/Internship_manage/test_08_log_marking.xlsx" afterDir="false" />
  8 + <change beforePath="$PROJECT_DIR$/data/Internship_manage/test_09_leave_record.xlsx" beforeDir="false" afterPath="$PROJECT_DIR$/data/Internship_manage/test_09_leave_record.xlsx" afterDir="false" />
  9 + <change beforePath="$PROJECT_DIR$/data/Internship_preparation/test_04_internship_plan.xlsx" beforeDir="false" afterPath="$PROJECT_DIR$/data/Internship_preparation/test_04_internship_plan.xlsx" afterDir="false" />
  10 + <change beforePath="$PROJECT_DIR$/data/Internship_preparation/test_05_internship_project.xlsx" beforeDir="false" afterPath="$PROJECT_DIR$/data/Internship_preparation/test_05_internship_project.xlsx" afterDir="false" />
  11 + <change beforePath="$PROJECT_DIR$/data/student_practice/test_06__practice.xlsx" beforeDir="false" afterPath="$PROJECT_DIR$/data/student_practice/test_06__practice.xlsx" afterDir="false" />
  12 + <change beforePath="$PROJECT_DIR$/data/system/test_02_department.xlsx" beforeDir="false" afterPath="$PROJECT_DIR$/data/system/test_02_department.xlsx" afterDir="false" />
  13 + <change beforePath="$PROJECT_DIR$/data/system/test_02_specialty.xlsx" beforeDir="false" afterPath="$PROJECT_DIR$/data/system/test_02_specialty.xlsx" afterDir="false" />
  14 + <change beforePath="$PROJECT_DIR$/data/system/test_02_term.xlsx" beforeDir="false" afterPath="$PROJECT_DIR$/data/system/test_02_term.xlsx" afterDir="false" />
  15 + <change beforePath="$PROJECT_DIR$/data/teaching_affairs/test_03_class.xlsx" beforeDir="false" afterPath="$PROJECT_DIR$/data/teaching_affairs/test_03_class.xlsx" afterDir="false" />
  16 + <change beforePath="$PROJECT_DIR$/data/teaching_affairs/test_03_course.xlsx" beforeDir="false" afterPath="$PROJECT_DIR$/data/teaching_affairs/test_03_course.xlsx" afterDir="false" />
  17 + <change beforePath="$PROJECT_DIR$/data/teaching_affairs/test_03_student.xlsx" beforeDir="false" afterPath="$PROJECT_DIR$/data/teaching_affairs/test_03_student.xlsx" afterDir="false" />
  18 + <change beforePath="$PROJECT_DIR$/data/teaching_affairs/test_03_teacher.xlsx" beforeDir="false" afterPath="$PROJECT_DIR$/data/teaching_affairs/test_03_teacher.xlsx" afterDir="false" />
  19 + <change beforePath="$PROJECT_DIR$/data/test_01_login.xlsx" beforeDir="false" afterPath="$PROJECT_DIR$/data/test_01_login.xlsx" afterDir="false" />
  20 + <change beforePath="$PROJECT_DIR$/report/history.json" beforeDir="false" afterPath="$PROJECT_DIR$/report/history.json" afterDir="false" />
  21 + <change beforePath="$PROJECT_DIR$/run.py" beforeDir="false" afterPath="$PROJECT_DIR$/run.py" afterDir="false" />
7 22 </list>
8 23 <option name="SHOW_DIALOG" value="false" />
9 24 <option name="HIGHLIGHT_CONFLICTS" value="true" />
... ... @@ -263,7 +278,7 @@
263 278 <workItem from="1689730508198" duration="11129000" />
264 279 <workItem from="1689816981406" duration="4617000" />
265 280 <workItem from="1689903460923" duration="538000" />
266   - <workItem from="1690180441280" duration="1652000" />
  281 + <workItem from="1690180441280" duration="2454000" />
267 282 </task>
268 283 <task id="LOCAL-00001" summary="1.0.0&#10;首次提交">
269 284 <created>1671544396986</created>
... ... @@ -433,7 +448,14 @@
433 448 <option name="project" value="LOCAL" />
434 449 <updated>1690180769402</updated>
435 450 </task>
436   - <option name="localTasksCounter" value="25" />
  451 + <task id="LOCAL-00025" summary="1.run">
  452 + <created>1690192861017</created>
  453 + <option name="number" value="00025" />
  454 + <option name="presentableId" value="LOCAL-00025" />
  455 + <option name="project" value="LOCAL" />
  456 + <updated>1690192861017</updated>
  457 + </task>
  458 + <option name="localTasksCounter" value="26" />
437 459 <servers />
438 460 </component>
439 461 <component name="TypeScriptGeneratedFilesManager">
... ... @@ -486,7 +508,8 @@
486 508 <MESSAGE value="版本:1.0.13&#10;1.封装生成身份证&quot;年&quot;" />
487 509 <MESSAGE value="版本:1.0.14&#10;1.学生端进行选择开始实习时间&#10;2.生成实习单,当前学生进入实习中" />
488 510 <MESSAGE value="1.项目维护" />
489   - <option name="LAST_COMMIT_MESSAGE" value="1.项目维护" />
  511 + <MESSAGE value="1.run" />
  512 + <option name="LAST_COMMIT_MESSAGE" value="1.run" />
490 513 </component>
491 514 <component name="XDebuggerManager">
492 515 <breakpoint-manager>
... ... @@ -618,17 +641,17 @@
618 641 </line-breakpoint>
619 642 <line-breakpoint suspend="THREAD" type="python-line">
620 643 <url>file://$PROJECT_DIR$/run.py</url>
621   - <line>60</line>
  644 + <line>72</line>
622 645 <option name="timeStamp" value="101" />
623 646 </line-breakpoint>
624 647 <line-breakpoint suspend="THREAD" type="python-line">
625 648 <url>file://$PROJECT_DIR$/run.py</url>
626   - <line>56</line>
  649 + <line>68</line>
627 650 <option name="timeStamp" value="102" />
628 651 </line-breakpoint>
629 652 <line-breakpoint suspend="THREAD" type="python-line">
630 653 <url>file://$PROJECT_DIR$/run.py</url>
631   - <line>54</line>
  654 + <line>66</line>
632 655 <option name="timeStamp" value="103" />
633 656 </line-breakpoint>
634 657 <line-breakpoint suspend="THREAD" type="python-line">
... ... @@ -849,7 +872,7 @@
849 872 <SUITE FILE_PATH="coverage/yxly$handle_token.coverage" NAME="handle_token Coverage Results" MODIFIED="1687916804880" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/tools" />
850 873 <SUITE FILE_PATH="coverage/yxly$Unittests_in_fixture_py.coverage" NAME="Unittests in fixture.py Coverage Results" MODIFIED="1671625806027" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/testcase" />
851 874 <SUITE FILE_PATH="coverage/yxly$aaa.coverage" NAME="aaa Coverage Results" MODIFIED="1675678970517" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/tools" />
852   - <SUITE FILE_PATH="coverage/yxly$run.coverage" NAME="run Coverage Results" MODIFIED="1689843780840" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
  875 + <SUITE FILE_PATH="coverage/yxly$run.coverage" NAME="run Coverage Results" MODIFIED="1690193210024" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
853 876 <SUITE FILE_PATH="coverage/yxly$Unittests_in_test_02_system_management_py.coverage" NAME="Unittests in test_02_system_management.py Coverage Results" MODIFIED="1672304630144" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/testcase" />
854 877 <SUITE FILE_PATH="coverage/yxly$Unittests_in_test_01_login_py.coverage" NAME="Unittests in test_01_login.py Coverage Results" MODIFIED="1671641941612" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/testcase" />
855 878 <SUITE FILE_PATH="coverage/yxly$Unittests_in_test_04_Internship_preparation_py.coverage" NAME="Unittests in test_04_Internship_preparation.py Coverage Results" MODIFIED="1678692199921" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/testcase" />
... ...
此 diff 太大无法显示。
... ... @@ -6,10 +6,16 @@
6 6 # @Software: PyCharm
7 7
8 8
9   -import sys
10   -import os
  9 +# import sys
  10 +# import os
  11 +# curPath = os.path.abspath(os.path.dirname(__file__))
  12 +# rootPath = os.path.split(curPath)[0]
  13 +# sys.path.append(rootPath)
11 14
12 15 import unittest
  16 +from common.handle_config import conf
  17 +from unittestreport import TestRunner
  18 +
13 19 from tools.function import runner_test
14 20 from common.handle_path import TestCase_Path, Report_Path
15 21 # 登陆
... ... @@ -29,10 +35,6 @@ from testcase.test_06_internship_manage import Test01SelectApplyAuditList, Test0
29 35 """
30 36 执行所有用例
31 37 """
32   -curPath = os.path.abspath(os.path.dirname(__file__))
33   -rootPath = os.path.split(curPath)[0]
34   -sys.path.append(rootPath)
35   -
36 38 # 创建测试套件
37 39 suite_all = unittest.TestSuite()
38 40 # 加载用例
... ... @@ -55,7 +57,9 @@ cccc = unittest.TestLoader().loadTestsFromTestCase(Test01addInternshipPlan)
55 57 suite = unittest.TestSuite([a1, a2, a3, a4, a5, a6])
56 58 suite_a = unittest.TestSuite([cccc])
57 59
58   -runner_test(suite_all) # 执行
  60 +# runner_test(suite_all) # 执行
  61 +
  62 +
59 63 # runner_test(suite_a) # 执行
60 64
61 65 # input_case = input("请输入需要执行的用例:")
... ... @@ -70,3 +74,15 @@ runner_test(suite_all) # 执行
70 74 # print("输入错误")
71 75 # else:
72 76 # print("执行完毕,请确认")
  77 +# 运行文件
  78 +runner = TestRunner(suite=suite_all,
  79 + filename=conf.get("report", "filename"),
  80 + report_dir=Report_Path,
  81 + title=conf.get("report", "title"),
  82 + tester=conf.get("report", "tester"),
  83 + desc=conf.get("report", "desc"),
  84 + templates=conf.getint("report", "templates")
  85 + )
  86 +# runner.run()
  87 +# 执行失败重新运行机制
  88 +runner.rerun_run(count=2, interval=0.2)
... ...
注册登录 后发表评论