提交 676ef25a3918260dfa12816db465f7d541ba0919

作者 Shishutong
1 个父辈 ed1fd747

1.0.2

1.新增的专业与新增的院系id做关联
2。新增教师用例
3。已知bug优化
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.0.1&#10;&#10;1.新增fixture.py&#10;2.新增查看院系接口测试用例&#10;4.新增整理Excel表格数据入参问题&#10;3.代码优化">
5   - <change afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" />
  4 + <list default="true" id="129454fc-5415-4c7e-9855-d0293355ede5" name="Default Changelist" comment="1.0.1&#10;&#10;1.新增发送邮件">
  5 + <change afterPath="$PROJECT_DIR$/data/system/test_02_specialty.xlsx" afterDir="false" />
  6 + <change afterPath="$PROJECT_DIR$/data/teaching_affairs/test_03_class.xlsx" afterDir="false" />
  7 + <change afterPath="$PROJECT_DIR$/data/teaching_affairs/test_03_teacher.xlsx" afterDir="false" />
6 8 <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
  9 + <change beforePath="$PROJECT_DIR$/common/handle_excel.py" beforeDir="false" afterPath="$PROJECT_DIR$/common/handle_excel.py" afterDir="false" />
  10 + <change beforePath="$PROJECT_DIR$/data/system/test_02_department.xlsx" beforeDir="false" afterPath="$PROJECT_DIR$/data/system/test_02_department.xlsx" afterDir="false" />
  11 + <change beforePath="$PROJECT_DIR$/data/system/test_03_specialty.xlsx" beforeDir="false" />
  12 + <change beforePath="$PROJECT_DIR$/data/system/test_04_term.xlsx" beforeDir="false" afterPath="$PROJECT_DIR$/data/system/test_02_term.xlsx" afterDir="false" />
  13 + <change beforePath="$PROJECT_DIR$/data/test_01_login.xlsx" beforeDir="false" afterPath="$PROJECT_DIR$/data/test_01_login.xlsx" afterDir="false" />
  14 + <change beforePath="$PROJECT_DIR$/logs/log.log" beforeDir="false" afterPath="$PROJECT_DIR$/logs/log.log" afterDir="false" />
  15 + <change beforePath="$PROJECT_DIR$/report/history.json" beforeDir="false" afterPath="$PROJECT_DIR$/report/history.json" afterDir="false" />
  16 + <change beforePath="$PROJECT_DIR$/report/report.html" beforeDir="false" afterPath="$PROJECT_DIR$/report/report.html" afterDir="false" />
7 17 <change beforePath="$PROJECT_DIR$/run.py" beforeDir="false" afterPath="$PROJECT_DIR$/run.py" afterDir="false" />
  18 + <change beforePath="$PROJECT_DIR$/testcase/test_01_login.py" beforeDir="false" afterPath="$PROJECT_DIR$/testcase/test_01_login.py" afterDir="false" />
  19 + <change beforePath="$PROJECT_DIR$/testcase/test_02_system_management.py" beforeDir="false" afterPath="$PROJECT_DIR$/testcase/test_02_system_management.py" afterDir="false" />
  20 + <change beforePath="$PROJECT_DIR$/testcase/test_03_teaching_affairs.py" beforeDir="false" afterPath="$PROJECT_DIR$/testcase/test_03_teaching_affairs.py" afterDir="false" />
  21 + <change beforePath="$PROJECT_DIR$/tools/fixture.py" beforeDir="false" afterPath="$PROJECT_DIR$/tools/fixture.py" afterDir="false" />
8 22 </list>
9 23 <option name="SHOW_DIALOG" value="false" />
10 24 <option name="HIGHLIGHT_CONFLICTS" value="true" />
... ... @@ -53,16 +67,17 @@
53 67 <property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
54 68 <property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
55 69 <property name="WebServerToolWindowFactoryState" value="false" />
56   - <property name="last_opened_file_path" value="$PROJECT_DIR$/tools" />
  70 + <property name="last_opened_file_path" value="$PROJECT_DIR$/data/teaching_affairs" />
57 71 <property name="settings.editor.selected.configurable" value="preferences.pluginManager" />
58 72 </component>
59 73 <component name="RecentsManager">
60 74 <key name="CopyFile.RECENT_KEYS">
  75 + <recent name="$PROJECT_DIR$/data/teaching_affairs" />
61 76 <recent name="$PROJECT_DIR$/tools" />
62 77 </key>
63 78 </component>
64 79 <component name="RunManager" selected="Python.run">
65   - <configuration name="fixture" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
  80 + <configuration name="fixture (1)" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
66 81 <module name="yxly2" />
67 82 <option name="INTERPRETER_OPTIONS" value="" />
68 83 <option name="PARENT_ENVS" value="true" />
... ... @@ -70,12 +85,12 @@
70 85 <env name="PYTHONUNBUFFERED" value="1" />
71 86 </envs>
72 87 <option name="SDK_HOME" value="" />
73   - <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/testcase" />
  88 + <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/tools" />
74 89 <option name="IS_MODULE_SDK" value="true" />
75 90 <option name="ADD_CONTENT_ROOTS" value="true" />
76 91 <option name="ADD_SOURCE_ROOTS" value="true" />
77 92 <EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
78   - <option name="SCRIPT_NAME" value="$PROJECT_DIR$/testcase/fixture.py" />
  93 + <option name="SCRIPT_NAME" value="$PROJECT_DIR$/tools/fixture.py" />
79 94 <option name="PARAMETERS" value="" />
80 95 <option name="SHOW_COMMAND_LINE" value="false" />
81 96 <option name="EMULATE_TERMINAL" value="false" />
... ... @@ -106,7 +121,7 @@
106 121 <option name="INPUT_FILE" value="" />
107 122 <method v="2" />
108 123 </configuration>
109   - <configuration name="Unittests in fixture.py" type="tests" factoryName="Unittests" temporary="true" nameIsGenerated="true">
  124 + <configuration name="Unittests in test_01_login.py" type="tests" factoryName="Unittests" temporary="true" nameIsGenerated="true">
110 125 <module name="yxly2" />
111 126 <option name="INTERPRETER_OPTIONS" value="" />
112 127 <option name="PARENT_ENVS" value="true" />
... ... @@ -117,7 +132,7 @@
117 132 <option name="ADD_SOURCE_ROOTS" value="true" />
118 133 <EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
119 134 <option name="_new_additionalArguments" value="&quot;&quot;" />
120   - <option name="_new_target" value="&quot;$PROJECT_DIR$/testcase/fixture.py&quot;" />
  135 + <option name="_new_target" value="&quot;$PROJECT_DIR$/testcase/test_01_login.py&quot;" />
121 136 <option name="_new_targetType" value="&quot;PATH&quot;" />
122 137 <method v="2" />
123 138 </configuration>
... ... @@ -136,18 +151,35 @@
136 151 <option name="_new_targetType" value="&quot;PATH&quot;" />
137 152 <method v="2" />
138 153 </configuration>
  154 + <configuration name="Unittests in test_03_teaching_affairs.py" type="tests" factoryName="Unittests" temporary="true" nameIsGenerated="true">
  155 + <module name="yxly2" />
  156 + <option name="INTERPRETER_OPTIONS" value="" />
  157 + <option name="PARENT_ENVS" value="true" />
  158 + <option name="SDK_HOME" value="" />
  159 + <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/testcase" />
  160 + <option name="IS_MODULE_SDK" value="true" />
  161 + <option name="ADD_CONTENT_ROOTS" value="true" />
  162 + <option name="ADD_SOURCE_ROOTS" value="true" />
  163 + <EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
  164 + <option name="_new_additionalArguments" value="&quot;&quot;" />
  165 + <option name="_new_target" value="&quot;$PROJECT_DIR$/testcase/test_03_teaching_affairs.py&quot;" />
  166 + <option name="_new_targetType" value="&quot;PATH&quot;" />
  167 + <method v="2" />
  168 + </configuration>
139 169 <list>
140 170 <item itemvalue="Python.run" />
141   - <item itemvalue="Python.fixture" />
142 171 <item itemvalue="Python tests.Unittests in test_02_system_management.py" />
143   - <item itemvalue="Python tests.Unittests in fixture.py" />
  172 + <item itemvalue="Python tests.Unittests in test_01_login.py" />
  173 + <item itemvalue="Python.fixture (1)" />
  174 + <item itemvalue="Python tests.Unittests in test_03_teaching_affairs.py" />
144 175 </list>
145 176 <recent_temporary>
146 177 <list>
147 178 <item itemvalue="Python.run" />
148 179 <item itemvalue="Python tests.Unittests in test_02_system_management.py" />
149   - <item itemvalue="Python.fixture" />
150   - <item itemvalue="Python tests.Unittests in fixture.py" />
  180 + <item itemvalue="Python tests.Unittests in test_03_teaching_affairs.py" />
  181 + <item itemvalue="Python.fixture (1)" />
  182 + <item itemvalue="Python tests.Unittests in test_01_login.py" />
151 183 </list>
152 184 </recent_temporary>
153 185 </component>
... ... @@ -164,7 +196,8 @@
164 196 <workItem from="1671554332302" duration="650000" />
165 197 <workItem from="1671612580435" duration="100000" />
166 198 <workItem from="1671612709033" duration="18069000" />
167   - <workItem from="1671637473856" duration="796000" />
  199 + <workItem from="1671637473856" duration="5050000" />
  200 + <workItem from="1671683905863" duration="21393000" />
168 201 </task>
169 202 <task id="LOCAL-00001" summary="1.0.0&#10;首次提交">
170 203 <created>1671544396986</created>
... ... @@ -180,7 +213,14 @@
180 213 <option name="project" value="LOCAL" />
181 214 <updated>1671636040241</updated>
182 215 </task>
183   - <option name="localTasksCounter" value="3" />
  216 + <task id="LOCAL-00003" summary="1.0.1&#10;&#10;1.新增发送邮件">
  217 + <created>1671638407457</created>
  218 + <option name="number" value="00003" />
  219 + <option name="presentableId" value="LOCAL-00003" />
  220 + <option name="project" value="LOCAL" />
  221 + <updated>1671638407457</updated>
  222 + </task>
  223 + <option name="localTasksCounter" value="4" />
184 224 <servers />
185 225 </component>
186 226 <component name="TypeScriptGeneratedFilesManager">
... ... @@ -213,34 +253,85 @@
213 253 <component name="VcsManagerConfiguration">
214 254 <MESSAGE value="1.0.0&#10;首次提交" />
215 255 <MESSAGE value="1.0.1&#10;&#10;1.新增fixture.py&#10;2.新增查看院系接口测试用例&#10;4.新增整理Excel表格数据入参问题&#10;3.代码优化" />
216   - <option name="LAST_COMMIT_MESSAGE" value="1.0.1&#10;&#10;1.新增fixture.py&#10;2.新增查看院系接口测试用例&#10;4.新增整理Excel表格数据入参问题&#10;3.代码优化" />
  256 + <MESSAGE value="1.0.1&#10;&#10;1.新增发送邮件" />
  257 + <option name="LAST_COMMIT_MESSAGE" value="1.0.1&#10;&#10;1.新增发送邮件" />
217 258 </component>
218 259 <component name="XDebuggerManager">
219 260 <breakpoint-manager>
220 261 <breakpoints>
221   - <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
  262 + <line-breakpoint suspend="THREAD" type="python-line">
222 263 <url>file://$PROJECT_DIR$/testcase/test_02_system_management.py</url>
223   - <line>147</line>
  264 + <line>148</line>
224 265 <option name="timeStamp" value="5" />
225 266 </line-breakpoint>
226   - <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
  267 + <line-breakpoint suspend="THREAD" type="python-line">
227 268 <url>file://$PROJECT_DIR$/testcase/test_02_system_management.py</url>
228   - <line>180</line>
  269 + <line>184</line>
229 270 <option name="timeStamp" value="10" />
230 271 </line-breakpoint>
231   - <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
  272 + <line-breakpoint suspend="THREAD" type="python-line">
232 273 <url>file://$PROJECT_DIR$/testcase/test_02_system_management.py</url>
233 274 <line>88</line>
234 275 <option name="timeStamp" value="11" />
235 276 </line-breakpoint>
  277 + <line-breakpoint suspend="THREAD" type="python-line">
  278 + <url>file://$PROJECT_DIR$/testcase/test_01_login.py</url>
  279 + <line>27</line>
  280 + <option name="timeStamp" value="12" />
  281 + </line-breakpoint>
  282 + <line-breakpoint suspend="THREAD" type="python-line">
  283 + <url>file://$PROJECT_DIR$/testcase/test_01_login.py</url>
  284 + <line>40</line>
  285 + <option name="timeStamp" value="13" />
  286 + </line-breakpoint>
  287 + <line-breakpoint suspend="THREAD" type="python-line">
  288 + <url>file://$PROJECT_DIR$/testcase/test_01_login.py</url>
  289 + <line>37</line>
  290 + <option name="timeStamp" value="14" />
  291 + </line-breakpoint>
  292 + <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
  293 + <url>file://$PROJECT_DIR$/tools/fixture.py</url>
  294 + <line>31</line>
  295 + <option name="timeStamp" value="16" />
  296 + </line-breakpoint>
  297 + <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
  298 + <url>file://$PROJECT_DIR$/testcase/test_03_teaching_affairs.py</url>
  299 + <line>90</line>
  300 + <option name="timeStamp" value="22" />
  301 + </line-breakpoint>
  302 + <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
  303 + <url>file://$PROJECT_DIR$/testcase/test_03_teaching_affairs.py</url>
  304 + <line>107</line>
  305 + <option name="timeStamp" value="23" />
  306 + </line-breakpoint>
  307 + <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
  308 + <url>file://$PROJECT_DIR$/testcase/test_02_system_management.py</url>
  309 + <line>178</line>
  310 + <option name="timeStamp" value="24" />
  311 + </line-breakpoint>
  312 + <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
  313 + <url>file://$PROJECT_DIR$/testcase/test_02_system_management.py</url>
  314 + <line>176</line>
  315 + <option name="timeStamp" value="25" />
  316 + </line-breakpoint>
236 317 </breakpoints>
  318 + <default-breakpoints>
  319 + <breakpoint type="python-exception">
  320 + <properties notifyOnTerminate="true" exception="BaseException">
  321 + <option name="notifyOnTerminate" value="true" />
  322 + </properties>
  323 + </breakpoint>
  324 + </default-breakpoints>
237 325 </breakpoint-manager>
238 326 </component>
239 327 <component name="com.intellij.coverage.CoverageDataManagerImpl">
240   - <SUITE FILE_PATH="coverage/yxly$Unittests_in_test_02_system_management_py.coverage" NAME="Unittests in test_02_system_management.py Coverage Results" MODIFIED="1671628771276" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/testcase" />
  328 + <SUITE FILE_PATH="coverage/yxly$fixture__1_.coverage" NAME="fixture (1) Coverage Results" MODIFIED="1671721079921" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/tools" />
  329 + <SUITE FILE_PATH="coverage/yxly$Unittests_in_test_02_system_management_py.coverage" NAME="Unittests in test_02_system_management.py Coverage Results" MODIFIED="1671721675550" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/testcase" />
  330 + <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" />
241 331 <SUITE FILE_PATH="coverage/yxly$fixture.coverage" NAME="fixture Coverage Results" MODIFIED="1671628017395" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/testcase" />
242 332 <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" />
  333 + <SUITE FILE_PATH="coverage/yxly$Unittests_in_test_03_teaching_affairs_py.coverage" NAME="Unittests in test_03_teaching_affairs.py Coverage Results" MODIFIED="1671721363914" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/testcase" />
243 334 <SUITE FILE_PATH="coverage/yxly$pytest_in_test_02_system_management_py.coverage" NAME="pytest in test_02_system_management.py Coverage Results" MODIFIED="1671617451891" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/testcase" />
244   - <SUITE FILE_PATH="coverage/yxly$run.coverage" NAME="run Coverage Results" MODIFIED="1671635454441" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
  335 + <SUITE FILE_PATH="coverage/yxly$run.coverage" NAME="run Coverage Results" MODIFIED="1671721748026" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
245 336 </component>
246 337 </project>
\ No newline at end of file
... ...
... ... @@ -6,7 +6,6 @@
6 6 # @Software: PyCharm
7 7 """
8 8 封装读写excel表格
9   -
10 9 """
11 10 import openpyxl
12 11
... ...
不能预览此文件类型
不能预览此文件类型
此 diff 太大无法显示。
1   -[{"success": 9, "all": 24, "fail": 15, "skip": 0, "error": 0, "runtime": "12.67 S", "begin_time": "2022-12-19 17:56:09", "pass_rate": "37.50"}, {"success": 9, "all": 24, "fail": 15, "skip": 0, "error": 0, "runtime": "7.87 S", "begin_time": "2022-12-19 17:58:06", "pass_rate": "37.50"}, {"success": 9, "all": 24, "fail": 15, "skip": 0, "error": 0, "runtime": "7.24 S", "begin_time": "2022-12-19 18:17:28", "pass_rate": "37.50"}, {"success": 9, "all": 24, "fail": 15, "skip": 0, "error": 0, "runtime": "7.45 S", "begin_time": "2022-12-19 18:19:47", "pass_rate": "37.50"}, {"success": 9, "all": 24, "fail": 15, "skip": 0, "error": 0, "runtime": "7.72 S", "begin_time": "2022-12-19 19:32:22", "pass_rate": "37.50"}, {"success": 9, "all": 24, "fail": 15, "skip": 0, "error": 0, "runtime": "103.32 S", "begin_time": "2022-12-19 20:35:55", "pass_rate": "37.50"}, {"success": 9, "all": 24, "fail": 15, "skip": 0, "error": 0, "runtime": "6.95 S", "begin_time": "2022-12-20 12:06:06", "pass_rate": "37.50"}, {"success": 9, "all": 24, "fail": 15, "skip": 0, "error": 0, "runtime": "6.92 S", "begin_time": "2022-12-20 21:34:11", "pass_rate": "37.50"}, {"success": 9, "all": 24, "fail": 15, "skip": 0, "error": 0, "runtime": "6.77 S", "begin_time": "2022-12-20 21:35:13", "pass_rate": "37.50"}, {"success": 8, "all": 25, "fail": 12, "skip": 0, "error": 5, "runtime": "14.41 S", "begin_time": "2022-12-21 22:40:23", "pass_rate": "32.00"}, {"success": 8, "all": 25, "fail": 12, "skip": 0, "error": 5, "runtime": "14.73 S", "begin_time": "2022-12-21 22:52:34", "pass_rate": "32.00"}, {"success": 9, "all": 25, "fail": 12, "skip": 0, "error": 4, "runtime": "14.49 S", "begin_time": "2022-12-21 22:55:57", "pass_rate": "36.00"}, {"success": 9, "all": 25, "fail": 12, "skip": 0, "error": 4, "runtime": "14.04 S", "begin_time": "2022-12-21 22:57:36", "pass_rate": "36.00"}, {"success": 9, "all": 25, "fail": 16, "skip": 0, "error": 0, "runtime": "14.09 S", "begin_time": "2022-12-21 23:02:18", "pass_rate": "36.00"}, {"success": 9, "all": 25, "fail": 16, "skip": 0, "error": 0, "runtime": "14.30 S", "begin_time": "2022-12-21 23:10:55", "pass_rate": "36.00"}]
\ No newline at end of file
  1 +[{"success": 9, "all": 24, "fail": 15, "skip": 0, "error": 0, "runtime": "12.67 S", "begin_time": "2022-12-19 17:56:09", "pass_rate": "37.50"}, {"success": 9, "all": 24, "fail": 15, "skip": 0, "error": 0, "runtime": "7.87 S", "begin_time": "2022-12-19 17:58:06", "pass_rate": "37.50"}, {"success": 9, "all": 24, "fail": 15, "skip": 0, "error": 0, "runtime": "7.24 S", "begin_time": "2022-12-19 18:17:28", "pass_rate": "37.50"}, {"success": 9, "all": 24, "fail": 15, "skip": 0, "error": 0, "runtime": "7.45 S", "begin_time": "2022-12-19 18:19:47", "pass_rate": "37.50"}, {"success": 9, "all": 24, "fail": 15, "skip": 0, "error": 0, "runtime": "7.72 S", "begin_time": "2022-12-19 19:32:22", "pass_rate": "37.50"}, {"success": 9, "all": 24, "fail": 15, "skip": 0, "error": 0, "runtime": "103.32 S", "begin_time": "2022-12-19 20:35:55", "pass_rate": "37.50"}, {"success": 9, "all": 24, "fail": 15, "skip": 0, "error": 0, "runtime": "6.95 S", "begin_time": "2022-12-20 12:06:06", "pass_rate": "37.50"}, {"success": 9, "all": 24, "fail": 15, "skip": 0, "error": 0, "runtime": "6.92 S", "begin_time": "2022-12-20 21:34:11", "pass_rate": "37.50"}, {"success": 9, "all": 24, "fail": 15, "skip": 0, "error": 0, "runtime": "6.77 S", "begin_time": "2022-12-20 21:35:13", "pass_rate": "37.50"}, {"success": 8, "all": 25, "fail": 12, "skip": 0, "error": 5, "runtime": "14.41 S", "begin_time": "2022-12-21 22:40:23", "pass_rate": "32.00"}, {"success": 8, "all": 25, "fail": 12, "skip": 0, "error": 5, "runtime": "14.73 S", "begin_time": "2022-12-21 22:52:34", "pass_rate": "32.00"}, {"success": 9, "all": 25, "fail": 12, "skip": 0, "error": 4, "runtime": "14.49 S", "begin_time": "2022-12-21 22:55:57", "pass_rate": "36.00"}, {"success": 9, "all": 25, "fail": 12, "skip": 0, "error": 4, "runtime": "14.04 S", "begin_time": "2022-12-21 22:57:36", "pass_rate": "36.00"}, {"success": 9, "all": 25, "fail": 16, "skip": 0, "error": 0, "runtime": "14.09 S", "begin_time": "2022-12-21 23:02:18", "pass_rate": "36.00"}, {"success": 9, "all": 25, "fail": 16, "skip": 0, "error": 0, "runtime": "14.30 S", "begin_time": "2022-12-21 23:10:55", "pass_rate": "36.00"}, {"success": 9, "all": 25, "fail": 16, "skip": 0, "error": 0, "runtime": "14.19 S", "begin_time": "2022-12-22 00:05:50", "pass_rate": "36.00"}, {"success": 5, "all": 25, "fail": 16, "skip": 0, "error": 4, "runtime": "13.92 S", "begin_time": "2022-12-22 00:26:21", "pass_rate": "20.00"}, {"success": 9, "all": 25, "fail": 16, "skip": 0, "error": 0, "runtime": "15.25 S", "begin_time": "2022-12-22 00:32:39", "pass_rate": "36.00"}, {"success": 0, "all": 8, "fail": 0, "skip": 0, "error": 8, "runtime": "0.71 S", "begin_time": "2022-12-22 00:47:52", "pass_rate": "0.00"}, {"success": 8, "all": 25, "fail": 17, "skip": 0, "error": 0, "runtime": "12.65 S", "begin_time": "2022-12-22 00:54:19", "pass_rate": "32.00"}, {"success": 4, "all": 15, "fail": 11, "skip": 0, "error": 0, "runtime": "10.52 S", "begin_time": "2022-12-22 15:54:09", "pass_rate": "26.67"}, {"success": 4, "all": 15, "fail": 11, "skip": 0, "error": 0, "runtime": "10.60 S", "begin_time": "2022-12-22 15:59:15", "pass_rate": "26.67"}, {"success": 7, "all": 26, "fail": 9, "skip": 0, "error": 10, "runtime": "13.48 S", "begin_time": "2022-12-22 23:03:40", "pass_rate": "26.92"}, {"success": 6, "all": 16, "fail": 10, "skip": 0, "error": 0, "runtime": "11.90 S", "begin_time": "2022-12-22 23:08:12", "pass_rate": "37.50"}, {"success": 10, "all": 26, "fail": 16, "skip": 0, "error": 0, "runtime": "15.15 S", "begin_time": "2022-12-22 23:09:09", "pass_rate": "38.46"}]
\ No newline at end of file
... ...
... ... @@ -156,15 +156,15 @@
156 156 </li>
157 157 <li class="list-group-item">
158 158 <button type="button" class="btn btn-success">开始时间</button>
159   - <span class="text-dark">2022-12-21 23:10:55</span>
  159 + <span class="text-dark">2022-12-22 23:09:09</span>
160 160 </li>
161 161 <li class="list-group-item">
162 162 <button type="button" class="btn btn-success">执行时间</button>
163   - <span class="text-dark">14.30 S</span>
  163 + <span class="text-dark">15.15 S</span>
164 164 </li>
165 165 <li class="list-group-item">
166 166 <button type="button" class="btn btn-success">用例总数</button>
167   - <span class="text-dark">25</span>
  167 + <span class="text-dark">26</span>
168 168 </li>
169 169
170 170
... ... @@ -175,7 +175,7 @@
175 175
176 176 <li class="list-group-item">
177 177 <button type="button" class="btn btn-success">成功用例</button>
178   - <span class="text-success">9</span>
  178 + <span class="text-success">10</span>
179 179 </li>
180 180 <li class="list-group-item">
181 181 <button type="button" class="btn btn-warning">失败用例</button>
... ... @@ -225,14 +225,16 @@
225 225 <select id="testClass">
226 226 <option>所有</option>
227 227
228   - <option>Test03Year</option>
  228 + <option>TestLogin</option>
229 229
230   - <option>Test02Specialty</option>
  230 + <option>Test01CTeacher</option>
231 231
232   - <option>TestLogin</option>
  232 + <option>Test02Specialty</option>
233 233
234 234 <option>Test01Department</option>
235 235
  236 + <option>Test03Year</option>
  237 +
236 238 </select>
237 239
238 240 </th>
... ... @@ -262,7 +264,7 @@
262 264 <td class="TestLogin">TestLogin</td>
263 265 <td>test_login_1</td>
264 266 <td>登陆成功</td>
265   - <td>0.558s</td>
  267 + <td>0.522s</td>
266 268
267 269 <td class="text-success">成功</td>
268 270
... ... @@ -278,7 +280,7 @@
278 280
279 281 <pre>用例入参:{'way': 'name', 'password': 'f85eea0e15e424aba8675f8848e2cb83', 'type': 'teacher', 'username': '17301249975'}
280 282 预期结果:{'msg': 'success', 'code': 200}
281   -实际结果:{'msg': 'success', 'code': 200, 'data': {'access_token': 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZW5hbnRUeXBlIjoiIiwiYnJva2VySWQiOiIiLCJocm9Vc2VyVG9rZW4iOm51bGwsInVzZXJfbmFtZSI6IjE3MzAxMjQ5OTc1IiwiYXV0aFN0YXR1cyI6IiIsImF1dGhlbnRpY2F0aW9uSWRlbnRpdHkiOiJsb2dpbiIsInR5cGUiOiJ0ZWFjaGVyIiwidXNlcklkIjoiMTUxOTk1OTIwODUyOTg2Njc1MyIsImNsaWVudF9pZCI6IndvcmthaSIsInN0dWRlbnRJZCI6IiIsInRlYWNoZXJJZCI6IjE1MTk5NTkyMDkyNzY0NTI4NjUiLCJ0ZW5hbnROYW1lIjoiIiwicGhvbmUiOiIxNzMwMTI0OTk3NSIsInNjb3BlIjpbImFsbCJdLCJzY2hvb2xJZCI6IjE1MTk5NTg1NjYxMzAyNTc5MjIiLCJ0ZW5hbnRJZCI6IiIsIm5hbWUiOiLmoKHplb8iLCJzdHVkZW50U3RhdHVzIjoiIiwiZXhwIjoxNjcxNjcxNDU1LCJzY2hvb2xOYW1lIjoi5rWL6K-V5aSn5a2mIiwianRpIjoiM2Q1MDkxYzAtM2ZlYy00ZWMxLWJjY2ItYjcyYmM3OGZhNWUwIiwic3RhdHVzIjoiYWN0aXZlIn0.AzyaOjNsF1cSheQAzVWLyXS-H3LhbjLCDsQ8QoKMWrEE-b_3wXi5W7NVVwlYIXkf2rbsuhXpauXLQd6drjpqCzswPKqxu1zObV0WBQ_ej9Mh-n3sLbdwzk1-Hug3tm4tryPEWzt5ysCa8pSUChjlosvo_e23KCPUohENyp2uvI1LcDZJpn0ZgpGHWf6XcBDA7FoICJC3SvbU_NKBxjetgnNdcoNWekmk_xULKgG6hJKNdd1MT6FhI0kw2uQGZJ5RWYdFwv5gVqg5-GH3cNSoGPw6YY0SvYQZaaUaUHyOu8Pr7cCnRtQJPdEFDXpARgd13jpXYudKf9KcUJnFgFCoBQ', 'token_type': 'bearer', 'refresh_token': 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZW5hbnRUeXBlIjoiIiwiYnJva2VySWQiOiIiLCJocm9Vc2VyVG9rZW4iOm51bGwsInVzZXJfbmFtZSI6IjE3MzAxMjQ5OTc1IiwiYXV0aFN0YXR1cyI6IiIsImF1dGhlbnRpY2F0aW9uSWRlbnRpdHkiOiJsb2dpbiIsInR5cGUiOiJ0ZWFjaGVyIiwidXNlcklkIjoiMTUxOTk1OTIwODUyOTg2Njc1MyIsImNsaWVudF9pZCI6IndvcmthaSIsInN0dWRlbnRJZCI6IiIsInRlYWNoZXJJZCI6IjE1MTk5NTkyMDkyNzY0NTI4NjUiLCJ0ZW5hbnROYW1lIjoiIiwicGhvbmUiOiIxNzMwMTI0OTk3NSIsInNjb3BlIjpbImFsbCJdLCJzY2hvb2xJZCI6IjE1MTk5NTg1NjYxMzAyNTc5MjIiLCJhdGkiOiIzZDUwOTFjMC0zZmVjLTRlYzEtYmNjYi1iNzJiYzc4ZmE1ZTAiLCJ0ZW5hbnRJZCI6IiIsIm5hbWUiOiLmoKHplb8iLCJzdHVkZW50U3RhdHVzIjoiIiwiZXhwIjoxNjcxNzA3NDU1LCJzY2hvb2xOYW1lIjoi5rWL6K-V5aSn5a2mIiwianRpIjoiNjllYWIyZGQtZmFmOS00YTU5LWFlOTEtYTYzNDJjZDQxZGIzIiwic3RhdHVzIjoiYWN0aXZlIn0.CyO8dx_qojewAsZDglQISHRqucAjA4AmxFgrXLOpv0sSCU8c5NwPDWA2rGMD2AtbDuWn2HohqrvB_Vp1ryzGrIdRqd8YkSssVedQQbcuA2YlrUiT6htpI5ezjsaDeAkFc75Ijl_BWXbyafsz0Geow6EvfMoiBn3cCrqsJHeDoUc5VBKtE-F8sh6eE0PGoLwnIfmPsiJSsQpxNVJLMGIyYCVZztSHIJhqvzlwclwOnOaGrBnhkq9BIIQU0mfACJXTDUIsI2EjB8Wl6rSoEVKjmTTGbNgbat_n23hRWOv-GXga_IGXDBoKmyRy6dyhyoFWjVXRzItP2AVnt-momBov9g', 'expires_in': 35999, 'scope': 'all', 'tenantType': '', 'brokerId': '', 'hroUserToken': None, 'authStatus': '', 'authenticationIdentity': 'login', 'type': 'teacher', 'userId': '1519959208529866753', 'studentId': '', 'teacherId': '1519959209276452865', 'tenantName': '', 'phone': '17301249975', 'schoolId': '1519958566130257922', 'tenantId': '', 'name': '校长', 'studentStatus': '', 'schoolName': '测试大学', 'status': 'active', 'jti': '3d5091c0-3fec-4ec1-bccb-b72bc78fa5e0'}}
  283 +实际结果:{'msg': 'success', 'code': 200, 'data': {'access_token': 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZW5hbnRUeXBlIjoiIiwiYnJva2VySWQiOiIiLCJocm9Vc2VyVG9rZW4iOm51bGwsInVzZXJfbmFtZSI6IjE3MzAxMjQ5OTc1IiwiYXV0aFN0YXR1cyI6IiIsImF1dGhlbnRpY2F0aW9uSWRlbnRpdHkiOiJsb2dpbiIsInR5cGUiOiJ0ZWFjaGVyIiwidXNlcklkIjoiMTUxOTk1OTIwODUyOTg2Njc1MyIsImNsaWVudF9pZCI6IndvcmthaSIsInN0dWRlbnRJZCI6IiIsInRlYWNoZXJJZCI6IjE1MTk5NTkyMDkyNzY0NTI4NjUiLCJ0ZW5hbnROYW1lIjoiIiwicGhvbmUiOiIxNzMwMTI0OTk3NSIsInNjb3BlIjpbImFsbCJdLCJzY2hvb2xJZCI6IjE1MTk5NTg1NjYxMzAyNTc5MjIiLCJ0ZW5hbnRJZCI6IiIsIm5hbWUiOiLmoKHplb8iLCJzdHVkZW50U3RhdHVzIjoiIiwiZXhwIjoxNjcxNzU3NzQ5LCJzY2hvb2xOYW1lIjoi5rWL6K-V5aSn5a2mIiwianRpIjoiMDliZGY3YmItMjQ1OS00MzFkLWJkMjctYzlkNDAzZDJmNWU5Iiwic3RhdHVzIjoiYWN0aXZlIn0.SL0fKv0hKIY0754w_Ms-mcQeTyWntEiDqsblj6HqGluYqdNO8gpGp2cuA-k0LqgtUNpYHoWzHtwkUyEJ8qJW8XZl0cTZQwJxnPcQYHyug-YcNn9lBumeKd-NnmgPDvAZYW81IYYugNRYxExn9pTmscFAe3z6sLLwg8XDnXYGOoGtMQ8bbcjc-CAmB0Ppb9Pmy_hF2rSvAfKgtqM59bxJT3yEKePY4LLXTSBWty-aGvuvnyGRN2yrQt4-N0hrGHtk9ZjsFCCOxaZuWQotJDOc8hMCh4YGhVvfuAvT-Z8uxIfiJj7vx4aR88zq3SDUae3zWsbPzQ4dUN5d7pBIK71Q7w', 'token_type': 'bearer', 'refresh_token': 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZW5hbnRUeXBlIjoiIiwiYnJva2VySWQiOiIiLCJocm9Vc2VyVG9rZW4iOm51bGwsInVzZXJfbmFtZSI6IjE3MzAxMjQ5OTc1IiwiYXV0aFN0YXR1cyI6IiIsImF1dGhlbnRpY2F0aW9uSWRlbnRpdHkiOiJsb2dpbiIsInR5cGUiOiJ0ZWFjaGVyIiwidXNlcklkIjoiMTUxOTk1OTIwODUyOTg2Njc1MyIsImNsaWVudF9pZCI6IndvcmthaSIsInN0dWRlbnRJZCI6IiIsInRlYWNoZXJJZCI6IjE1MTk5NTkyMDkyNzY0NTI4NjUiLCJ0ZW5hbnROYW1lIjoiIiwicGhvbmUiOiIxNzMwMTI0OTk3NSIsInNjb3BlIjpbImFsbCJdLCJzY2hvb2xJZCI6IjE1MTk5NTg1NjYxMzAyNTc5MjIiLCJhdGkiOiIwOWJkZjdiYi0yNDU5LTQzMWQtYmQyNy1jOWQ0MDNkMmY1ZTkiLCJ0ZW5hbnRJZCI6IiIsIm5hbWUiOiLmoKHplb8iLCJzdHVkZW50U3RhdHVzIjoiIiwiZXhwIjoxNjcxNzkzNzQ5LCJzY2hvb2xOYW1lIjoi5rWL6K-V5aSn5a2mIiwianRpIjoiYzk5ZDRmOTktZmNmMS00YzkyLThmMmQtYTRmY2JjYjAyMjE2Iiwic3RhdHVzIjoiYWN0aXZlIn0.WAYJK0CJtF1lJZcU4APZMllGn7mL5UKWKAgQEHbmbleGw2vcC8_mG0l1UkYqa2FCJ20AjLuLwEeo2LctfXecSnkuEegTV4_uICr1Uay4EjSCfvQYc4co-ztGPczBiNvHbW3SqMJ8XSOEtDilJPTaHti28Fb9gYwUdhki11rpnqFZkrx900gkr57WqA20VB2yEtQc1OG8Eb64FLqsC-2YURzz4yoCmxlCIo3t6b49YyuLJOoHTgY7lwPKyVdH9IleICPeUYsHSF0rCh3sYKfKkmKOLODhXDZynRaf0nHUr9nC8y0fVhKpD3N_6-RI563UCc9KUFyX8qEE0e3CiwrW8Q', 'expires_in': 35999, 'scope': 'all', 'tenantType': '', 'brokerId': '', 'hroUserToken': None, 'authStatus': '', 'authenticationIdentity': 'login', 'type': 'teacher', 'userId': '1519959208529866753', 'studentId': '', 'teacherId': '1519959209276452865', 'tenantName': '', 'phone': '17301249975', 'schoolId': '1519958566130257922', 'tenantId': '', 'name': '校长', 'studentStatus': '', 'schoolName': '测试大学', 'status': 'active', 'jti': '09bdf7bb-2459-431d-bd27-c9d403d2f5e9'}}
282 284 test_login_1 (test_01_login.TestLogin)执行——>【通过】
283 285 </pre>
284 286
... ... @@ -291,7 +293,7 @@ test_login_1 (test_01_login.TestLogin)銵>
291 293 <td class="TestLogin">TestLogin</td>
292 294 <td>test_login_2</td>
293 295 <td>手机号填写错误的</td>
294   - <td>0.237s</td>
  296 + <td>0.22s</td>
295 297
296 298 <td class="text-warning">失败</td>
297 299
... ... @@ -331,12 +333,12 @@ test_login_2 (test_01_login.TestLogin)銵>仃韐乓
331 333 </pre>
332 334
333 335
334   - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_01_login.py", line 56, in test_login
  336 + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_01_login.py", line 57, in test_login
335 337 raise e
336 338 </pre>
337 339
338 340
339   - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_01_login.py", line 48, in test_login
  341 + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_01_login.py", line 49, in test_login
340 342 self.assertEqual(expected['msg'], res['msg'])
341 343 </pre>
342 344
... ... @@ -371,7 +373,7 @@ test_login_2 (test_01_login.TestLogin)銵>仃韐乓
371 373 <td class="TestLogin">TestLogin</td>
372 374 <td>test_login_3</td>
373 375 <td>手机号不进行填写</td>
374   - <td>0.235s</td>
  376 + <td>0.214s</td>
375 377
376 378 <td class="text-warning">失败</td>
377 379
... ... @@ -411,12 +413,12 @@ test_login_3 (test_01_login.TestLogin)銵>仃韐乓
411 413 </pre>
412 414
413 415
414   - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_01_login.py", line 56, in test_login
  416 + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_01_login.py", line 57, in test_login
415 417 raise e
416 418 </pre>
417 419
418 420
419   - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_01_login.py", line 48, in test_login
  421 + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_01_login.py", line 49, in test_login
420 422 self.assertEqual(expected['msg'], res['msg'])
421 423 </pre>
422 424
... ... @@ -451,7 +453,7 @@ test_login_3 (test_01_login.TestLogin)銵>仃韐乓
451 453 <td class="TestLogin">TestLogin</td>
452 454 <td>test_login_4</td>
453 455 <td>密码填写错误</td>
454   - <td>0.219s</td>
  456 + <td>0.199s</td>
455 457
456 458 <td class="text-warning">失败</td>
457 459
... ... @@ -491,12 +493,12 @@ test_login_4 (test_01_login.TestLogin)銵>仃韐乓
491 493 </pre>
492 494
493 495
494   - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_01_login.py", line 56, in test_login
  496 + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_01_login.py", line 57, in test_login
495 497 raise e
496 498 </pre>
497 499
498 500
499   - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_01_login.py", line 48, in test_login
  501 + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_01_login.py", line 49, in test_login
500 502 self.assertEqual(expected['msg'], res['msg'])
501 503 </pre>
502 504
... ... @@ -531,7 +533,7 @@ test_login_4 (test_01_login.TestLogin)銵>仃韐乓
531 533 <td class="TestLogin">TestLogin</td>
532 534 <td>test_login_5</td>
533 535 <td>密码不进行填写</td>
534   - <td>0.268s</td>
  536 + <td>0.217s</td>
535 537
536 538 <td class="text-warning">失败</td>
537 539
... ... @@ -571,12 +573,12 @@ test_login_5 (test_01_login.TestLogin)銵>仃韐乓
571 573 </pre>
572 574
573 575
574   - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_01_login.py", line 56, in test_login
  576 + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_01_login.py", line 57, in test_login
575 577 raise e
576 578 </pre>
577 579
578 580
579   - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_01_login.py", line 48, in test_login
  581 + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_01_login.py", line 49, in test_login
580 582 self.assertEqual(expected['msg'], res['msg'])
581 583 </pre>
582 584
... ... @@ -611,7 +613,7 @@ test_login_5 (test_01_login.TestLogin)銵>仃韐乓
611 613 <td class="Test01Department">Test01Department</td>
612 614 <td>test_add_department_1</td>
613 615 <td>新增院系成功</td>
614   - <td>0.297s</td>
  616 + <td>0.275s</td>
615 617
616 618 <td class="text-success">成功</td>
617 619
... ... @@ -625,7 +627,7 @@ test_login_5 (test_01_login.TestLogin)銵>仃韐乓
625 627 <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all">
626 628
627 629
628   - <pre>用例入参:{'name': 'py自动化院系20221221_23:10:57_1', 'code': 'py_code20221221_23:10:57_1'}
  630 + <pre>用例入参:{'name': 'py自动化院系20221222_23:09:11_1', 'code': 'py_code20221222_23:09:11_1'}
629 631 预期结果: {'msg': 'success', 'code': 200, 'data': True}
630 632 实际结果: {'msg': 'success', 'code': 200, 'data': True}
631 633 test_add_department_1 (test_02_system_management.Test01Department)执行——>【通过】
... ... @@ -640,7 +642,7 @@ test_add_department_1 (test_02_system_management.Test01Department)銵>
640 642 <td class="Test01Department">Test01Department</td>
641 643 <td>test_add_department_2</td>
642 644 <td>院系名称未填写</td>
643   - <td>0.242s</td>
  645 + <td>0.225s</td>
644 646
645 647 <td class="text-warning">失败</td>
646 648
... ... @@ -654,7 +656,7 @@ test_add_department_1 (test_02_system_management.Test01Department)銵>
654 656 <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all">
655 657
656 658
657   - <pre>用例入参:{'name': '', 'code': 'py_code20221221_23:10:57_2'}
  659 + <pre>用例入参:{'name': '', 'code': 'py_code20221222_23:09:11_2'}
658 660 预期结果: {'msg': '院系名称未填写', 'code': 500, 'data': None}
659 661 实际结果: {'msg': 'size must be between 1 and 30', 'code': 500, 'data': None}
660 662 test_add_department_2 (test_02_system_management.Test01Department)执行——>【失败】
... ... @@ -720,7 +722,7 @@ test_add_department_2 (test_02_system_management.Test01Department)銵>
720 722 <td class="Test01Department">Test01Department</td>
721 723 <td>test_add_department_3</td>
722 724 <td>院系名称重复</td>
723   - <td>0.27s</td>
  725 + <td>0.282s</td>
724 726
725 727 <td class="text-success">成功</td>
726 728
... ... @@ -734,7 +736,7 @@ test_add_department_2 (test_02_system_management.Test01Department)銵>
734 736 <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all">
735 737
736 738
737   - <pre>用例入参:{'name': '院系1', 'code': 'py_code20221221_23:10:58_3'}
  739 + <pre>用例入参:{'name': '院系1', 'code': 'py_code20221222_23:09:11_3'}
738 740 预期结果: {'msg': '院系名称已存在,请确认', 'code': 500, 'data': None}
739 741 实际结果: {'msg': '院系名称已存在,请确认', 'code': 500, 'data': None}
740 742 test_add_department_3 (test_02_system_management.Test01Department)执行——>【通过】
... ... @@ -749,7 +751,7 @@ test_add_department_3 (test_02_system_management.Test01Department)銵>
749 751 <td class="Test01Department">Test01Department</td>
750 752 <td>test_add_department_4</td>
751 753 <td>院系名称长度不可大于30位</td>
752   - <td>0.201s</td>
  754 + <td>0.222s</td>
753 755
754 756 <td class="text-warning">失败</td>
755 757
... ... @@ -763,7 +765,7 @@ test_add_department_3 (test_02_system_management.Test01Department)銵>
763 765 <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all">
764 766
765 767
766   - <pre>用例入参:{'name': '院系名称长度大于30的测试院系名称长度大于30的测试院系名称长度大于30的测试院系名称长度大于30的测试', 'code': 'py_code20221221_23:10:58_4'}
  768 + <pre>用例入参:{'name': '院系名称长度大于30的测试院系名称长度大于30的测试院系名称长度大于30的测试院系名称长度大于30的测试', 'code': 'py_code20221222_23:09:11_4'}
767 769 预期结果: {'msg': '院系名称长度不可大于30', 'code': 500, 'data': None}
768 770 实际结果: {'msg': 'size must be between 1 and 30', 'code': 500, 'data': None}
769 771 test_add_department_4 (test_02_system_management.Test01Department)执行——>【失败】
... ... @@ -829,7 +831,7 @@ test_add_department_4 (test_02_system_management.Test01Department)銵>
829 831 <td class="Test01Department">Test01Department</td>
830 832 <td>test_add_department_5</td>
831 833 <td>院系代码不能为空</td>
832   - <td>0.241s</td>
  834 + <td>0.216s</td>
833 835
834 836 <td class="text-warning">失败</td>
835 837
... ... @@ -843,7 +845,7 @@ test_add_department_4 (test_02_system_management.Test01Department)銵>
843 845 <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all">
844 846
845 847
846   - <pre>用例入参:{'name': 'py自动化院系20221221_23:10:58_5', 'code': ''}
  848 + <pre>用例入参:{'name': 'py自动化院系20221222_23:09:12_5', 'code': ''}
847 849 预期结果: {'msg': '院系代码不能为空', 'code': 500, 'data': None}
848 850 实际结果: {'msg': 'size must be between 1 and 30', 'code': 500, 'data': None}
849 851 test_add_department_5 (test_02_system_management.Test01Department)执行——>【失败】
... ... @@ -909,7 +911,7 @@ test_add_department_5 (test_02_system_management.Test01Department)銵>
909 911 <td class="Test01Department">Test01Department</td>
910 912 <td>test_add_department_6</td>
911 913 <td>院系代码长度不可大于30</td>
912   - <td>0.266s</td>
  914 + <td>0.271s</td>
913 915
914 916 <td class="text-warning">失败</td>
915 917
... ... @@ -923,7 +925,7 @@ test_add_department_5 (test_02_system_management.Test01Department)銵>
923 925 <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all">
924 926
925 927
926   - <pre>用例入参:{'name': 'py自动化院系20221221_23:10:58_6', 'code': '院系代码长度大于30的测试院系代码长度大于30的测试院系代码长度大于30的测试'}
  928 + <pre>用例入参:{'name': 'py自动化院系20221222_23:09:12_6', 'code': '院系代码长度大于30的测试院系代码长度大于30的测试院系代码长度大于30的测试'}
927 929 预期结果: {'msg': '院系代码不可大于30', 'code': 500, 'data': None}
928 930 实际结果: {'msg': 'size must be between 1 and 30', 'code': 500, 'data': None}
929 931 test_add_department_6 (test_02_system_management.Test01Department)执行——>【失败】
... ... @@ -989,7 +991,7 @@ test_add_department_6 (test_02_system_management.Test01Department)銵>
989 991 <td class="Test01Department">Test01Department</td>
990 992 <td>test_add_department_7</td>
991 993 <td>新增院系成功</td>
992   - <td>0.295s</td>
  994 + <td>0.301s</td>
993 995
994 996 <td class="text-success">成功</td>
995 997
... ... @@ -1003,7 +1005,7 @@ test_add_department_6 (test_02_system_management.Test01Department)銵>
1003 1005 <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all">
1004 1006
1005 1007
1006   - <pre>用例入参:{'name': 'py自动化院系20221221_23:10:58_7', 'code': 'py_code20221221_23:10:58_7'}
  1008 + <pre>用例入参:{'name': 'py自动化院系20221222_23:09:12_7', 'code': 'py_code20221222_23:09:12_7'}
1007 1009 预期结果: {'msg': 'success', 'code': 200, 'data': True}
1008 1010 实际结果: {'msg': 'success', 'code': 200, 'data': True}
1009 1011 test_add_department_7 (test_02_system_management.Test01Department)执行——>【通过】
... ... @@ -1018,7 +1020,7 @@ test_add_department_7 (test_02_system_management.Test01Department)銵>
1018 1020 <td class="Test01Department">Test01Department</td>
1019 1021 <td>test_select_department_1</td>
1020 1022 <td>查看院系列表</td>
1021   - <td>0.348s</td>
  1023 + <td>0.337s</td>
1022 1024
1023 1025 <td class="text-success">成功</td>
1024 1026
... ... @@ -1034,7 +1036,7 @@ test_add_department_7 (test_02_system_management.Test01Department)銵>
1034 1036
1035 1037 <pre>用例入参:{'pageNumber': '0', 'pageSize': '3'}
1036 1038 预期结果: {'msg': 'success', 'code': 200}
1037   -实际结果: {'msg': 'success', 'code': 200, 'data': {'records': [{'id': '1605581603290345473', 'schoolId': '1519958566130257922', 'name': 'py自动化院系20221221_23:10:58_7', 'code': 'py_code20221221_23:10:58_7', 'createdBy': '1519959209276452865', 'createdTime': 1671635459000, 'updatedBy': None, 'updatedTime': None}, {'id': '1605581596885643265', 'schoolId': '1519958566130257922', 'name': 'py自动化院系20221221_23:10:57_1', 'code': 'py_code20221221_23:10:57_1', 'createdBy': '1519959209276452865', 'createdTime': 1671635458000, 'updatedBy': None, 'updatedTime': None}, {'id': '1605579433342005250', 'schoolId': '1519958566130257922', 'name': 'py自动化院系20221221_23:02:21_7', 'code': 'py_code20221221_23:02:21_7', 'createdBy': '1519959209276452865', 'createdTime': 1671634942000, 'updatedBy': None, 'updatedTime': None}, {'id': '1605579427339956226', 'schoolId': '1519958566130257922', 'name': 'py自动化院系20221221_23:02:20_1', 'code': 'py_code20221221_23:02:20_1', 'createdBy': '1519959209276452865', 'createdTime': 1671634940000, 'updatedBy': None, 'updatedTime': None}, {'id': '1605578250598608898', 'schoolId': '1519958566130257922', 'name': 'py自动化院系20221221_22:57:39_7', 'code': 'py_code20221221_22:57:39_7', 'createdBy': '1519959209276452865', 'createdTime': 1671634660000, 'updatedBy': None, 'updatedTime': None}, {'id': '1605578245234094081', 'schoolId': '1519958566130257922', 'name': 'py自动化院系20221221_22:57:38_1', 'code': 'py_code20221221_22:57:38_1', 'createdBy': '1519959209276452865', 'createdTime': 1671634659000, 'updatedBy': None, 'updatedTime': None}, {'id': '1605577836889239554', 'schoolId': '1519958566130257922', 'name': 'py自动化院系20221221_22:56:01_7', 'code': 'py_code20221221_22:56:01_7', 'createdBy': '1519959209276452865', 'createdTime': 1671634561000, 'updatedBy': None, 'updatedTime': None}, {'id': '1605577831612805121', 'schoolId': '1519958566130257922', 'name': 'py自动化院系20221221_22:55:59_1', 'code': 'py_code20221221_22:55:59_1', 'createdBy': '1519959209276452865', 'createdTime': 1671634560000, 'updatedBy': None, 'updatedTime': None}, {'id': '1605576985835597825', 'schoolId': '1519958566130257922', 'name': 'py自动化院系20221221_22:52:38_7', 'code': 'py_code20221221_22:52:38_7', 'createdBy': '1519959209276452865', 'createdTime': 1671634358000, 'updatedBy': None, 'updatedTime': None}, {'id': '1605576980399779842', 'schoolId': '1519958566130257922', 'name': 'py自动化院系20221221_22:52:36_1', 'code': 'py_code20221221_22:52:36_1', 'createdBy': '1519959209276452865', 'createdTime': 1671634357000, 'updatedBy': None, 'updatedTime': None}, {'id': '1605573916599119873', 'schoolId': '1519958566130257922', 'name': 'py自动化院系20221221_22:40:26_7', 'code': 'py_code20221221_22:40:26_7', 'createdBy': '1519959209276452865', 'createdTime': 1671633626000, 'updatedBy': None, 'updatedTime': None}, {'id': '1605573911159107585', 'schoolId': '1519958566130257922', 'name': 'py自动化院系20221221_22:40:25_1', 'code': 'py_code20221221_22:40:25_1', 'createdBy': '1519959209276452865', 'createdTime': 1671633625000, 'updatedBy': None, 'updatedTime': None}, {'id': '1605553566536560642', 'schoolId': '1519958566130257922', 'name': 'py自动化院系20221221_21:19:34_7', 'code': 'py_code20221221_21:19:34_7', 'createdBy': '1519959209276452865', 'createdTime': 1671628775000, 'updatedBy': None, 'updatedTime': None}, {'id': '1605553558311530498', 'schoolId': '1519958566130257922', 'name': 'py自动化院系20221221_21:19:32_1', 'code': 'py_code20221221_21:19:32_1', 'createdBy': '1519959209276452865', 'createdTime': 1671628773000, 'updatedBy': None, 'updatedTime': None}, {'id': '1605552693366353921', 'schoolId': '1519958566130257922', 'name': 'py自动化院系20221221_21:16:06_7', 'code': 'py_code20221221_21:16:06_7', 'createdBy': '1519959209276452865', 'createdTime': 1671628566000, 'updatedBy': None, 'updatedTime': None}], 'total': 376, 'size': 15, 'current': 1, 'orders': [], 'optimizeCountSql': True, 'searchCount': True, 'countId': '', 'maxLimit': None, 'pages': 26}}
  1039 +实际结果: {'msg': 'success', 'code': 200, 'data': {'records': [{'id': '1605943544424820738', 'schoolId': '1519958566130257922', 'name': 'py自动化院系20221222_23:09:12_7', 'code': 'py_code20221222_23:09:12_7', 'createdBy': '1519959209276452865', 'createdTime': 1671721753000, 'updatedBy': None, 'updatedTime': None}, {'id': '1605943538108198913', 'schoolId': '1519958566130257922', 'name': 'py自动化院系20221222_23:09:11_1', 'code': 'py_code20221222_23:09:11_1', 'createdBy': '1519959209276452865', 'createdTime': 1671721751000, 'updatedBy': None, 'updatedTime': None}, {'id': '1605942164523970561', 'schoolId': '1519958566130257922', 'name': 'py自动化院系20221222_23:03:43_7', 'code': 'py_code20221222_23:03:43_7', 'createdBy': '1519959209276452865', 'createdTime': 1671721424000, 'updatedBy': None, 'updatedTime': None}, {'id': '1605942157955690498', 'schoolId': '1519958566130257922', 'name': 'py自动化院系20221222_23:03:41_1', 'code': 'py_code20221222_23:03:41_1', 'createdBy': '1519959209276452865', 'createdTime': 1671721422000, 'updatedBy': None, 'updatedTime': None}, {'id': '1605840585850482690', 'schoolId': '1519958566130257922', 'name': 'py自动化院系20221222_16:20:05_7', 'code': 'py_code20221222_16:20:05_7', 'createdBy': '1519959209276452865', 'createdTime': 1671697205000, 'updatedBy': None, 'updatedTime': None}, {'id': '1605840579781324801', 'schoolId': '1519958566130257922', 'name': 'py自动化院系20221222_16:20:03_1', 'code': 'py_code20221222_16:20:03_1', 'createdBy': '1519959209276452865', 'createdTime': 1671697204000, 'updatedBy': None, 'updatedTime': None}, {'id': '1605839199377158145', 'schoolId': '1519958566130257922', 'name': 'py自动化院系20221222_16:14:34_7', 'code': 'py_code20221222_16:14:34_7', 'createdBy': '1519959209276452865', 'createdTime': 1671696875000, 'updatedBy': None, 'updatedTime': None}, {'id': '1605839193396080641', 'schoolId': '1519958566130257922', 'name': 'py自动化院系20221222_16:14:33_1', 'code': 'py_code20221222_16:14:33_1', 'createdBy': '1519959209276452865', 'createdTime': 1671696873000, 'updatedBy': None, 'updatedTime': None}, {'id': '1605602173553864706', 'schoolId': '1519958566130257922', 'name': 'py自动化院系20221222_00:32:43_7', 'code': 'py_code20221222_00:32:43_7', 'createdBy': '1519959209276452865', 'createdTime': 1671640363000, 'updatedBy': None, 'updatedTime': None}, {'id': '1605602164590637057', 'schoolId': '1519958566130257922', 'name': 'py自动化院系20221222_00:32:41_1', 'code': 'py_code20221222_00:32:41_1', 'createdBy': '1519959209276452865', 'createdTime': 1671640361000, 'updatedBy': None, 'updatedTime': None}, {'id': '1605600586030772226', 'schoolId': '1519958566130257922', 'name': 'py自动化院系20221222_00:26:24_7', 'code': 'py_code20221222_00:26:24_7', 'createdBy': '1519959209276452865', 'createdTime': 1671639985000, 'updatedBy': None, 'updatedTime': None}, {'id': '1605600579462492161', 'schoolId': '1519958566130257922', 'name': 'py自动化院系20221222_00:26:23_1', 'code': 'py_code20221222_00:26:23_1', 'createdBy': '1519959209276452865', 'createdTime': 1671639983000, 'updatedBy': None, 'updatedTime': None}, {'id': '1605595424071479298', 'schoolId': '1519958566130257922', 'name': 'py自动化院系20221222_00:05:54_7', 'code': 'py_code20221222_00:05:54_7', 'createdBy': '1519959209276452865', 'createdTime': 1671638754000, 'updatedBy': None, 'updatedTime': None}, {'id': '1605595417662582785', 'schoolId': '1519958566130257922', 'name': 'py自动化院系20221222_00:05:52_1', 'code': 'py_code20221222_00:05:52_1', 'createdBy': '1519959209276452865', 'createdTime': 1671638753000, 'updatedBy': None, 'updatedTime': None}, {'id': '1605594240384364546', 'schoolId': '1519958566130257922', 'name': 'py自动化院系20221222_00:01:11_7', 'code': 'py_code20221222_00:01:11_7', 'createdBy': '1519959209276452865', 'createdTime': 1671638472000, 'updatedBy': None, 'updatedTime': None}], 'total': 392, 'size': 15, 'current': 1, 'orders': [], 'optimizeCountSql': True, 'searchCount': True, 'countId': '', 'maxLimit': None, 'pages': 27}}
1038 1040 test_select_department_1 (test_02_system_management.Test01Department)执行——>【通过】
1039 1041 </pre>
1040 1042
... ... @@ -1047,7 +1049,7 @@ test_select_department_1 (test_02_system_management.Test01Department)銵
1047 1049 <td class="Test02Specialty">Test02Specialty</td>
1048 1050 <td>test_add_specialty_01</td>
1049 1051 <td>新增专业成功</td>
1050   - <td>0.884s</td>
  1052 + <td>0.971s</td>
1051 1053
1052 1054 <td class="text-success">成功</td>
1053 1055
... ... @@ -1061,7 +1063,7 @@ test_select_department_1 (test_02_system_management.Test01Department)銵
1061 1063 <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all">
1062 1064
1063 1065
1064   - <pre>用例入参:{'name': 'py专业23:11:00_1', 'code': 'py_code23:11:00_1', 'departmentId': '1605581603290345473', 'category': 'science'}
  1066 + <pre>用例入参:{'name': 'py专业23:09:13_1', 'code': 'py_code23:09:13_1', 'departmentId': '1605943544424820738', 'category': 'science'}
1065 1067 预期结果: {'msg': 'success', 'code': 200, 'data': True}
1066 1068 实际结果: {'msg': 'success', 'code': 200, 'data': True}
1067 1069 test_add_specialty_01 (test_02_system_management.Test02Specialty)执行——>【通过】
... ... @@ -1076,7 +1078,7 @@ test_add_specialty_01 (test_02_system_management.Test02Specialty)銵>
1076 1078 <td class="Test02Specialty">Test02Specialty</td>
1077 1079 <td>test_add_specialty_02</td>
1078 1080 <td>新增专业失败,院系未填写</td>
1079   - <td>0.813s</td>
  1081 + <td>0.867s</td>
1080 1082
1081 1083 <td class="text-success">成功</td>
1082 1084
... ... @@ -1090,7 +1092,7 @@ test_add_specialty_01 (test_02_system_management.Test02Specialty)銵>
1090 1092 <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all">
1091 1093
1092 1094
1093   - <pre>用例入参:{'name': 'py专业23:11:00_2', 'code': 'py_code23:11:00_2', 'departmentId': '', 'category': 'science'}
  1095 + <pre>用例入参:{'name': 'py专业23:09:14_2', 'code': 'py_code23:09:14_2', 'departmentId': '', 'category': 'science'}
1094 1096 预期结果: {'msg': '院系不能为空', 'code': 500, 'data': None}
1095 1097 实际结果: {'msg': '院系不能为空', 'code': 500, 'data': None}
1096 1098 test_add_specialty_02 (test_02_system_management.Test02Specialty)执行——>【通过】
... ... @@ -1105,7 +1107,7 @@ test_add_specialty_02 (test_02_system_management.Test02Specialty)銵>
1105 1107 <td class="Test02Specialty">Test02Specialty</td>
1106 1108 <td>test_add_specialty_03</td>
1107 1109 <td>新增专业失败,院系不存在</td>
1108   - <td>0.858s</td>
  1110 + <td>0.938s</td>
1109 1111
1110 1112 <td class="text-warning">失败</td>
1111 1113
... ... @@ -1119,7 +1121,7 @@ test_add_specialty_02 (test_02_system_management.Test02Specialty)銵>
1119 1121 <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all">
1120 1122
1121 1123
1122   - <pre>用例入参:{'name': 'py专业23:11:01_3', 'code': 'py_code23:11:01_3', 'departmentId': '1605581603290345473', 'category': 'science'}
  1124 + <pre>用例入参:{'name': 'py专业23:09:15_3', 'code': 'py_code23:09:15_3', 'departmentId': '1605943544424820738', 'category': 'science'}
1123 1125 预期结果: {'msg': '院系不存在', 'code': 500, 'data': None}
1124 1126 实际结果: {'msg': 'success', 'code': 200, 'data': True}
1125 1127 test_add_specialty_03 (test_02_system_management.Test02Specialty)执行——>【失败】
... ... @@ -1145,12 +1147,12 @@ test_add_specialty_03 (test_02_system_management.Test02Specialty)銵>
1145 1147 </pre>
1146 1148
1147 1149
1148   - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 203, in test_add_specialty
  1150 + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 207, in test_add_specialty
1149 1151 raise e
1150 1152 </pre>
1151 1153
1152 1154
1153   - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 197, in test_add_specialty
  1155 + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 201, in test_add_specialty
1154 1156 self.assertEqual(expected["msg"], res["msg"])
1155 1157 </pre>
1156 1158
... ... @@ -1185,7 +1187,7 @@ test_add_specialty_03 (test_02_system_management.Test02Specialty)銵>
1185 1187 <td class="Test02Specialty">Test02Specialty</td>
1186 1188 <td>test_add_specialty_04</td>
1187 1189 <td>新增专业失败,专业名称未填写</td>
1188   - <td>0.804s</td>
  1190 + <td>0.867s</td>
1189 1191
1190 1192 <td class="text-warning">失败</td>
1191 1193
... ... @@ -1199,7 +1201,7 @@ test_add_specialty_03 (test_02_system_management.Test02Specialty)銵>
1199 1201 <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all">
1200 1202
1201 1203
1202   - <pre>用例入参:{'name': '', 'code': 'py_code23:11:02_4', 'departmentId': '1605581603290345473', 'category': 'science'}
  1204 + <pre>用例入参:{'name': '', 'code': 'py_code23:09:16_4', 'departmentId': '1605943544424820738', 'category': 'science'}
1203 1205 预期结果: {'msg': '专业名称未填写', 'code': 500, 'data': None}
1204 1206 实际结果: {'msg': 'size must be between 1 and 30', 'code': 500, 'data': None}
1205 1207 test_add_specialty_04 (test_02_system_management.Test02Specialty)执行——>【失败】
... ... @@ -1225,12 +1227,12 @@ test_add_specialty_04 (test_02_system_management.Test02Specialty)銵>
1225 1227 </pre>
1226 1228
1227 1229
1228   - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 203, in test_add_specialty
  1230 + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 207, in test_add_specialty
1229 1231 raise e
1230 1232 </pre>
1231 1233
1232 1234
1233   - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 197, in test_add_specialty
  1235 + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 201, in test_add_specialty
1234 1236 self.assertEqual(expected["msg"], res["msg"])
1235 1237 </pre>
1236 1238
... ... @@ -1265,7 +1267,7 @@ test_add_specialty_04 (test_02_system_management.Test02Specialty)銵>
1265 1267 <td class="Test02Specialty">Test02Specialty</td>
1266 1268 <td>test_add_specialty_05</td>
1267 1269 <td>新增专业失败,专业名称长度不能大于30</td>
1268   - <td>0.948s</td>
  1270 + <td>0.871s</td>
1269 1271
1270 1272 <td class="text-warning">失败</td>
1271 1273
... ... @@ -1279,7 +1281,7 @@ test_add_specialty_04 (test_02_system_management.Test02Specialty)銵>
1279 1281 <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all">
1280 1282
1281 1283
1282   - <pre>用例入参:{'name': '专业大于301234567890专业大于301234567890', 'code': 'py_code23:11:03_5', 'departmentId': '1605581603290345473', 'category': 'science'}
  1284 + <pre>用例入参:{'name': '专业大于301234567890专业大于301234567890', 'code': 'py_code23:09:17_5', 'departmentId': '1605943544424820738', 'category': 'science'}
1283 1285 预期结果: {'msg': '专业名称不能大于30', 'code': 500, 'data': None}
1284 1286 实际结果: {'msg': 'size must be between 1 and 30', 'code': 500, 'data': None}
1285 1287 test_add_specialty_05 (test_02_system_management.Test02Specialty)执行——>【失败】
... ... @@ -1305,12 +1307,12 @@ test_add_specialty_05 (test_02_system_management.Test02Specialty)銵>
1305 1307 </pre>
1306 1308
1307 1309
1308   - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 203, in test_add_specialty
  1310 + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 207, in test_add_specialty
1309 1311 raise e
1310 1312 </pre>
1311 1313
1312 1314
1313   - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 197, in test_add_specialty
  1315 + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 201, in test_add_specialty
1314 1316 self.assertEqual(expected["msg"], res["msg"])
1315 1317 </pre>
1316 1318
... ... @@ -1345,7 +1347,7 @@ test_add_specialty_05 (test_02_system_management.Test02Specialty)銵>
1345 1347 <td class="Test02Specialty">Test02Specialty</td>
1346 1348 <td>test_add_specialty_06</td>
1347 1349 <td>新增专业失败,专业名称重复</td>
1348   - <td>1.01s</td>
  1350 + <td>1.02s</td>
1349 1351
1350 1352 <td class="text-success">成功</td>
1351 1353
... ... @@ -1359,7 +1361,7 @@ test_add_specialty_05 (test_02_system_management.Test02Specialty)銵>
1359 1361 <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all">
1360 1362
1361 1363
1362   - <pre>用例入参:{'name': '第二个专业-2-1', 'code': 'py_code23:11:04_6', 'departmentId': '1605581603290345473', 'category': 'science'}
  1364 + <pre>用例入参:{'name': '第二个专业-2-1', 'code': 'py_code23:09:18_6', 'departmentId': '1605943544424820738', 'category': 'science'}
1363 1365 预期结果: {'msg': '专业名称已存在,请确认', 'code': 500, 'data': None}
1364 1366 实际结果: {'msg': '专业名称已存在,请确认', 'code': 500, 'data': None}
1365 1367 test_add_specialty_06 (test_02_system_management.Test02Specialty)执行——>【通过】
... ... @@ -1374,7 +1376,7 @@ test_add_specialty_06 (test_02_system_management.Test02Specialty)銵>
1374 1376 <td class="Test02Specialty">Test02Specialty</td>
1375 1377 <td>test_add_specialty_07</td>
1376 1378 <td>新增专业失败,专业代码未填写</td>
1377   - <td>0.936s</td>
  1379 + <td>0.891s</td>
1378 1380
1379 1381 <td class="text-warning">失败</td>
1380 1382
... ... @@ -1388,7 +1390,7 @@ test_add_specialty_06 (test_02_system_management.Test02Specialty)銵>
1388 1390 <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all">
1389 1391
1390 1392
1391   - <pre>用例入参:{'name': 'py专业23:11:05_7', 'code': '', 'departmentId': '1605581603290345473', 'category': 'science'}
  1393 + <pre>用例入参:{'name': 'py专业23:09:19_7', 'code': '', 'departmentId': '1605943544424820738', 'category': 'science'}
1392 1394 预期结果: {'msg': '专业代码不能为空', 'code': 500, 'data': None}
1393 1395 实际结果: {'msg': 'size must be between 1 and 30', 'code': 500, 'data': None}
1394 1396 test_add_specialty_07 (test_02_system_management.Test02Specialty)执行——>【失败】
... ... @@ -1414,12 +1416,12 @@ test_add_specialty_07 (test_02_system_management.Test02Specialty)銵>
1414 1416 </pre>
1415 1417
1416 1418
1417   - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 203, in test_add_specialty
  1419 + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 207, in test_add_specialty
1418 1420 raise e
1419 1421 </pre>
1420 1422
1421 1423
1422   - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 197, in test_add_specialty
  1424 + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 201, in test_add_specialty
1423 1425 self.assertEqual(expected["msg"], res["msg"])
1424 1426 </pre>
1425 1427
... ... @@ -1454,7 +1456,7 @@ test_add_specialty_07 (test_02_system_management.Test02Specialty)銵>
1454 1456 <td class="Test02Specialty">Test02Specialty</td>
1455 1457 <td>test_add_specialty_08</td>
1456 1458 <td>新增专业失败,专业代码长度不能大于30</td>
1457   - <td>0.887s</td>
  1459 + <td>0.933s</td>
1458 1460
1459 1461 <td class="text-warning">失败</td>
1460 1462
... ... @@ -1468,7 +1470,7 @@ test_add_specialty_07 (test_02_system_management.Test02Specialty)銵>
1468 1470 <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all">
1469 1471
1470 1472
1471   - <pre>用例入参:{'name': 'py专业23:11:06_8', 'code': '专业代码大于301234567890专业大于301234567890', 'departmentId': '1605581603290345473', 'category': 'science'}
  1473 + <pre>用例入参:{'name': 'py专业23:09:20_8', 'code': '专业代码大于301234567890专业大于301234567890', 'departmentId': '1605943544424820738', 'category': 'science'}
1472 1474 预期结果: {'msg': '专业代码不能大于30', 'code': 500, 'data': None}
1473 1475 实际结果: {'msg': 'size must be between 1 and 30', 'code': 500, 'data': None}
1474 1476 test_add_specialty_08 (test_02_system_management.Test02Specialty)执行——>【失败】
... ... @@ -1494,12 +1496,12 @@ test_add_specialty_08 (test_02_system_management.Test02Specialty)銵>
1494 1496 </pre>
1495 1497
1496 1498
1497   - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 203, in test_add_specialty
  1499 + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 207, in test_add_specialty
1498 1500 raise e
1499 1501 </pre>
1500 1502
1501 1503
1502   - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 197, in test_add_specialty
  1504 + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 201, in test_add_specialty
1503 1505 self.assertEqual(expected["msg"], res["msg"])
1504 1506 </pre>
1505 1507
... ... @@ -1534,7 +1536,7 @@ test_add_specialty_08 (test_02_system_management.Test02Specialty)銵>
1534 1536 <td class="Test02Specialty">Test02Specialty</td>
1535 1537 <td>test_add_specialty_09</td>
1536 1538 <td>新增专业失败,学科门类未填写</td>
1537   - <td>0.873s</td>
  1539 + <td>0.903s</td>
1538 1540
1539 1541 <td class="text-warning">失败</td>
1540 1542
... ... @@ -1548,9 +1550,9 @@ test_add_specialty_08 (test_02_system_management.Test02Specialty)銵>
1548 1550 <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all">
1549 1551
1550 1552
1551   - <pre>用例入参:{'name': 'py专业23:11:07_9', 'code': 'py_code23:11:07_9', 'departmentId': '1605581603290345473', 'category': ''}
  1553 + <pre>用例入参:{'name': 'py专业23:09:20_9', 'code': 'py_code23:09:20_9', 'departmentId': '1605943544424820738', 'category': ''}
1552 1554 预期结果: {'msg': '学科门类不能为空', 'code': 500, 'data': None}
1553   -实际结果: {'msg': 'success', 'code': 200, 'data': True}
  1555 +实际结果: {'msg': '学科门类不存在', 'code': 500, 'data': None}
1554 1556 test_add_specialty_09 (test_02_system_management.Test02Specialty)执行——>【失败】
1555 1557 </pre>
1556 1558
... ... @@ -1574,12 +1576,12 @@ test_add_specialty_09 (test_02_system_management.Test02Specialty)銵>
1574 1576 </pre>
1575 1577
1576 1578
1577   - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 203, in test_add_specialty
  1579 + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 207, in test_add_specialty
1578 1580 raise e
1579 1581 </pre>
1580 1582
1581 1583
1582   - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 197, in test_add_specialty
  1584 + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 201, in test_add_specialty
1583 1585 self.assertEqual(expected["msg"], res["msg"])
1584 1586 </pre>
1585 1587
... ... @@ -1599,9 +1601,9 @@ test_add_specialty_09 (test_02_system_management.Test02Specialty)銵>
1599 1601 </pre>
1600 1602
1601 1603
1602   - <pre>AssertionError: '学科门类不能为空' != 'success'
  1604 + <pre>AssertionError: '学科门类不能为空' != '学科门类不存在'
1603 1605 - 学科门类不能为空
1604   -+ success
  1606 ++ 学科门类不存在
1605 1607
1606 1608 </pre>
1607 1609
... ... @@ -1614,9 +1616,9 @@ test_add_specialty_09 (test_02_system_management.Test02Specialty)銵>
1614 1616 <td class="Test02Specialty">Test02Specialty</td>
1615 1617 <td>test_add_specialty_10</td>
1616 1618 <td>新增专业失败,学科门类填写错误</td>
1617   - <td>0.88s</td>
  1619 + <td>0.928s</td>
1618 1620
1619   - <td class="text-warning">失败</td>
  1621 + <td class="text-success">成功</td>
1620 1622
1621 1623 <td>
1622 1624 <button type="button" class="btn btn-success btn_info">查看详情</button>
... ... @@ -1628,10 +1630,68 @@ test_add_specialty_09 (test_02_system_management.Test02Specialty)銵>
1628 1630 <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all">
1629 1631
1630 1632
1631   - <pre>用例入参:{'name': 'py专业23:11:08_10', 'code': 'py_code23:11:08_10', 'departmentId': '1605581603290345473', 'category': 'scienwce'}
  1633 + <pre>用例入参:{'name': 'py专业23:09:21_10', 'code': 'py_code23:09:21_10', 'departmentId': '1605943544424820738', 'category': 'scienwce'}
1632 1634 预期结果: {'msg': '学科门类不存在', 'code': 500, 'data': None}
  1635 +实际结果: {'msg': '学科门类不存在', 'code': 500, 'data': None}
  1636 +test_add_specialty_10 (test_02_system_management.Test02Specialty)执行——>【通过】
  1637 +</pre>
  1638 +
  1639 +
  1640 + </td>
  1641 + </tr>
  1642 +
  1643 + <tr>
  1644 + <td>24</td>
  1645 + <td class="Test03Year">Test03Year</td>
  1646 + <td>test_add_year_1</td>
  1647 + <td>新增学年学期成功</td>
  1648 + <td>0.288s</td>
  1649 +
  1650 + <td class="text-success">成功</td>
  1651 +
  1652 + <td>
  1653 + <button type="button" class="btn btn-success btn_info">查看详情</button>
  1654 + </td>
  1655 + </tr>
  1656 +
  1657 + <tr class="test_log">
  1658 +
  1659 + <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all">
  1660 +
  1661 +
  1662 + <pre>用例入参:{'year': 'py学年23:09:23_1', 'remark': 'py_comment备注23:09:23_1', 'terms': [{'sort': 1, 'startTime': 1667376499000, 'endTime': 1704115459000}]}
  1663 +预期结果: {'msg': 'success', 'code': 200, 'data': True}
  1664 +实际结果: {'msg': 'success', 'code': 200, 'data': True}
  1665 +test_add_year_1 (test_02_system_management.Test03Year)执行——>【通过】
  1666 +</pre>
  1667 +
  1668 +
  1669 + </td>
  1670 + </tr>
  1671 +
  1672 + <tr>
  1673 + <td>25</td>
  1674 + <td class="Test03Year">Test03Year</td>
  1675 + <td>test_add_year_2</td>
  1676 + <td>学年学期开始时间和结束时间不可交叉</td>
  1677 + <td>0.231s</td>
  1678 +
  1679 + <td class="text-warning">失败</td>
  1680 +
  1681 + <td>
  1682 + <button type="button" class="btn btn-success btn_info">查看详情</button>
  1683 + </td>
  1684 + </tr>
  1685 +
  1686 + <tr class="test_log">
  1687 +
  1688 + <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all">
  1689 +
  1690 +
  1691 + <pre>用例入参:{'year': 'py学年23:09:23_2', 'remark': 'py_comment备注23:09:23_2', 'terms': [{'sort': 1, 'startTime': 1667376499000, 'endTime': 1704115459000}, {'sort': 2, 'startTime': 1667376499000, 'endTime': 1704115459000}]}
  1692 +预期结果: {'msg': '学期起止时间不能交叉', 'code': 500, 'data': None}
1633 1693 实际结果: {'msg': 'success', 'code': 200, 'data': True}
1634   -test_add_specialty_10 (test_02_system_management.Test02Specialty)执行——>【失败】
  1694 +test_add_year_2 (test_02_system_management.Test03Year)执行——>【失败】
1635 1695 </pre>
1636 1696
1637 1697
... ... @@ -1654,12 +1714,12 @@ test_add_specialty_10 (test_02_system_management.Test02Specialty)銵>
1654 1714 </pre>
1655 1715
1656 1716
1657   - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 203, in test_add_specialty
  1717 + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 272, in test_add_year
1658 1718 raise e
1659 1719 </pre>
1660 1720
1661 1721
1662   - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 197, in test_add_specialty
  1722 + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 266, in test_add_year
1663 1723 self.assertEqual(expected["msg"], res["msg"])
1664 1724 </pre>
1665 1725
... ... @@ -1679,8 +1739,8 @@ test_add_specialty_10 (test_02_system_management.Test02Specialty)銵>
1679 1739 </pre>
1680 1740
1681 1741
1682   - <pre>AssertionError: '学科门类不存在' != 'success'
1683   -- 学科门类不存在
  1742 + <pre>AssertionError: '学期起止时间不能交叉' != 'success'
  1743 +- 学期起止时间不能交叉
1684 1744 + success
1685 1745
1686 1746 </pre>
... ... @@ -1690,40 +1750,11 @@ test_add_specialty_10 (test_02_system_management.Test02Specialty)銵>
1690 1750 </tr>
1691 1751
1692 1752 <tr>
1693   - <td>24</td>
1694   - <td class="Test03Year">Test03Year</td>
1695   - <td>test_add_year_1</td>
1696   - <td>新增学年学期成功</td>
1697   - <td>0.235s</td>
1698   -
1699   - <td class="text-success">成功</td>
1700   -
1701   - <td>
1702   - <button type="button" class="btn btn-success btn_info">查看详情</button>
1703   - </td>
1704   - </tr>
1705   -
1706   - <tr class="test_log">
1707   -
1708   - <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all">
1709   -
1710   -
1711   - <pre>用例入参:{'year': 'py学年23:11:09_1', 'remark': 'py_comment备注23:11:09_1', 'terms': [{'sort': 1, 'startTime': 1667376499000, 'endTime': 1704115459000}]}
1712   -预期结果: {'msg': 'success', 'code': 200, 'data': True}
1713   -实际结果: {'msg': 'success', 'code': 200, 'data': True}
1714   -test_add_year_1 (test_02_system_management.Test03Year)执行——>【通过】
1715   -</pre>
1716   -
1717   -
1718   - </td>
1719   - </tr>
1720   -
1721   - <tr>
1722   - <td>25</td>
1723   - <td class="Test03Year">Test03Year</td>
1724   - <td>test_add_year_2</td>
1725   - <td>学年学期开始时间和结束时间不可交叉</td>
1726   - <td>0.233s</td>
  1753 + <td>26</td>
  1754 + <td class="Test01CTeacher">Test01CTeacher</td>
  1755 + <td>test_add_class_info_1</td>
  1756 + <td>新增教师</td>
  1757 + <td>0.239s</td>
1727 1758
1728 1759 <td class="text-warning">失败</td>
1729 1760
... ... @@ -1737,10 +1768,10 @@ test_add_year_1 (test_02_system_management.Test03Year)銵>
1737 1768 <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all">
1738 1769
1739 1770
1740   - <pre>用例入参:{'year': 'py学年23:11:09_2', 'remark': 'py_comment备注23:11:09_2', 'terms': [{'sort': 1, 'startTime': 1667376499000, 'endTime': 1704115459000}, {'sort': 2, 'startTime': 1667376499000, 'endTime': 1704115459000}]}
1741   -预期结果: {'msg': '学期起止时间不能交叉', 'code': 500, 'data': None}
1742   -实际结果: {'msg': 'success', 'code': 200, 'data': True}
1743   -test_add_year_2 (test_02_system_management.Test03Year)执行——>【失败】
  1771 + <pre>用例入参:{'name': 'py自动化教师20221222_23:09:24_1', 'number': '17398240152', 'departmentIds': ['1605942164523970561'], 'phone': '17398240152', 'classInfoId': '', 'idType': 'identity_card', 'idNumber': '660101198601061863', 'gender': 0, 'entryTime': 1663084800000, 'email': '34662811782@163.com', 'professionalIds': [], 'roleIds': ['968160378070540291'], 'permissionScope': '1605942164523970561'}
  1772 +预期结果: {'msg': 'success', 'code': 200, 'data': True}
  1773 +实际结果: {'msg': '该身份证号不合法,请确认', 'code': 500, 'data': None}
  1774 +test_add_class_info_1 (test_03_teaching_affairs.Test01CTeacher)执行——>【失败】
1744 1775 </pre>
1745 1776
1746 1777
... ... @@ -1763,13 +1794,13 @@ test_add_year_2 (test_02_system_management.Test03Year)銵>仃韐乓
1763 1794 </pre>
1764 1795
1765 1796
1766   - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 265, in test_add_year
  1797 + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_03_teaching_affairs.py", line 106, in test_add_class_info
1767 1798 raise e
1768 1799 </pre>
1769 1800
1770 1801
1771   - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 259, in test_add_year
1772   - self.assertEqual(expected["msg"], res["msg"])
  1802 + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_03_teaching_affairs.py", line 99, in test_add_class_info
  1803 + self.assertEqual(expected['msg'], res['msg'])
1773 1804 </pre>
1774 1805
1775 1806
... ... @@ -1788,9 +1819,9 @@ test_add_year_2 (test_02_system_management.Test03Year)銵>仃韐乓
1788 1819 </pre>
1789 1820
1790 1821
1791   - <pre>AssertionError: '学期起止时间不能交叉' != 'success'
1792   -- 学期起止时间不能交叉
1793   -+ success
  1822 + <pre>AssertionError: 'success' != '该身份证号不合法,请确认'
  1823 +- success
  1824 ++ 该身份证号不合法,请确认
1794 1825
1795 1826 </pre>
1796 1827
... ... @@ -1923,7 +1954,7 @@ test_add_year_2 (test_02_system_management.Test03Year)銵>仃韐乓
1923 1954 show: false
1924 1955 },
1925 1956 data: [
1926   - {value: 9, name: '通过'},
  1957 + {value: 10, name: '通过'},
1927 1958 {value: 16, name: '失败'},
1928 1959 {value: 0, name: '错误'},
1929 1960 {value: 0, name: '跳过'}
... ... @@ -1945,8 +1976,8 @@ test_add_year_2 (test_02_system_management.Test03Year)銵>仃韐乓
1945 1976 {
1946 1977 name: '测试结果',
1947 1978 type: 'gauge',
1948   - detail: {formatter: '36.00%'},
1949   - data: [{value: '36.00', name: '用例通过率'}],
  1979 + detail: {formatter: '38.46%'},
  1980 + data: [{value: '38.46', name: '用例通过率'}],
1950 1981 axisLine: {
1951 1982 lineStyle: {
1952 1983 color: [
... ...
... ... @@ -36,9 +36,9 @@ runner.run()
36 36 # QQ邮箱SMTP服务器地址为“smtp.qq.com”
37 37 # 163邮箱smtp.163.com 465
38 38 # 阿里云smtp.qiye.aliyun.com 465
39   -runner.send_email(host="smtp.qiye.aliyun.com",
40   - port=465,
41   - user="shishut@workai.com.cn",
42   - password="mKh50p89DqvqJ7pd",
43   - to_addrs=["1171621168@qq.com", "shishut@workai.com.cn"]
44   - )
  39 +# runner.send_email(host="smtp.qiye.aliyun.com",
  40 +# port=465,
  41 +# user="shishut@workai.com.cn",
  42 +# password="mKh50p89DqvqJ7pd",
  43 +# to_addrs=["1171621168@qq.com", "shishut@workai.com.cn"]
  44 +# )
... ...
... ... @@ -27,6 +27,7 @@ headers = {
27 27 class TestLogin(unittest.TestCase):
28 28 open_excel = Excel(os.path.join(DataExcel_Path, "test_01_login.xlsx"), "login")
29 29 test_case = open_excel.read_excel()
  30 +
30 31 @myddt.data(*test_case)
31 32 def test_login(self, case):
32 33
... ... @@ -36,8 +37,8 @@ class TestLogin(unittest.TestCase):
36 37 # 请求接口
37 38 url = conf.get("url", "url_ip") + case['url']
38 39 method = case['method']
39   - # req = requests.request(method=method, url=url, json=data, headers=headers)
40   - req = requests.post(url=url, json=data, headers=headers)
  40 + req = requests.request(method=method, url=url, json=data, headers=headers)
  41 + # req = requests.post(url=url, json=data, headers=headers)
41 42 res = req.json()
42 43 # 将数据在测试报告中进行展示
43 44 print("用例入参:{}".format(data))
... ... @@ -58,4 +59,3 @@ class TestLogin(unittest.TestCase):
58 59 # 结果写入到excel中
59 60 self.open_excel.write_excel(row=case['id'] + 1, column=7, value="通过")
60 61 HandleLog.log.error("用例标题{},通过".format(case['title']))
61   -
... ...
... ... @@ -19,7 +19,7 @@ from common.handle_log import HandleLog
19 19 from common.handle_path import DataExcel_Path
20 20 from common.handle_config import conf
21 21 from tools.handle_token import LoginToken
22   -from tools.fixture import SystemManagement
  22 +from tools.fixture import SelectData
23 23 from jsonpath import jsonpath
24 24
25 25 # 系统管理相关的用例目录
... ... @@ -138,11 +138,12 @@ class Test01Department(unittest.TestCase):
138 138 HandleLog.log.info("用例{},执行通过".format(select_case["title"]))
139 139
140 140
  141 +
141 142 # ==================专业相关的用例==================
142 143 @myddt.ddt
143 144 class Test02Specialty(unittest.TestCase):
144 145 """专业相关的用例"""
145   - open_speciality_excel = Excel(os.path.join(System_path, "test_03_specialty.xlsx"), "add_specialty")
  146 + open_speciality_excel = Excel(os.path.join(System_path, "test_02_specialty.xlsx"), "add_specialty")
146 147 test_data = open_speciality_excel.read_excel()
147 148
148 149 @classmethod
... ... @@ -169,14 +170,17 @@ class Test02Specialty(unittest.TestCase):
169 170 """新增专业"""
170 171 # 准备数据
171 172 # --写入数据
  173 + # 查看获取院系Excel表格的url
  174 + select_department_excel = Excel(os.path.join(System_path, "test_02_department.xlsx"), "select_department")
  175 + select_url = select_department_excel.read_excel_location("C2")
  176 + department_list = SelectData(str(select_url))
  177 + department_json = department_list.select_list()
172 178 # 获取院系id
173   - department_list = SystemManagement.department_list()
174   - department_id = jsonpath(department_list, "$..id")[0]
  179 + department_id = jsonpath(department_json, "$..id")[0]
175 180 if "#specialty_name#" in case["data"]:
176 181 case["data"] = case["data"].replace("#specialty_name#", self.specialty_name + "_" + str(case["id"]))
177 182 if "#specialty_code#" in case["data"]:
178 183 case["data"] = case["data"].replace("#specialty_code#", self.specialty_code + "_" + str(case["id"]))
179   -
180 184 if "#departmentId#" in case["data"]:
181 185 case["data"] = case["data"].replace("#departmentId#", department_id)
182 186 data = json.loads(case["data"])
... ... @@ -203,6 +207,9 @@ class Test02Specialty(unittest.TestCase):
203 207 raise e
204 208 else:
205 209 self.open_speciality_excel.write_excel(row=case["id"] + 1, column=7, value="通过")
  210 + # 将创建使用的数据写入到excel表格中
  211 + self.open_speciality_excel.write_excel(row=case["id"] + 1, column=9,
  212 + value=case["data"])
206 213 HandleLog.log.info("用例{},执行通过".format(case["title"]))
207 214
208 215
... ... @@ -210,7 +217,7 @@ class Test02Specialty(unittest.TestCase):
210 217 @myddt.ddt
211 218 class Test03Year(unittest.TestCase):
212 219 """校历(学年学期)相关的用例"""
213   - open_year_excel = Excel(os.path.join(System_path, "test_04_term.xlsx"), "add_term")
  220 + open_year_excel = Excel(os.path.join(System_path, "test_02_term.xlsx"), "add_term")
214 221 test_data = open_year_excel.read_excel()
215 222
216 223 @classmethod
... ... @@ -265,4 +272,7 @@ class Test03Year(unittest.TestCase):
265 272 raise e
266 273 else:
267 274 self.open_year_excel.write_excel(row=case["id"] + 1, column=7, value="通过")
  275 + # 将创建使用的数据写入到excel表格中
  276 + self.open_year_excel.write_excel(row=case["id"] + 1, column=9,
  277 + value=case["data"])
268 278 HandleLog.log.info("用例{},执行通过".format(case["title"]))
... ...
1 1 # -*- coding: utf-8 -*-
2   -"""======================================
3   -@Software: PyCharm
4   -@Author : Shitou ✊
5   -@Time : 2022/12/17 22:10
6   -@FileName: test_03_teaching_affairs.py
7   -====================================="""
  2 +# """======================================
  3 +# @Software: PyCharm
  4 +# @Author : Shitou ✊
  5 +# @Time : 2022/12/17 22:10
  6 +# @FileName: test_03_teaching_affairs.py
  7 +# ====================================="""
8 8 """
9 9 实习教务管理菜单
10   -"""
\ No newline at end of file
  10 +"""
  11 +import json
  12 +import time
  13 +import unittest
  14 +import os
  15 +import requests
  16 +from jsonpath import jsonpath
  17 +from common.handle_log import HandleLog
  18 +from common.handle_path import DataExcel_Path
  19 +from common.myddt import ddt, data
  20 +from common.handle_excel import Excel
  21 +from common.handle_config import conf
  22 +from tools.fixture import SelectData
  23 +from tools.handle_token import LoginToken
  24 +from tools.fixture import RandomPhone, RandomIdentification, RandomEmail
  25 +
  26 +TeachingAffairs_path = os.path.join(DataExcel_Path, "teaching_affairs")
  27 +
  28 +
  29 +# ==================教师相关的用例==================
  30 +@ddt
  31 +class Test01CTeacher(unittest.TestCase):
  32 + """教师相关"""
  33 + # ---获取添加教师用例
  34 + add_teacher = Excel(os.path.join(TeachingAffairs_path, "test_03_teacher.xlsx"), "add_teacher")
  35 + add_teacher_case = add_teacher.read_excel()
  36 + # ---获取添加院系Excel表格
  37 + select_department_excel = Excel(os.path.join(os.path.join(DataExcel_Path, "system"), "test_02_department.xlsx"),
  38 + "select_department")
  39 + select_url = select_department_excel.read_excel_location("C2")
  40 + department_list = SelectData(str(select_url))
  41 + department_json = department_list.select_list()
  42 + # 获取院系id
  43 + department_id = jsonpath(department_json, "$..id")[0]
  44 +
  45 + @classmethod
  46 + def setUpClass(cls):
  47 + """
  48 + 用例类执行前执行的函数
  49 + :return:token
  50 + """
  51 + # 获取token
  52 + cls.token = LoginToken.login_token()
  53 +
  54 + def setUp(self):
  55 + """单条用例执行前执行的函数"""
  56 + new_time = time.strftime("%Y%m%d_%H:%M:%S")
  57 + # 随机教师名称
  58 + self.teacher_name = "py自动化教师" + new_time
  59 + # # 随机院系代码
  60 + # self.department_code = "py_code" + new_time
  61 +
  62 + # ====================================================================
  63 + # 新增教师
  64 + # ====================================================================
  65 + @data(*add_teacher_case)
  66 + def test_add_class_info(self, case):
  67 +
  68 + """新增教师用例"""
  69 + url = conf.get("url", "url_ip") + case['url']
  70 + # 准备数据
  71 + # ------判断教师姓名
  72 + if "#name#" in case["data"]:
  73 + case["data"] = case["data"].replace("#name#", str(self.teacher_name + "_" + str(case["id"])))
  74 + # ------判断教师姓名
  75 + if "#departmentId#" in case["data"]:
  76 + case["data"] = case["data"].replace("#departmentId#", str(self.department_id))
  77 + # ------判断教师手机号
  78 + if "#phone#" in case["data"]:
  79 + case["data"] = case["data"].replace("#phone#", RandomPhone.random_phone())
  80 + # ------判断教师身份证号
  81 + if "#idNumber#" in case["data"]:
  82 + case["data"] = case["data"].replace("#idNumber#", RandomIdentification().ran_end())
  83 + # ------判断教师身份证号
  84 + if "#email#" in case["data"]:
  85 + case["data"] = case["data"].replace("#email#", RandomEmail.rand_email())
  86 + data = json.loads(case["data"])
  87 + expected = json.loads(case["expected"])
  88 + herders = {}
  89 + herders["Authorization"] = self.token
  90 + # 调用接口
  91 + response = requests.request(url=url, method=case["method"], json=data, headers=herders)
  92 + res = response.json()
  93 + print("用例入参:{}".format(data))
  94 + print("预期结果:", expected)
  95 + print("实际结果:", res)
  96 + # 断言
  97 + # 断言
  98 + try:
  99 + self.assertEqual(expected['msg'], res['msg'])
  100 + self.assertEqual(expected['code'], res['code'])
  101 + except AssertionError as e:
  102 + # 写入Excel
  103 + self.add_teacher.write_excel(row=case["id"] + 1, column=7, value="不通过")
  104 + HandleLog.log.error("用例标题{},不通过".format(case['title']))
  105 + HandleLog.log.exception(e)
  106 + raise e
  107 + else:
  108 + self.add_teacher.write_excel(row=case["id"] + 1, column=7, value="通过")
  109 + # 将创建使用的数据写入到excel表格中
  110 + self.add_teacher.write_excel(row=case["id"] + 1, column=9,
  111 + value=case["data"])
  112 + HandleLog.log.info("用例{},执行通过".format(case["title"]))
  113 +
  114 +
  115 +'''
  116 +# ==================班级相关的用例==================
  117 +@ddt
  118 +class Test02Class(unittest.TestCase):
  119 + """班级相关"""
  120 + add_class = Excel(os.path.join(TeachingAffairs_path, "test_03_class.xlsx"), "add_class")
  121 + add_class_case = add_class.read_excel()
  122 +
  123 + # ====================================================================
  124 + # 新增班级
  125 + # ====================================================================
  126 + @data(*add_class_case)
  127 + def test_add_class_info(self, case):
  128 + """新增班级用例"""
  129 +'''
... ...
... ... @@ -6,38 +6,117 @@
6 6 # @FileName: fixture.py
7 7 # ======================================
8 8 """
9   -获取数据
  9 +获取查看数据
10 10 """
  11 +import random
  12 +import string
11 13
12 14 import requests
13 15 from common.handle_config import conf
14 16 from tools.handle_token import LoginToken
15   -from jsonpath import jsonpath
16   -
17   -
18   -# ==================院系相关的数据==================
19   -class SystemManagement(object):
20   - """系统管理"""
21   -
22   - # ====================================================================
23   - # 查看院系列表获取数据
24   - # ====================================================================
25   - @classmethod
26   - def department_list(cls):
27   - """
28   - 查看院系列表
29   - """
30   - url = conf.get('url', 'url_ip') + "/basic/v1/department/list"
  17 +from common.handle_excel import Excel
  18 +import os
  19 +import time
  20 +import random
  21 +
  22 +"""
  23 +获取json字符串
  24 +"""
  25 +
  26 +
  27 +class SelectData(object):
  28 + def __init__(self, url):
  29 + self.url = url
  30 +
  31 + def select_list(self):
  32 + self.url = conf.get('url', 'url_ip') + self.url
31 33 headers = {}
32 34 headers["Authorization"] = LoginToken.login_token()
33 35 data = {
34 36 "pageNumber": "0",
35 37 "pageSize": "3"
36 38 }
37   - response = requests.request(url=url, method="get", json=data, headers=headers)
  39 + response = requests.request(url=self.url, method="get", json=data, headers=headers)
38 40 res = response.json()
39 41 return res
40 42
41 43
  44 +"""
  45 +随机生成手机号
  46 +"""
  47 +
  48 +
  49 +class RandomPhone:
  50 +
  51 + # 随机生成手机号
  52 + @staticmethod
  53 + def random_phone():
  54 + for k in range(1):
  55 + prelist = ["155", "136", "173", "133"]
  56 + return random.choice(prelist) + "".join(random.choice("0123456789") for i in range(8))
  57 +
  58 +
  59 +"""
  60 +随机生成身份证号
  61 +"""
  62 +
  63 +
  64 +class RandomIdentification(object):
  65 +
  66 + def ran(self):
  67 + # 随机生成年月日
  68 + yea = random.randint(1933, int(time.strftime("%Y"))) # 生成年
  69 + # 生成月
  70 + mon = random.randint(1, 12)
  71 + ran_mon = '0' + str(mon) if mon < 10 else mon
  72 + # 生成日
  73 + day = random.randint(1, 27)
  74 + ran_day = '0' + str(day) if day < 10 else day
  75 + return str(yea) + str(ran_mon) + str(ran_day)
  76 +
  77 + def ran_value(self):
  78 + # 生成年月日后的三位数
  79 + value = random.randint(10, 199)
  80 + if value < 100:
  81 + return "0" + str(value)
  82 + else:
  83 + return str(value)
  84 +
  85 + def ran_area(self):
  86 + # 随机取生成前六位
  87 + province = (
  88 + '11', '12', '13', '14', '15', '21', '22', '23', '31', '32', '33', '34', '35', '36', '37', '41', '42',
  89 + '43', '44', '45', '46', '50', '51', '52', '53', '54', '61', '62', '63', '64', '65', '66')
  90 + return str(province[random.randint(0, len(province))] + '0101')
  91 +
  92 + def ran_end(self):
  93 + # 组成前17位数字
  94 + ran = self.ran_area() + self.ran() + self.ran_value()
  95 + # 前17位每位需要乘上的系数,用字典表示,比如第一位需要乘上7,最后一位需要乘上2
  96 + coe = {1: 7, 2: 9, 3: 10, 4: 5, 5: 8, 6: 4, 7: 2, 8: 1, 9: 6, 10: 3, 11: 7, 12: 9, 13: 10, 14: 5, 15: 8, 16: 4,
  97 + 17: 2}
  98 + summat = 0
  99 + # 循环计算前17位每位乘上系数之后的和
  100 + for i in range(17):
  101 + summat = summat + int(ran[i:i + 1]) * coe[i + 1]
  102 + # 前17位每位乘上系数之后的和除以11得到的余数对照表,比如余数是0,那第18位就是1
  103 + mat = {0: '1', 1: '0', 2: 'X', 3: '9', 4: '8', 5: '7', 6: '6', 7: '5', 8: '4', 9: '3', 10: '2'}
  104 + return ran + mat[summat % 11]
  105 +
  106 +
  107 +"""
  108 +随机生成邮箱
  109 +"""
  110 +
  111 +
  112 +class RandomEmail(object):
  113 + @staticmethod
  114 + def rand_email():
  115 + email_len = random.randint(1, 99999999999)
  116 + # print(str(email_len) + "@163.com")
  117 + return str(email_len) + "@163.com"
  118 +
42 119 if __name__ == '__main__':
43   - SystemManagement.department_list()
  120 + print(RandomIdentification().ran_end())
  121 + # Val(Ran().ran_end())
  122 + # RandomEmail.rand_email()
... ...
注册登录 后发表评论