提交 aca190f8d51df5e383fcf8255e8cf08cee1a92e2
1 个父辈
22e8479a
1.0.1
1.新增fixture.py 2.新增查看院系接口测试用例 4.新增整理Excel表格数据入参问题 3.代码优化
正在显示
14 个修改的文件
包含
443 行增加
和
121 行删除
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.0 首次提交"> | |
4 | + <list default="true" id="129454fc-5415-4c7e-9855-d0293355ede5" name="Default Changelist" comment="1.0.0 实习教务管理"> | |
5 | + <change afterPath="$PROJECT_DIR$/tools/fixture.py" afterDir="false" /> | |
5 | 6 | <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> |
7 | + <change beforePath="$PROJECT_DIR$/.idea/yxly2.iml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/yxly2.iml" afterDir="false" /> | |
8 | + <change beforePath="$PROJECT_DIR$/data/system/test_02_department.xlsx" beforeDir="false" afterPath="$PROJECT_DIR$/data/system/test_02_department.xlsx" afterDir="false" /> | |
9 | + <change beforePath="$PROJECT_DIR$/data/system/test_03_specialty.xlsx" beforeDir="false" afterPath="$PROJECT_DIR$/data/system/test_03_specialty.xlsx" afterDir="false" /> | |
10 | + <change beforePath="$PROJECT_DIR$/data/system/test_04_term.xlsx" beforeDir="false" afterPath="$PROJECT_DIR$/data/system/test_04_term.xlsx" afterDir="false" /> | |
11 | + <change beforePath="$PROJECT_DIR$/data/test_01_login.xlsx" beforeDir="false" afterPath="$PROJECT_DIR$/data/test_01_login.xlsx" afterDir="false" /> | |
12 | + <change beforePath="$PROJECT_DIR$/logs/log.log" beforeDir="false" afterPath="$PROJECT_DIR$/logs/log.log" afterDir="false" /> | |
13 | + <change beforePath="$PROJECT_DIR$/report/history.json" beforeDir="false" afterPath="$PROJECT_DIR$/report/history.json" afterDir="false" /> | |
14 | + <change beforePath="$PROJECT_DIR$/report/report.html" beforeDir="false" afterPath="$PROJECT_DIR$/report/report.html" afterDir="false" /> | |
15 | + <change beforePath="$PROJECT_DIR$/run.py" beforeDir="false" afterPath="$PROJECT_DIR$/run.py" afterDir="false" /> | |
16 | + <change beforePath="$PROJECT_DIR$/testcase/test_01_login.py" beforeDir="false" afterPath="$PROJECT_DIR$/testcase/test_01_login.py" afterDir="false" /> | |
17 | + <change beforePath="$PROJECT_DIR$/testcase/test_02_system_management.py" beforeDir="false" afterPath="$PROJECT_DIR$/testcase/test_02_system_management.py" afterDir="false" /> | |
6 | 18 | <change beforePath="$PROJECT_DIR$/testcase/test_03_teaching_affairs.py" beforeDir="false" afterPath="$PROJECT_DIR$/testcase/test_03_teaching_affairs.py" afterDir="false" /> |
7 | 19 | </list> |
8 | 20 | <option name="SHOW_DIALOG" value="false" /> |
... | ... | @@ -10,6 +22,24 @@ |
10 | 22 | <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> |
11 | 23 | <option name="LAST_RESOLUTION" value="IGNORE" /> |
12 | 24 | </component> |
25 | + <component name="FileTemplateManagerImpl"> | |
26 | + <option name="RECENT_TEMPLATES"> | |
27 | + <list> | |
28 | + <option value="Python Script" /> | |
29 | + </list> | |
30 | + </option> | |
31 | + </component> | |
32 | + <component name="FlaskConsoleOptions" custom-start-script="import sys sys.path.extend([WORKING_DIR_AND_PYTHON_PATHS]) from flask.cli import ScriptInfo locals().update(ScriptInfo(create_app=None).load_app().make_shell_context()) print("Python %s on %s\nApp: %s [%s]\nInstance: %s" % (sys.version, sys.platform, app.import_name, app.env, app.instance_path))"> | |
33 | + <envs> | |
34 | + <env key="FLASK_APP" value="app" /> | |
35 | + </envs> | |
36 | + <option name="myCustomStartScript" value="import sys sys.path.extend([WORKING_DIR_AND_PYTHON_PATHS]) from flask.cli import ScriptInfo locals().update(ScriptInfo(create_app=None).load_app().make_shell_context()) print("Python %s on %s\nApp: %s [%s]\nInstance: %s" % (sys.version, sys.platform, app.import_name, app.env, app.instance_path))" /> | |
37 | + <option name="myEnvs"> | |
38 | + <map> | |
39 | + <entry key="FLASK_APP" value="app" /> | |
40 | + </map> | |
41 | + </option> | |
42 | + </component> | |
13 | 43 | <component name="Git.Settings"> |
14 | 44 | <option name="RECENT_BRANCH_BY_REPOSITORY"> |
15 | 45 | <map> |
... | ... | @@ -28,9 +58,37 @@ |
28 | 58 | <property name="RunOnceActivity.OpenProjectViewOnStart" value="true" /> |
29 | 59 | <property name="RunOnceActivity.ShowReadmeOnStart" value="true" /> |
30 | 60 | <property name="WebServerToolWindowFactoryState" value="false" /> |
31 | - <property name="last_opened_file_path" value="$PROJECT_DIR$" /> | |
61 | + <property name="last_opened_file_path" value="$PROJECT_DIR$/tools" /> | |
62 | + <property name="settings.editor.selected.configurable" value="fileTemplates" /> | |
63 | + </component> | |
64 | + <component name="RecentsManager"> | |
65 | + <key name="CopyFile.RECENT_KEYS"> | |
66 | + <recent name="$PROJECT_DIR$/tools" /> | |
67 | + </key> | |
32 | 68 | </component> |
33 | - <component name="RunManager"> | |
69 | + <component name="RunManager" selected="Python.run"> | |
70 | + <configuration name="fixture" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true"> | |
71 | + <module name="yxly2" /> | |
72 | + <option name="INTERPRETER_OPTIONS" value="" /> | |
73 | + <option name="PARENT_ENVS" value="true" /> | |
74 | + <envs> | |
75 | + <env name="PYTHONUNBUFFERED" value="1" /> | |
76 | + </envs> | |
77 | + <option name="SDK_HOME" value="" /> | |
78 | + <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/testcase" /> | |
79 | + <option name="IS_MODULE_SDK" value="true" /> | |
80 | + <option name="ADD_CONTENT_ROOTS" value="true" /> | |
81 | + <option name="ADD_SOURCE_ROOTS" value="true" /> | |
82 | + <EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" /> | |
83 | + <option name="SCRIPT_NAME" value="$PROJECT_DIR$/testcase/fixture.py" /> | |
84 | + <option name="PARAMETERS" value="" /> | |
85 | + <option name="SHOW_COMMAND_LINE" value="false" /> | |
86 | + <option name="EMULATE_TERMINAL" value="false" /> | |
87 | + <option name="MODULE_MODE" value="false" /> | |
88 | + <option name="REDIRECT_INPUT" value="false" /> | |
89 | + <option name="INPUT_FILE" value="" /> | |
90 | + <method v="2" /> | |
91 | + </configuration> | |
34 | 92 | <configuration name="run" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true"> |
35 | 93 | <module name="yxly2" /> |
36 | 94 | <option name="INTERPRETER_OPTIONS" value="" /> |
... | ... | @@ -53,9 +111,48 @@ |
53 | 111 | <option name="INPUT_FILE" value="" /> |
54 | 112 | <method v="2" /> |
55 | 113 | </configuration> |
114 | + <configuration name="Unittests in fixture.py" type="tests" factoryName="Unittests" temporary="true" nameIsGenerated="true"> | |
115 | + <module name="yxly2" /> | |
116 | + <option name="INTERPRETER_OPTIONS" value="" /> | |
117 | + <option name="PARENT_ENVS" value="true" /> | |
118 | + <option name="SDK_HOME" value="" /> | |
119 | + <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/testcase" /> | |
120 | + <option name="IS_MODULE_SDK" value="true" /> | |
121 | + <option name="ADD_CONTENT_ROOTS" value="true" /> | |
122 | + <option name="ADD_SOURCE_ROOTS" value="true" /> | |
123 | + <EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" /> | |
124 | + <option name="_new_additionalArguments" value="""" /> | |
125 | + <option name="_new_target" value=""$PROJECT_DIR$/testcase/fixture.py"" /> | |
126 | + <option name="_new_targetType" value=""PATH"" /> | |
127 | + <method v="2" /> | |
128 | + </configuration> | |
129 | + <configuration name="Unittests in test_02_system_management.py" type="tests" factoryName="Unittests" temporary="true" nameIsGenerated="true"> | |
130 | + <module name="yxly2" /> | |
131 | + <option name="INTERPRETER_OPTIONS" value="" /> | |
132 | + <option name="PARENT_ENVS" value="true" /> | |
133 | + <option name="SDK_HOME" value="" /> | |
134 | + <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/testcase" /> | |
135 | + <option name="IS_MODULE_SDK" value="true" /> | |
136 | + <option name="ADD_CONTENT_ROOTS" value="true" /> | |
137 | + <option name="ADD_SOURCE_ROOTS" value="true" /> | |
138 | + <EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" /> | |
139 | + <option name="_new_additionalArguments" value="""" /> | |
140 | + <option name="_new_target" value=""$PROJECT_DIR$/testcase/test_02_system_management.py"" /> | |
141 | + <option name="_new_targetType" value=""PATH"" /> | |
142 | + <method v="2" /> | |
143 | + </configuration> | |
144 | + <list> | |
145 | + <item itemvalue="Python.run" /> | |
146 | + <item itemvalue="Python tests.Unittests in test_02_system_management.py" /> | |
147 | + <item itemvalue="Python.fixture" /> | |
148 | + <item itemvalue="Python tests.Unittests in fixture.py" /> | |
149 | + </list> | |
56 | 150 | <recent_temporary> |
57 | 151 | <list> |
58 | 152 | <item itemvalue="Python.run" /> |
153 | + <item itemvalue="Python tests.Unittests in test_02_system_management.py" /> | |
154 | + <item itemvalue="Python.fixture" /> | |
155 | + <item itemvalue="Python tests.Unittests in fixture.py" /> | |
59 | 156 | </list> |
60 | 157 | </recent_temporary> |
61 | 158 | </component> |
... | ... | @@ -69,6 +166,9 @@ |
69 | 166 | <updated>1671543182779</updated> |
70 | 167 | <workItem from="1671543183922" duration="14000" /> |
71 | 168 | <workItem from="1671543239346" duration="1090000" /> |
169 | + <workItem from="1671554332302" duration="650000" /> | |
170 | + <workItem from="1671612580435" duration="100000" /> | |
171 | + <workItem from="1671612709033" duration="16667000" /> | |
72 | 172 | </task> |
73 | 173 | <task id="LOCAL-00001" summary="1.0.0 首次提交"> |
74 | 174 | <created>1671544396986</created> |
... | ... | @@ -88,17 +188,55 @@ |
88 | 188 | <map> |
89 | 189 | <entry key="MAIN"> |
90 | 190 | <value> |
91 | - <State /> | |
191 | + <State> | |
192 | + <option name="FILTERS"> | |
193 | + <map> | |
194 | + <entry key="branch"> | |
195 | + <value> | |
196 | + <list> | |
197 | + <option value="master" /> | |
198 | + </list> | |
199 | + </value> | |
200 | + </entry> | |
201 | + </map> | |
202 | + </option> | |
203 | + </State> | |
92 | 204 | </value> |
93 | 205 | </entry> |
94 | 206 | </map> |
95 | 207 | </option> |
208 | + <option name="oldMeFiltersMigrated" value="true" /> | |
96 | 209 | </component> |
97 | 210 | <component name="VcsManagerConfiguration"> |
98 | 211 | <MESSAGE value="1.0.0 首次提交" /> |
99 | 212 | <option name="LAST_COMMIT_MESSAGE" value="1.0.0 首次提交" /> |
100 | 213 | </component> |
214 | + <component name="XDebuggerManager"> | |
215 | + <breakpoint-manager> | |
216 | + <breakpoints> | |
217 | + <line-breakpoint enabled="true" suspend="THREAD" type="python-line"> | |
218 | + <url>file://$PROJECT_DIR$/testcase/test_02_system_management.py</url> | |
219 | + <line>147</line> | |
220 | + <option name="timeStamp" value="5" /> | |
221 | + </line-breakpoint> | |
222 | + <line-breakpoint enabled="true" suspend="THREAD" type="python-line"> | |
223 | + <url>file://$PROJECT_DIR$/testcase/test_02_system_management.py</url> | |
224 | + <line>180</line> | |
225 | + <option name="timeStamp" value="10" /> | |
226 | + </line-breakpoint> | |
227 | + <line-breakpoint enabled="true" suspend="THREAD" type="python-line"> | |
228 | + <url>file://$PROJECT_DIR$/testcase/test_02_system_management.py</url> | |
229 | + <line>88</line> | |
230 | + <option name="timeStamp" value="11" /> | |
231 | + </line-breakpoint> | |
232 | + </breakpoints> | |
233 | + </breakpoint-manager> | |
234 | + </component> | |
101 | 235 | <component name="com.intellij.coverage.CoverageDataManagerImpl"> |
102 | - <SUITE FILE_PATH="coverage/yxly$run.coverage" NAME="run Coverage Results" MODIFIED="1671543312825" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" /> | |
236 | + <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" /> | |
237 | + <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" /> | |
238 | + <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" /> | |
239 | + <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" /> | |
240 | + <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$" /> | |
103 | 241 | </component> |
104 | 242 | </project> |
\ No newline at end of file | ... | ... |
... | ... | @@ -5,11 +5,11 @@ |
5 | 5 | <orderEntry type="inheritedJdk" /> |
6 | 6 | <orderEntry type="sourceFolder" forTests="false" /> |
7 | 7 | </component> |
8 | + <component name="PackageRequirementsSettings"> | |
9 | + <option name="requirementsPath" value="" /> | |
10 | + </component> | |
8 | 11 | <component name="PyDocumentationSettings"> |
9 | 12 | <option name="format" value="PLAIN" /> |
10 | 13 | <option name="myDocStringFormat" value="Plain" /> |
11 | 14 | </component> |
12 | - <component name="TestRunnerService"> | |
13 | - <option name="PROJECT_TEST_RUNNER" value="pytest" /> | |
14 | - </component> | |
15 | 15 | </module> |
\ No newline at end of file | ... | ... |
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
此 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"}] | |
\ 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"}] | |
\ 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-20 21:35:13</span> | |
159 | + <span class="text-dark">2022-12-21 23:10:55</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">6.77 S</span> | |
163 | + <span class="text-dark">14.30 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">24</span> | |
167 | + <span class="text-dark">25</span> | |
168 | 168 | </li> |
169 | 169 | |
170 | 170 | |
... | ... | @@ -179,7 +179,7 @@ |
179 | 179 | </li> |
180 | 180 | <li class="list-group-item"> |
181 | 181 | <button type="button" class="btn btn-warning">失败用例</button> |
182 | - <span class="text-warning">15</span> | |
182 | + <span class="text-warning">16</span> | |
183 | 183 | </li> |
184 | 184 | <li class="list-group-item"> |
185 | 185 | <button type="button" class="btn btn-danger">错误用例</button> |
... | ... | @@ -225,11 +225,11 @@ |
225 | 225 | <select id="testClass"> |
226 | 226 | <option>所有</option> |
227 | 227 | |
228 | - <option>TestLogin</option> | |
228 | + <option>Test03Year</option> | |
229 | 229 | |
230 | 230 | <option>Test02Specialty</option> |
231 | 231 | |
232 | - <option>Test03Year</option> | |
232 | + <option>TestLogin</option> | |
233 | 233 | |
234 | 234 | <option>Test01Department</option> |
235 | 235 | |
... | ... | @@ -262,7 +262,7 @@ |
262 | 262 | <td class="TestLogin">TestLogin</td> |
263 | 263 | <td>test_login_1</td> |
264 | 264 | <td>登陆成功</td> |
265 | - <td>0.537s</td> | |
265 | + <td>0.558s</td> | |
266 | 266 | |
267 | 267 | <td class="text-success">成功</td> |
268 | 268 | |
... | ... | @@ -278,7 +278,7 @@ |
278 | 278 | |
279 | 279 | <pre>用例入参:{'way': 'name', 'password': 'f85eea0e15e424aba8675f8848e2cb83', 'type': 'teacher', 'username': '17301249975'} |
280 | 280 | 预期结果:{'msg': 'success', 'code': 200} |
281 | -实际结果:{'msg': 'success', 'code': 200, 'data': {'access_token': 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZW5hbnRUeXBlIjoiIiwiYnJva2VySWQiOiIiLCJocm9Vc2VyVG9rZW4iOm51bGwsInVzZXJfbmFtZSI6IjE3MzAxMjQ5OTc1IiwiYXV0aFN0YXR1cyI6IiIsImF1dGhlbnRpY2F0aW9uSWRlbnRpdHkiOiJsb2dpbiIsInR5cGUiOiJ0ZWFjaGVyIiwidXNlcklkIjoiMTUxOTk1OTIwODUyOTg2Njc1MyIsImNsaWVudF9pZCI6IndvcmthaSIsInN0dWRlbnRJZCI6IiIsInRlYWNoZXJJZCI6IjE1MTk5NTkyMDkyNzY0NTI4NjUiLCJ0ZW5hbnROYW1lIjoiIiwicGhvbmUiOiIxNzMwMTI0OTk3NSIsInNjb3BlIjpbImFsbCJdLCJzY2hvb2xJZCI6IjE1MTk5NTg1NjYxMzAyNTc5MjIiLCJ0ZW5hbnRJZCI6IiIsIm5hbWUiOiLmoKHplb8iLCJzdHVkZW50U3RhdHVzIjoiIiwiZXhwIjoxNjcxNTc5MzE0LCJzY2hvb2xOYW1lIjoi5rWL6K-V5aSn5a2mIiwianRpIjoiOThhOTY4NjktZDVlMy00YThlLWEyZmQtNmQxOWY5ZWVkNmIzIiwic3RhdHVzIjoiYWN0aXZlIn0.jGUS_oLPTLxKewnrJmIDQayv941nKoVoDkBpnWpF1L75UyLhkQHrNmvuyEwUiiSsYYfQsU1FV9Tj0BOjJZItppjX7FcRF-tKHIBj_YO2L9e1B9QfZ989vwjxhrV5NCe4dShPQ5QbH1yOQSTvshWKBBR5zEnqizpZtsZPDVSXb2Abd05nozG3MJVuRbYne72oeC86ho71JxdEkxCf2f7bKCFNmZF-oKBrIAhoVWPR4dQMrCE5JgeQGIIKC2buDyhJ9KhUCJhI0iz80raErP9x4RClT6n0RLOj-tXClTYj_snN8Fh_d6uqb9WFj3e37dkdFdWeyVwbg2PaC6gVU1-rlw', 'token_type': 'bearer', 'refresh_token': 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZW5hbnRUeXBlIjoiIiwiYnJva2VySWQiOiIiLCJocm9Vc2VyVG9rZW4iOm51bGwsInVzZXJfbmFtZSI6IjE3MzAxMjQ5OTc1IiwiYXV0aFN0YXR1cyI6IiIsImF1dGhlbnRpY2F0aW9uSWRlbnRpdHkiOiJsb2dpbiIsInR5cGUiOiJ0ZWFjaGVyIiwidXNlcklkIjoiMTUxOTk1OTIwODUyOTg2Njc1MyIsImNsaWVudF9pZCI6IndvcmthaSIsInN0dWRlbnRJZCI6IiIsInRlYWNoZXJJZCI6IjE1MTk5NTkyMDkyNzY0NTI4NjUiLCJ0ZW5hbnROYW1lIjoiIiwicGhvbmUiOiIxNzMwMTI0OTk3NSIsInNjb3BlIjpbImFsbCJdLCJzY2hvb2xJZCI6IjE1MTk5NTg1NjYxMzAyNTc5MjIiLCJhdGkiOiI5OGE5Njg2OS1kNWUzLTRhOGUtYTJmZC02ZDE5ZjllZWQ2YjMiLCJ0ZW5hbnRJZCI6IiIsIm5hbWUiOiLmoKHplb8iLCJzdHVkZW50U3RhdHVzIjoiIiwiZXhwIjoxNjcxNjE1MzE0LCJzY2hvb2xOYW1lIjoi5rWL6K-V5aSn5a2mIiwianRpIjoiMmYzNjFlOWQtY2Y5YS00OWUyLWFhZjctYWQwMWQ5NjQyZjg5Iiwic3RhdHVzIjoiYWN0aXZlIn0.E2mScC7k8vugNPnXhieiKeDXiT1AOZ2TwtI3RNZ2a8XWB1L1Vl5NWOwr6FCQSd-ApqvTvOl8k0LYs5rkRdlgsRIJTy-_gNs4VhZU4b8mkWlajCn_prDbToCWcTjKJomPao5biiBgQtQ8Q2zgGYj_oAxv-yQoxIPaxATKECJrXhci7afbRFQjTwTdH8_uchvr7sv1-9lZ9gfKbFSXsYvjgXvlxH220Guvio9q6EGNfxKWVgHuPMsv96H2Le8qrzmJNmTht0660oftw0A2WL84ZFemvmMscaXizRkNL9Nv6bvt1o_unQXOVQwx61SYVNayB2UjsICGRJGU3Y_G2hgKBg', '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': '98a96869-d5e3-4a8e-a2fd-6d19f9eed6b3'}} | |
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'}} | |
282 | 282 | test_login_1 (test_01_login.TestLogin)执行——>【通过】 |
283 | 283 | </pre> |
284 | 284 | |
... | ... | @@ -291,7 +291,7 @@ test_login_1 (test_01_login.TestLogin)銵> |
291 | 291 | <td class="TestLogin">TestLogin</td> |
292 | 292 | <td>test_login_2</td> |
293 | 293 | <td>手机号填写错误的</td> |
294 | - <td>0.219s</td> | |
294 | + <td>0.237s</td> | |
295 | 295 | |
296 | 296 | <td class="text-warning">失败</td> |
297 | 297 | |
... | ... | @@ -331,12 +331,12 @@ test_login_2 (test_01_login.TestLogin)銵>仃韐乓 |
331 | 331 | </pre> |
332 | 332 | |
333 | 333 | |
334 | - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_01_login.py", line 57, in test_login | |
334 | + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_01_login.py", line 56, in test_login | |
335 | 335 | raise e |
336 | 336 | </pre> |
337 | 337 | |
338 | 338 | |
339 | - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_01_login.py", line 49, in test_login | |
339 | + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_01_login.py", line 48, in test_login | |
340 | 340 | self.assertEqual(expected['msg'], res['msg']) |
341 | 341 | </pre> |
342 | 342 | |
... | ... | @@ -371,7 +371,7 @@ test_login_2 (test_01_login.TestLogin)銵>仃韐乓 |
371 | 371 | <td class="TestLogin">TestLogin</td> |
372 | 372 | <td>test_login_3</td> |
373 | 373 | <td>手机号不进行填写</td> |
374 | - <td>0.193s</td> | |
374 | + <td>0.235s</td> | |
375 | 375 | |
376 | 376 | <td class="text-warning">失败</td> |
377 | 377 | |
... | ... | @@ -411,12 +411,12 @@ test_login_3 (test_01_login.TestLogin)銵>仃韐乓 |
411 | 411 | </pre> |
412 | 412 | |
413 | 413 | |
414 | - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_01_login.py", line 57, in test_login | |
414 | + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_01_login.py", line 56, in test_login | |
415 | 415 | raise e |
416 | 416 | </pre> |
417 | 417 | |
418 | 418 | |
419 | - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_01_login.py", line 49, in test_login | |
419 | + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_01_login.py", line 48, in test_login | |
420 | 420 | self.assertEqual(expected['msg'], res['msg']) |
421 | 421 | </pre> |
422 | 422 | |
... | ... | @@ -451,7 +451,7 @@ test_login_3 (test_01_login.TestLogin)銵>仃韐乓 |
451 | 451 | <td class="TestLogin">TestLogin</td> |
452 | 452 | <td>test_login_4</td> |
453 | 453 | <td>密码填写错误</td> |
454 | - <td>0.199s</td> | |
454 | + <td>0.219s</td> | |
455 | 455 | |
456 | 456 | <td class="text-warning">失败</td> |
457 | 457 | |
... | ... | @@ -491,12 +491,12 @@ test_login_4 (test_01_login.TestLogin)銵>仃韐乓 |
491 | 491 | </pre> |
492 | 492 | |
493 | 493 | |
494 | - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_01_login.py", line 57, in test_login | |
494 | + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_01_login.py", line 56, in test_login | |
495 | 495 | raise e |
496 | 496 | </pre> |
497 | 497 | |
498 | 498 | |
499 | - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_01_login.py", line 49, in test_login | |
499 | + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_01_login.py", line 48, in test_login | |
500 | 500 | self.assertEqual(expected['msg'], res['msg']) |
501 | 501 | </pre> |
502 | 502 | |
... | ... | @@ -531,7 +531,7 @@ test_login_4 (test_01_login.TestLogin)銵>仃韐乓 |
531 | 531 | <td class="TestLogin">TestLogin</td> |
532 | 532 | <td>test_login_5</td> |
533 | 533 | <td>密码不进行填写</td> |
534 | - <td>0.219s</td> | |
534 | + <td>0.268s</td> | |
535 | 535 | |
536 | 536 | <td class="text-warning">失败</td> |
537 | 537 | |
... | ... | @@ -571,12 +571,12 @@ test_login_5 (test_01_login.TestLogin)銵>仃韐乓 |
571 | 571 | </pre> |
572 | 572 | |
573 | 573 | |
574 | - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_01_login.py", line 57, in test_login | |
574 | + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_01_login.py", line 56, in test_login | |
575 | 575 | raise e |
576 | 576 | </pre> |
577 | 577 | |
578 | 578 | |
579 | - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_01_login.py", line 49, in test_login | |
579 | + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_01_login.py", line 48, in test_login | |
580 | 580 | self.assertEqual(expected['msg'], res['msg']) |
581 | 581 | </pre> |
582 | 582 | |
... | ... | @@ -611,7 +611,7 @@ test_login_5 (test_01_login.TestLogin)銵>仃韐乓 |
611 | 611 | <td class="Test01Department">Test01Department</td> |
612 | 612 | <td>test_add_department_1</td> |
613 | 613 | <td>新增院系成功</td> |
614 | - <td>0.254s</td> | |
614 | + <td>0.297s</td> | |
615 | 615 | |
616 | 616 | <td class="text-success">成功</td> |
617 | 617 | |
... | ... | @@ -625,7 +625,7 @@ test_login_5 (test_01_login.TestLogin)銵>仃韐乓 |
625 | 625 | <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all"> |
626 | 626 | |
627 | 627 | |
628 | - <pre>用例入参:{'name': 'py自动化院系20221220_21:35:15_1', 'code': 'py_code20221220_21:35:15_1'} | |
628 | + <pre>用例入参:{'name': 'py自动化院系20221221_23:10:57_1', 'code': 'py_code20221221_23:10:57_1'} | |
629 | 629 | 预期结果: {'msg': 'success', 'code': 200, 'data': True} |
630 | 630 | 实际结果: {'msg': 'success', 'code': 200, 'data': True} |
631 | 631 | test_add_department_1 (test_02_system_management.Test01Department)执行——>【通过】 |
... | ... | @@ -640,7 +640,7 @@ test_add_department_1 (test_02_system_management.Test01Department)銵> |
640 | 640 | <td class="Test01Department">Test01Department</td> |
641 | 641 | <td>test_add_department_2</td> |
642 | 642 | <td>院系名称未填写</td> |
643 | - <td>0.186s</td> | |
643 | + <td>0.242s</td> | |
644 | 644 | |
645 | 645 | <td class="text-warning">失败</td> |
646 | 646 | |
... | ... | @@ -654,7 +654,7 @@ test_add_department_1 (test_02_system_management.Test01Department)銵> |
654 | 654 | <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all"> |
655 | 655 | |
656 | 656 | |
657 | - <pre>用例入参:{'name': '', 'code': 'py_code20221220_21:35:15_2'} | |
657 | + <pre>用例入参:{'name': '', 'code': 'py_code20221221_23:10:57_2'} | |
658 | 658 | 预期结果: {'msg': '院系名称未填写', 'code': 500, 'data': None} |
659 | 659 | 实际结果: {'msg': 'size must be between 1 and 30', 'code': 500, 'data': None} |
660 | 660 | test_add_department_2 (test_02_system_management.Test01Department)执行——>【失败】 |
... | ... | @@ -680,12 +680,12 @@ test_add_department_2 (test_02_system_management.Test01Department)銵> |
680 | 680 | </pre> |
681 | 681 | |
682 | 682 | |
683 | - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 84, in test_add_department | |
683 | + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 92, in test_add_department | |
684 | 684 | raise e |
685 | 685 | </pre> |
686 | 686 | |
687 | 687 | |
688 | - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 77, in test_add_department | |
688 | + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 85, in test_add_department | |
689 | 689 | self.assertEqual(expected['msg'], res['msg']) |
690 | 690 | </pre> |
691 | 691 | |
... | ... | @@ -720,7 +720,7 @@ test_add_department_2 (test_02_system_management.Test01Department)銵> |
720 | 720 | <td class="Test01Department">Test01Department</td> |
721 | 721 | <td>test_add_department_3</td> |
722 | 722 | <td>院系名称重复</td> |
723 | - <td>0.246s</td> | |
723 | + <td>0.27s</td> | |
724 | 724 | |
725 | 725 | <td class="text-success">成功</td> |
726 | 726 | |
... | ... | @@ -734,7 +734,7 @@ test_add_department_2 (test_02_system_management.Test01Department)銵> |
734 | 734 | <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all"> |
735 | 735 | |
736 | 736 | |
737 | - <pre>用例入参:{'name': '院系1', 'code': 'py_code20221220_21:35:15_3'} | |
737 | + <pre>用例入参:{'name': '院系1', 'code': 'py_code20221221_23:10:58_3'} | |
738 | 738 | 预期结果: {'msg': '院系名称已存在,请确认', 'code': 500, 'data': None} |
739 | 739 | 实际结果: {'msg': '院系名称已存在,请确认', 'code': 500, 'data': None} |
740 | 740 | test_add_department_3 (test_02_system_management.Test01Department)执行——>【通过】 |
... | ... | @@ -749,7 +749,7 @@ test_add_department_3 (test_02_system_management.Test01Department)銵> |
749 | 749 | <td class="Test01Department">Test01Department</td> |
750 | 750 | <td>test_add_department_4</td> |
751 | 751 | <td>院系名称长度不可大于30位</td> |
752 | - <td>0.225s</td> | |
752 | + <td>0.201s</td> | |
753 | 753 | |
754 | 754 | <td class="text-warning">失败</td> |
755 | 755 | |
... | ... | @@ -763,7 +763,7 @@ test_add_department_3 (test_02_system_management.Test01Department)銵> |
763 | 763 | <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all"> |
764 | 764 | |
765 | 765 | |
766 | - <pre>用例入参:{'name': '院系名称长度大于30的测试院系名称长度大于30的测试院系名称长度大于30的测试院系名称长度大于30的测试', 'code': 'py_code20221220_21:35:16_4'} | |
766 | + <pre>用例入参:{'name': '院系名称长度大于30的测试院系名称长度大于30的测试院系名称长度大于30的测试院系名称长度大于30的测试', 'code': 'py_code20221221_23:10:58_4'} | |
767 | 767 | 预期结果: {'msg': '院系名称长度不可大于30', 'code': 500, 'data': None} |
768 | 768 | 实际结果: {'msg': 'size must be between 1 and 30', 'code': 500, 'data': None} |
769 | 769 | test_add_department_4 (test_02_system_management.Test01Department)执行——>【失败】 |
... | ... | @@ -789,12 +789,12 @@ test_add_department_4 (test_02_system_management.Test01Department)銵> |
789 | 789 | </pre> |
790 | 790 | |
791 | 791 | |
792 | - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 84, in test_add_department | |
792 | + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 92, in test_add_department | |
793 | 793 | raise e |
794 | 794 | </pre> |
795 | 795 | |
796 | 796 | |
797 | - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 77, in test_add_department | |
797 | + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 85, in test_add_department | |
798 | 798 | self.assertEqual(expected['msg'], res['msg']) |
799 | 799 | </pre> |
800 | 800 | |
... | ... | @@ -829,7 +829,7 @@ test_add_department_4 (test_02_system_management.Test01Department)銵> |
829 | 829 | <td class="Test01Department">Test01Department</td> |
830 | 830 | <td>test_add_department_5</td> |
831 | 831 | <td>院系代码不能为空</td> |
832 | - <td>0.188s</td> | |
832 | + <td>0.241s</td> | |
833 | 833 | |
834 | 834 | <td class="text-warning">失败</td> |
835 | 835 | |
... | ... | @@ -843,7 +843,7 @@ test_add_department_4 (test_02_system_management.Test01Department)銵> |
843 | 843 | <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all"> |
844 | 844 | |
845 | 845 | |
846 | - <pre>用例入参:{'name': 'py自动化院系20221220_21:35:16_5', 'code': ''} | |
846 | + <pre>用例入参:{'name': 'py自动化院系20221221_23:10:58_5', 'code': ''} | |
847 | 847 | 预期结果: {'msg': '院系代码不能为空', 'code': 500, 'data': None} |
848 | 848 | 实际结果: {'msg': 'size must be between 1 and 30', 'code': 500, 'data': None} |
849 | 849 | test_add_department_5 (test_02_system_management.Test01Department)执行——>【失败】 |
... | ... | @@ -869,12 +869,12 @@ test_add_department_5 (test_02_system_management.Test01Department)銵> |
869 | 869 | </pre> |
870 | 870 | |
871 | 871 | |
872 | - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 84, in test_add_department | |
872 | + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 92, in test_add_department | |
873 | 873 | raise e |
874 | 874 | </pre> |
875 | 875 | |
876 | 876 | |
877 | - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 77, in test_add_department | |
877 | + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 85, in test_add_department | |
878 | 878 | self.assertEqual(expected['msg'], res['msg']) |
879 | 879 | </pre> |
880 | 880 | |
... | ... | @@ -909,7 +909,7 @@ test_add_department_5 (test_02_system_management.Test01Department)銵> |
909 | 909 | <td class="Test01Department">Test01Department</td> |
910 | 910 | <td>test_add_department_6</td> |
911 | 911 | <td>院系代码长度不可大于30</td> |
912 | - <td>0.204s</td> | |
912 | + <td>0.266s</td> | |
913 | 913 | |
914 | 914 | <td class="text-warning">失败</td> |
915 | 915 | |
... | ... | @@ -923,7 +923,7 @@ test_add_department_5 (test_02_system_management.Test01Department)銵> |
923 | 923 | <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all"> |
924 | 924 | |
925 | 925 | |
926 | - <pre>用例入参:{'name': 'py自动化院系20221220_21:35:16_6', 'code': '院系代码长度大于30的测试院系代码长度大于30的测试院系代码长度大于30的测试'} | |
926 | + <pre>用例入参:{'name': 'py自动化院系20221221_23:10:58_6', 'code': '院系代码长度大于30的测试院系代码长度大于30的测试院系代码长度大于30的测试'} | |
927 | 927 | 预期结果: {'msg': '院系代码不可大于30', 'code': 500, 'data': None} |
928 | 928 | 实际结果: {'msg': 'size must be between 1 and 30', 'code': 500, 'data': None} |
929 | 929 | test_add_department_6 (test_02_system_management.Test01Department)执行——>【失败】 |
... | ... | @@ -949,12 +949,12 @@ test_add_department_6 (test_02_system_management.Test01Department)銵> |
949 | 949 | </pre> |
950 | 950 | |
951 | 951 | |
952 | - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 84, in test_add_department | |
952 | + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 92, in test_add_department | |
953 | 953 | raise e |
954 | 954 | </pre> |
955 | 955 | |
956 | 956 | |
957 | - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 77, in test_add_department | |
957 | + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 85, in test_add_department | |
958 | 958 | self.assertEqual(expected['msg'], res['msg']) |
959 | 959 | </pre> |
960 | 960 | |
... | ... | @@ -989,7 +989,7 @@ test_add_department_6 (test_02_system_management.Test01Department)銵> |
989 | 989 | <td class="Test01Department">Test01Department</td> |
990 | 990 | <td>test_add_department_7</td> |
991 | 991 | <td>新增院系成功</td> |
992 | - <td>0.251s</td> | |
992 | + <td>0.295s</td> | |
993 | 993 | |
994 | 994 | <td class="text-success">成功</td> |
995 | 995 | |
... | ... | @@ -1003,7 +1003,7 @@ test_add_department_6 (test_02_system_management.Test01Department)銵> |
1003 | 1003 | <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all"> |
1004 | 1004 | |
1005 | 1005 | |
1006 | - <pre>用例入参:{'name': 'py自动化院系20221220_21:35:16_7', 'code': 'py_code20221220_21:35:16_7'} | |
1006 | + <pre>用例入参:{'name': 'py自动化院系20221221_23:10:58_7', 'code': 'py_code20221221_23:10:58_7'} | |
1007 | 1007 | 预期结果: {'msg': 'success', 'code': 200, 'data': True} |
1008 | 1008 | 实际结果: {'msg': 'success', 'code': 200, 'data': True} |
1009 | 1009 | test_add_department_7 (test_02_system_management.Test01Department)执行——>【通过】 |
... | ... | @@ -1015,10 +1015,39 @@ test_add_department_7 (test_02_system_management.Test01Department)銵> |
1015 | 1015 | |
1016 | 1016 | <tr> |
1017 | 1017 | <td>13</td> |
1018 | + <td class="Test01Department">Test01Department</td> | |
1019 | + <td>test_select_department_1</td> | |
1020 | + <td>查看院系列表</td> | |
1021 | + <td>0.348s</td> | |
1022 | + | |
1023 | + <td class="text-success">成功</td> | |
1024 | + | |
1025 | + <td> | |
1026 | + <button type="button" class="btn btn-success btn_info">查看详情</button> | |
1027 | + </td> | |
1028 | + </tr> | |
1029 | + | |
1030 | + <tr class="test_log"> | |
1031 | + | |
1032 | + <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all"> | |
1033 | + | |
1034 | + | |
1035 | + <pre>用例入参:{'pageNumber': '0', 'pageSize': '3'} | |
1036 | +预期结果: {'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}} | |
1038 | +test_select_department_1 (test_02_system_management.Test01Department)执行——>【通过】 | |
1039 | +</pre> | |
1040 | + | |
1041 | + | |
1042 | + </td> | |
1043 | + </tr> | |
1044 | + | |
1045 | + <tr> | |
1046 | + <td>14</td> | |
1018 | 1047 | <td class="Test02Specialty">Test02Specialty</td> |
1019 | 1048 | <td>test_add_specialty_01</td> |
1020 | 1049 | <td>新增专业成功</td> |
1021 | - <td>0.243s</td> | |
1050 | + <td>0.884s</td> | |
1022 | 1051 | |
1023 | 1052 | <td class="text-success">成功</td> |
1024 | 1053 | |
... | ... | @@ -1032,7 +1061,7 @@ test_add_department_7 (test_02_system_management.Test01Department)銵> |
1032 | 1061 | <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all"> |
1033 | 1062 | |
1034 | 1063 | |
1035 | - <pre>用例入参:{'name': 'py专业21:35:17_1', 'code': 'py_code21:35:17_1', 'departmentId': '1597509063577825282', 'category': 'science'} | |
1064 | + <pre>用例入参:{'name': 'py专业23:11:00_1', 'code': 'py_code23:11:00_1', 'departmentId': '1605581603290345473', 'category': 'science'} | |
1036 | 1065 | 预期结果: {'msg': 'success', 'code': 200, 'data': True} |
1037 | 1066 | 实际结果: {'msg': 'success', 'code': 200, 'data': True} |
1038 | 1067 | test_add_specialty_01 (test_02_system_management.Test02Specialty)执行——>【通过】 |
... | ... | @@ -1043,11 +1072,11 @@ test_add_specialty_01 (test_02_system_management.Test02Specialty)銵> |
1043 | 1072 | </tr> |
1044 | 1073 | |
1045 | 1074 | <tr> |
1046 | - <td>14</td> | |
1075 | + <td>15</td> | |
1047 | 1076 | <td class="Test02Specialty">Test02Specialty</td> |
1048 | 1077 | <td>test_add_specialty_02</td> |
1049 | 1078 | <td>新增专业失败,院系未填写</td> |
1050 | - <td>0.234s</td> | |
1079 | + <td>0.813s</td> | |
1051 | 1080 | |
1052 | 1081 | <td class="text-success">成功</td> |
1053 | 1082 | |
... | ... | @@ -1061,7 +1090,7 @@ test_add_specialty_01 (test_02_system_management.Test02Specialty)銵> |
1061 | 1090 | <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all"> |
1062 | 1091 | |
1063 | 1092 | |
1064 | - <pre>用例入参:{'name': 'py专业21:35:17_2', 'code': 'py_code21:35:17_2', 'departmentId': '', 'category': 'science'} | |
1093 | + <pre>用例入参:{'name': 'py专业23:11:00_2', 'code': 'py_code23:11:00_2', 'departmentId': '', 'category': 'science'} | |
1065 | 1094 | 预期结果: {'msg': '院系不能为空', 'code': 500, 'data': None} |
1066 | 1095 | 实际结果: {'msg': '院系不能为空', 'code': 500, 'data': None} |
1067 | 1096 | test_add_specialty_02 (test_02_system_management.Test02Specialty)执行——>【通过】 |
... | ... | @@ -1072,13 +1101,13 @@ test_add_specialty_02 (test_02_system_management.Test02Specialty)銵> |
1072 | 1101 | </tr> |
1073 | 1102 | |
1074 | 1103 | <tr> |
1075 | - <td>15</td> | |
1104 | + <td>16</td> | |
1076 | 1105 | <td class="Test02Specialty">Test02Specialty</td> |
1077 | 1106 | <td>test_add_specialty_03</td> |
1078 | 1107 | <td>新增专业失败,院系不存在</td> |
1079 | - <td>0.229s</td> | |
1108 | + <td>0.858s</td> | |
1080 | 1109 | |
1081 | - <td class="text-success">成功</td> | |
1110 | + <td class="text-warning">失败</td> | |
1082 | 1111 | |
1083 | 1112 | <td> |
1084 | 1113 | <button type="button" class="btn btn-success btn_info">查看详情</button> |
... | ... | @@ -1090,10 +1119,61 @@ test_add_specialty_02 (test_02_system_management.Test02Specialty)銵> |
1090 | 1119 | <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all"> |
1091 | 1120 | |
1092 | 1121 | |
1093 | - <pre>用例入参:{'name': 'py专业21:35:17_3', 'code': 'py_code21:35:17_3', 'departmentId': '1597509163577825282', 'category': 'science'} | |
1122 | + <pre>用例入参:{'name': 'py专业23:11:01_3', 'code': 'py_code23:11:01_3', 'departmentId': '1605581603290345473', 'category': 'science'} | |
1094 | 1123 | 预期结果: {'msg': '院系不存在', 'code': 500, 'data': None} |
1095 | -实际结果: {'msg': '院系不存在', 'code': 500, 'data': None} | |
1096 | -test_add_specialty_03 (test_02_system_management.Test02Specialty)执行——>【通过】 | |
1124 | +实际结果: {'msg': 'success', 'code': 200, 'data': True} | |
1125 | +test_add_specialty_03 (test_02_system_management.Test02Specialty)执行——>【失败】 | |
1126 | +</pre> | |
1127 | + | |
1128 | + | |
1129 | + <pre>Traceback (most recent call last): | |
1130 | +</pre> | |
1131 | + | |
1132 | + | |
1133 | + <pre> File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py", line 59, in testPartExecutor | |
1134 | + yield | |
1135 | +</pre> | |
1136 | + | |
1137 | + | |
1138 | + <pre> File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py", line 615, in run | |
1139 | + testMethod() | |
1140 | +</pre> | |
1141 | + | |
1142 | + | |
1143 | + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/common/myddt.py", line 145, in wrapper | |
1144 | + return func(self, *args, **kwargs) | |
1145 | +</pre> | |
1146 | + | |
1147 | + | |
1148 | + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 203, in test_add_specialty | |
1149 | + raise e | |
1150 | +</pre> | |
1151 | + | |
1152 | + | |
1153 | + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 197, in test_add_specialty | |
1154 | + self.assertEqual(expected["msg"], res["msg"]) | |
1155 | +</pre> | |
1156 | + | |
1157 | + | |
1158 | + <pre> File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py", line 839, in assertEqual | |
1159 | + assertion_func(first, second, msg=msg) | |
1160 | +</pre> | |
1161 | + | |
1162 | + | |
1163 | + <pre> File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py", line 1220, in assertMultiLineEqual | |
1164 | + self.fail(self._formatMessage(msg, standardMsg)) | |
1165 | +</pre> | |
1166 | + | |
1167 | + | |
1168 | + <pre> File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py", line 680, in fail | |
1169 | + raise self.failureException(msg) | |
1170 | +</pre> | |
1171 | + | |
1172 | + | |
1173 | + <pre>AssertionError: '院系不存在' != 'success' | |
1174 | +- 院系不存在 | |
1175 | ++ success | |
1176 | + | |
1097 | 1177 | </pre> |
1098 | 1178 | |
1099 | 1179 | |
... | ... | @@ -1101,11 +1181,11 @@ test_add_specialty_03 (test_02_system_management.Test02Specialty)銵> |
1101 | 1181 | </tr> |
1102 | 1182 | |
1103 | 1183 | <tr> |
1104 | - <td>16</td> | |
1184 | + <td>17</td> | |
1105 | 1185 | <td class="Test02Specialty">Test02Specialty</td> |
1106 | 1186 | <td>test_add_specialty_04</td> |
1107 | 1187 | <td>新增专业失败,专业名称未填写</td> |
1108 | - <td>0.189s</td> | |
1188 | + <td>0.804s</td> | |
1109 | 1189 | |
1110 | 1190 | <td class="text-warning">失败</td> |
1111 | 1191 | |
... | ... | @@ -1119,7 +1199,7 @@ test_add_specialty_03 (test_02_system_management.Test02Specialty)銵> |
1119 | 1199 | <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all"> |
1120 | 1200 | |
1121 | 1201 | |
1122 | - <pre>用例入参:{'name': '', 'code': 'py_code21:35:18_4', 'departmentId': '1597509063577825282', 'category': 'science'} | |
1202 | + <pre>用例入参:{'name': '', 'code': 'py_code23:11:02_4', 'departmentId': '1605581603290345473', 'category': 'science'} | |
1123 | 1203 | 预期结果: {'msg': '专业名称未填写', 'code': 500, 'data': None} |
1124 | 1204 | 实际结果: {'msg': 'size must be between 1 and 30', 'code': 500, 'data': None} |
1125 | 1205 | test_add_specialty_04 (test_02_system_management.Test02Specialty)执行——>【失败】 |
... | ... | @@ -1145,12 +1225,12 @@ test_add_specialty_04 (test_02_system_management.Test02Specialty)銵> |
1145 | 1225 | </pre> |
1146 | 1226 | |
1147 | 1227 | |
1148 | - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 146, in test_add_specialty | |
1228 | + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 203, in test_add_specialty | |
1149 | 1229 | raise e |
1150 | 1230 | </pre> |
1151 | 1231 | |
1152 | 1232 | |
1153 | - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 140, in test_add_specialty | |
1233 | + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 197, in test_add_specialty | |
1154 | 1234 | self.assertEqual(expected["msg"], res["msg"]) |
1155 | 1235 | </pre> |
1156 | 1236 | |
... | ... | @@ -1181,11 +1261,11 @@ test_add_specialty_04 (test_02_system_management.Test02Specialty)銵> |
1181 | 1261 | </tr> |
1182 | 1262 | |
1183 | 1263 | <tr> |
1184 | - <td>17</td> | |
1264 | + <td>18</td> | |
1185 | 1265 | <td class="Test02Specialty">Test02Specialty</td> |
1186 | 1266 | <td>test_add_specialty_05</td> |
1187 | 1267 | <td>新增专业失败,专业名称长度不能大于30</td> |
1188 | - <td>0.228s</td> | |
1268 | + <td>0.948s</td> | |
1189 | 1269 | |
1190 | 1270 | <td class="text-warning">失败</td> |
1191 | 1271 | |
... | ... | @@ -1199,7 +1279,7 @@ test_add_specialty_04 (test_02_system_management.Test02Specialty)銵> |
1199 | 1279 | <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all"> |
1200 | 1280 | |
1201 | 1281 | |
1202 | - <pre>用例入参:{'name': '专业大于301234567890专业大于301234567890', 'code': 'py_code21:35:18_5', 'departmentId': '1597509063577825282', 'category': 'science'} | |
1282 | + <pre>用例入参:{'name': '专业大于301234567890专业大于301234567890', 'code': 'py_code23:11:03_5', 'departmentId': '1605581603290345473', 'category': 'science'} | |
1203 | 1283 | 预期结果: {'msg': '专业名称不能大于30', 'code': 500, 'data': None} |
1204 | 1284 | 实际结果: {'msg': 'size must be between 1 and 30', 'code': 500, 'data': None} |
1205 | 1285 | test_add_specialty_05 (test_02_system_management.Test02Specialty)执行——>【失败】 |
... | ... | @@ -1225,12 +1305,12 @@ test_add_specialty_05 (test_02_system_management.Test02Specialty)銵> |
1225 | 1305 | </pre> |
1226 | 1306 | |
1227 | 1307 | |
1228 | - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 146, in test_add_specialty | |
1308 | + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 203, in test_add_specialty | |
1229 | 1309 | raise e |
1230 | 1310 | </pre> |
1231 | 1311 | |
1232 | 1312 | |
1233 | - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 140, in test_add_specialty | |
1313 | + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 197, in test_add_specialty | |
1234 | 1314 | self.assertEqual(expected["msg"], res["msg"]) |
1235 | 1315 | </pre> |
1236 | 1316 | |
... | ... | @@ -1261,11 +1341,11 @@ test_add_specialty_05 (test_02_system_management.Test02Specialty)銵> |
1261 | 1341 | </tr> |
1262 | 1342 | |
1263 | 1343 | <tr> |
1264 | - <td>18</td> | |
1344 | + <td>19</td> | |
1265 | 1345 | <td class="Test02Specialty">Test02Specialty</td> |
1266 | 1346 | <td>test_add_specialty_06</td> |
1267 | 1347 | <td>新增专业失败,专业名称重复</td> |
1268 | - <td>0.217s</td> | |
1348 | + <td>1.01s</td> | |
1269 | 1349 | |
1270 | 1350 | <td class="text-success">成功</td> |
1271 | 1351 | |
... | ... | @@ -1279,7 +1359,7 @@ test_add_specialty_05 (test_02_system_management.Test02Specialty)銵> |
1279 | 1359 | <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all"> |
1280 | 1360 | |
1281 | 1361 | |
1282 | - <pre>用例入参:{'name': '第二个专业-2-1', 'code': 'py_code21:35:18_6', 'departmentId': '1597509063577825282', 'category': 'science'} | |
1362 | + <pre>用例入参:{'name': '第二个专业-2-1', 'code': 'py_code23:11:04_6', 'departmentId': '1605581603290345473', 'category': 'science'} | |
1283 | 1363 | 预期结果: {'msg': '专业名称已存在,请确认', 'code': 500, 'data': None} |
1284 | 1364 | 实际结果: {'msg': '专业名称已存在,请确认', 'code': 500, 'data': None} |
1285 | 1365 | test_add_specialty_06 (test_02_system_management.Test02Specialty)执行——>【通过】 |
... | ... | @@ -1290,11 +1370,11 @@ test_add_specialty_06 (test_02_system_management.Test02Specialty)銵> |
1290 | 1370 | </tr> |
1291 | 1371 | |
1292 | 1372 | <tr> |
1293 | - <td>19</td> | |
1373 | + <td>20</td> | |
1294 | 1374 | <td class="Test02Specialty">Test02Specialty</td> |
1295 | 1375 | <td>test_add_specialty_07</td> |
1296 | 1376 | <td>新增专业失败,专业代码未填写</td> |
1297 | - <td>0.193s</td> | |
1377 | + <td>0.936s</td> | |
1298 | 1378 | |
1299 | 1379 | <td class="text-warning">失败</td> |
1300 | 1380 | |
... | ... | @@ -1308,7 +1388,7 @@ test_add_specialty_06 (test_02_system_management.Test02Specialty)銵> |
1308 | 1388 | <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all"> |
1309 | 1389 | |
1310 | 1390 | |
1311 | - <pre>用例入参:{'name': 'py专业21:35:18_7', 'code': '', 'departmentId': '1597509063577825282', 'category': 'science'} | |
1391 | + <pre>用例入参:{'name': 'py专业23:11:05_7', 'code': '', 'departmentId': '1605581603290345473', 'category': 'science'} | |
1312 | 1392 | 预期结果: {'msg': '专业代码不能为空', 'code': 500, 'data': None} |
1313 | 1393 | 实际结果: {'msg': 'size must be between 1 and 30', 'code': 500, 'data': None} |
1314 | 1394 | test_add_specialty_07 (test_02_system_management.Test02Specialty)执行——>【失败】 |
... | ... | @@ -1334,12 +1414,12 @@ test_add_specialty_07 (test_02_system_management.Test02Specialty)銵> |
1334 | 1414 | </pre> |
1335 | 1415 | |
1336 | 1416 | |
1337 | - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 146, in test_add_specialty | |
1417 | + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 203, in test_add_specialty | |
1338 | 1418 | raise e |
1339 | 1419 | </pre> |
1340 | 1420 | |
1341 | 1421 | |
1342 | - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 140, in test_add_specialty | |
1422 | + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 197, in test_add_specialty | |
1343 | 1423 | self.assertEqual(expected["msg"], res["msg"]) |
1344 | 1424 | </pre> |
1345 | 1425 | |
... | ... | @@ -1370,11 +1450,11 @@ test_add_specialty_07 (test_02_system_management.Test02Specialty)銵> |
1370 | 1450 | </tr> |
1371 | 1451 | |
1372 | 1452 | <tr> |
1373 | - <td>20</td> | |
1453 | + <td>21</td> | |
1374 | 1454 | <td class="Test02Specialty">Test02Specialty</td> |
1375 | 1455 | <td>test_add_specialty_08</td> |
1376 | 1456 | <td>新增专业失败,专业代码长度不能大于30</td> |
1377 | - <td>0.223s</td> | |
1457 | + <td>0.887s</td> | |
1378 | 1458 | |
1379 | 1459 | <td class="text-warning">失败</td> |
1380 | 1460 | |
... | ... | @@ -1388,7 +1468,7 @@ test_add_specialty_07 (test_02_system_management.Test02Specialty)銵> |
1388 | 1468 | <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all"> |
1389 | 1469 | |
1390 | 1470 | |
1391 | - <pre>用例入参:{'name': 'py专业21:35:18_8', 'code': '专业代码大于301234567890专业大于301234567890', 'departmentId': '1597509063577825282', 'category': 'science'} | |
1471 | + <pre>用例入参:{'name': 'py专业23:11:06_8', 'code': '专业代码大于301234567890专业大于301234567890', 'departmentId': '1605581603290345473', 'category': 'science'} | |
1392 | 1472 | 预期结果: {'msg': '专业代码不能大于30', 'code': 500, 'data': None} |
1393 | 1473 | 实际结果: {'msg': 'size must be between 1 and 30', 'code': 500, 'data': None} |
1394 | 1474 | test_add_specialty_08 (test_02_system_management.Test02Specialty)执行——>【失败】 |
... | ... | @@ -1414,12 +1494,12 @@ test_add_specialty_08 (test_02_system_management.Test02Specialty)銵> |
1414 | 1494 | </pre> |
1415 | 1495 | |
1416 | 1496 | |
1417 | - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 146, in test_add_specialty | |
1497 | + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 203, in test_add_specialty | |
1418 | 1498 | raise e |
1419 | 1499 | </pre> |
1420 | 1500 | |
1421 | 1501 | |
1422 | - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 140, in test_add_specialty | |
1502 | + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 197, in test_add_specialty | |
1423 | 1503 | self.assertEqual(expected["msg"], res["msg"]) |
1424 | 1504 | </pre> |
1425 | 1505 | |
... | ... | @@ -1450,11 +1530,11 @@ test_add_specialty_08 (test_02_system_management.Test02Specialty)銵> |
1450 | 1530 | </tr> |
1451 | 1531 | |
1452 | 1532 | <tr> |
1453 | - <td>21</td> | |
1533 | + <td>22</td> | |
1454 | 1534 | <td class="Test02Specialty">Test02Specialty</td> |
1455 | 1535 | <td>test_add_specialty_09</td> |
1456 | 1536 | <td>新增专业失败,学科门类未填写</td> |
1457 | - <td>0.222s</td> | |
1537 | + <td>0.873s</td> | |
1458 | 1538 | |
1459 | 1539 | <td class="text-warning">失败</td> |
1460 | 1540 | |
... | ... | @@ -1468,7 +1548,7 @@ test_add_specialty_08 (test_02_system_management.Test02Specialty)銵> |
1468 | 1548 | <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all"> |
1469 | 1549 | |
1470 | 1550 | |
1471 | - <pre>用例入参:{'name': 'py专业21:35:19_9', 'code': 'py_code21:35:19_9', 'departmentId': '1597509063577825282', 'category': ''} | |
1551 | + <pre>用例入参:{'name': 'py专业23:11:07_9', 'code': 'py_code23:11:07_9', 'departmentId': '1605581603290345473', 'category': ''} | |
1472 | 1552 | 预期结果: {'msg': '学科门类不能为空', 'code': 500, 'data': None} |
1473 | 1553 | 实际结果: {'msg': 'success', 'code': 200, 'data': True} |
1474 | 1554 | test_add_specialty_09 (test_02_system_management.Test02Specialty)执行——>【失败】 |
... | ... | @@ -1494,12 +1574,12 @@ test_add_specialty_09 (test_02_system_management.Test02Specialty)銵> |
1494 | 1574 | </pre> |
1495 | 1575 | |
1496 | 1576 | |
1497 | - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 146, in test_add_specialty | |
1577 | + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 203, in test_add_specialty | |
1498 | 1578 | raise e |
1499 | 1579 | </pre> |
1500 | 1580 | |
1501 | 1581 | |
1502 | - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 140, in test_add_specialty | |
1582 | + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 197, in test_add_specialty | |
1503 | 1583 | self.assertEqual(expected["msg"], res["msg"]) |
1504 | 1584 | </pre> |
1505 | 1585 | |
... | ... | @@ -1530,11 +1610,11 @@ test_add_specialty_09 (test_02_system_management.Test02Specialty)銵> |
1530 | 1610 | </tr> |
1531 | 1611 | |
1532 | 1612 | <tr> |
1533 | - <td>22</td> | |
1613 | + <td>23</td> | |
1534 | 1614 | <td class="Test02Specialty">Test02Specialty</td> |
1535 | 1615 | <td>test_add_specialty_10</td> |
1536 | 1616 | <td>新增专业失败,学科门类填写错误</td> |
1537 | - <td>0.243s</td> | |
1617 | + <td>0.88s</td> | |
1538 | 1618 | |
1539 | 1619 | <td class="text-warning">失败</td> |
1540 | 1620 | |
... | ... | @@ -1548,7 +1628,7 @@ test_add_specialty_09 (test_02_system_management.Test02Specialty)銵> |
1548 | 1628 | <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all"> |
1549 | 1629 | |
1550 | 1630 | |
1551 | - <pre>用例入参:{'name': 'py专业21:35:19_10', 'code': 'py_code21:35:19_10', 'departmentId': '1597509063577825282', 'category': 'scienwce'} | |
1631 | + <pre>用例入参:{'name': 'py专业23:11:08_10', 'code': 'py_code23:11:08_10', 'departmentId': '1605581603290345473', 'category': 'scienwce'} | |
1552 | 1632 | 预期结果: {'msg': '学科门类不存在', 'code': 500, 'data': None} |
1553 | 1633 | 实际结果: {'msg': 'success', 'code': 200, 'data': True} |
1554 | 1634 | test_add_specialty_10 (test_02_system_management.Test02Specialty)执行——>【失败】 |
... | ... | @@ -1574,12 +1654,12 @@ test_add_specialty_10 (test_02_system_management.Test02Specialty)銵> |
1574 | 1654 | </pre> |
1575 | 1655 | |
1576 | 1656 | |
1577 | - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 146, in test_add_specialty | |
1657 | + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 203, in test_add_specialty | |
1578 | 1658 | raise e |
1579 | 1659 | </pre> |
1580 | 1660 | |
1581 | 1661 | |
1582 | - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 140, in test_add_specialty | |
1662 | + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 197, in test_add_specialty | |
1583 | 1663 | self.assertEqual(expected["msg"], res["msg"]) |
1584 | 1664 | </pre> |
1585 | 1665 | |
... | ... | @@ -1610,11 +1690,11 @@ test_add_specialty_10 (test_02_system_management.Test02Specialty)銵> |
1610 | 1690 | </tr> |
1611 | 1691 | |
1612 | 1692 | <tr> |
1613 | - <td>23</td> | |
1693 | + <td>24</td> | |
1614 | 1694 | <td class="Test03Year">Test03Year</td> |
1615 | 1695 | <td>test_add_year_1</td> |
1616 | 1696 | <td>新增学年学期成功</td> |
1617 | - <td>0.219s</td> | |
1697 | + <td>0.235s</td> | |
1618 | 1698 | |
1619 | 1699 | <td class="text-success">成功</td> |
1620 | 1700 | |
... | ... | @@ -1628,7 +1708,7 @@ test_add_specialty_10 (test_02_system_management.Test02Specialty)銵> |
1628 | 1708 | <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all"> |
1629 | 1709 | |
1630 | 1710 | |
1631 | - <pre>用例入参:{'year': 'py学年21:35:20_1', 'remark': 'py_comment备注21:35:20_1', 'terms': [{'sort': 1, 'startTime': 1667376499000, 'endTime': 1704115459000}]} | |
1711 | + <pre>用例入参:{'year': 'py学年23:11:09_1', 'remark': 'py_comment备注23:11:09_1', 'terms': [{'sort': 1, 'startTime': 1667376499000, 'endTime': 1704115459000}]} | |
1632 | 1712 | 预期结果: {'msg': 'success', 'code': 200, 'data': True} |
1633 | 1713 | 实际结果: {'msg': 'success', 'code': 200, 'data': True} |
1634 | 1714 | test_add_year_1 (test_02_system_management.Test03Year)执行——>【通过】 |
... | ... | @@ -1639,11 +1719,11 @@ test_add_year_1 (test_02_system_management.Test03Year)銵> |
1639 | 1719 | </tr> |
1640 | 1720 | |
1641 | 1721 | <tr> |
1642 | - <td>24</td> | |
1722 | + <td>25</td> | |
1643 | 1723 | <td class="Test03Year">Test03Year</td> |
1644 | 1724 | <td>test_add_year_2</td> |
1645 | 1725 | <td>学年学期开始时间和结束时间不可交叉</td> |
1646 | - <td>0.227s</td> | |
1726 | + <td>0.233s</td> | |
1647 | 1727 | |
1648 | 1728 | <td class="text-warning">失败</td> |
1649 | 1729 | |
... | ... | @@ -1657,7 +1737,7 @@ test_add_year_1 (test_02_system_management.Test03Year)銵> |
1657 | 1737 | <td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all"> |
1658 | 1738 | |
1659 | 1739 | |
1660 | - <pre>用例入参:{'year': 'py学年21:35:20_2', 'remark': 'py_comment备注21:35:20_2', 'terms': [{'sort': 1, 'startTime': 1667376499000, 'endTime': 1704115459000}, {'sort': 2, 'startTime': 1667376499000, 'endTime': 1704115459000}]} | |
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}]} | |
1661 | 1741 | 预期结果: {'msg': '学期起止时间不能交叉', 'code': 500, 'data': None} |
1662 | 1742 | 实际结果: {'msg': 'success', 'code': 200, 'data': True} |
1663 | 1743 | test_add_year_2 (test_02_system_management.Test03Year)执行——>【失败】 |
... | ... | @@ -1683,12 +1763,12 @@ test_add_year_2 (test_02_system_management.Test03Year)銵>仃韐乓 |
1683 | 1763 | </pre> |
1684 | 1764 | |
1685 | 1765 | |
1686 | - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 205, in test_add_year | |
1766 | + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 265, in test_add_year | |
1687 | 1767 | raise e |
1688 | 1768 | </pre> |
1689 | 1769 | |
1690 | 1770 | |
1691 | - <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 199, in test_add_year | |
1771 | + <pre> File "/Users/shitou/工作/code/work/workAi/yxly/testcase/test_02_system_management.py", line 259, in test_add_year | |
1692 | 1772 | self.assertEqual(expected["msg"], res["msg"]) |
1693 | 1773 | </pre> |
1694 | 1774 | |
... | ... | @@ -1844,7 +1924,7 @@ test_add_year_2 (test_02_system_management.Test03Year)銵>仃韐乓 |
1844 | 1924 | }, |
1845 | 1925 | data: [ |
1846 | 1926 | {value: 9, name: '通过'}, |
1847 | - {value: 15, name: '失败'}, | |
1927 | + {value: 16, name: '失败'}, | |
1848 | 1928 | {value: 0, name: '错误'}, |
1849 | 1929 | {value: 0, name: '跳过'} |
1850 | 1930 | ] |
... | ... | @@ -1865,8 +1945,8 @@ test_add_year_2 (test_02_system_management.Test03Year)銵>仃韐乓 |
1865 | 1945 | { |
1866 | 1946 | name: '测试结果', |
1867 | 1947 | type: 'gauge', |
1868 | - detail: {formatter: '37.50%'}, | |
1869 | - data: [{value: '37.50', name: '用例通过率'}], | |
1948 | + detail: {formatter: '36.00%'}, | |
1949 | + data: [{value: '36.00', name: '用例通过率'}], | |
1870 | 1950 | axisLine: { |
1871 | 1951 | lineStyle: { |
1872 | 1952 | color: [ | ... | ... |
... | ... | @@ -33,6 +33,7 @@ runner.run() |
33 | 33 | """ |
34 | 34 | 发送邮件 |
35 | 35 | """ |
36 | +""" | |
36 | 37 | # QQ邮箱SMTP服务器地址为“smtp.qq.com” |
37 | 38 | # 163邮箱smtp.163.com 465 |
38 | 39 | # 阿里云smtp.qiye.aliyun.com 465 |
... | ... | @@ -42,3 +43,4 @@ runner.send_email(host="smtp.qiye.aliyun.com", |
42 | 43 | password="mKh50p89DqvqJ7pd", |
43 | 44 | to_addrs=["1171621168@qq.com", "1109927930@qq.com", "shishut@workai.com.cn"] |
44 | 45 | ) |
46 | +""" | ... | ... |
... | ... | @@ -19,19 +19,24 @@ 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 | - | |
22 | +from tools.fixture import SystemManagement | |
23 | +from jsonpath import jsonpath | |
23 | 24 | |
24 | 25 | # 系统管理相关的用例目录 |
25 | 26 | System_path = os.path.join(DataExcel_Path, "system") |
26 | 27 | |
27 | 28 | |
28 | -# 院系相关的用例 | |
29 | +# ==================院系相关的用例================== | |
29 | 30 | @myddt.ddt |
30 | 31 | class Test01Department(unittest.TestCase): |
31 | 32 | """院系""" |
33 | + # 新增院系用例 | |
34 | + open_add_excel = Excel(os.path.join(System_path, "test_02_department.xlsx"), "add_department") | |
35 | + test_add_case = open_add_excel.read_excel() | |
32 | 36 | |
33 | - open_excel = Excel(os.path.join(System_path, "test_02_department.xlsx"), "add_department") | |
34 | - test_case = open_excel.read_excel() | |
37 | + # 查看院系用例 | |
38 | + open_select_excel = Excel(os.path.join(System_path, "test_02_department.xlsx"), "select_department") | |
39 | + test_select_case = open_select_excel.read_excel() | |
35 | 40 | |
36 | 41 | @classmethod |
37 | 42 | def setUpClass(cls): |
... | ... | @@ -50,7 +55,10 @@ class Test01Department(unittest.TestCase): |
50 | 55 | # 随机院系代码 |
51 | 56 | self.department_code = "py_code" + new_time |
52 | 57 | |
53 | - @myddt.data(*test_case) | |
58 | + # ==================================================================== | |
59 | + # 新增院系 | |
60 | + # ==================================================================== | |
61 | + @myddt.data(*test_add_case) | |
54 | 62 | def test_add_department(self, case): |
55 | 63 | """新增院系""" |
56 | 64 | url = conf.get("url", "url_ip") + case['url'] |
... | ... | @@ -78,19 +86,59 @@ class Test01Department(unittest.TestCase): |
78 | 86 | self.assertEqual(expected['code'], res['code']) |
79 | 87 | except AssertionError as e: |
80 | 88 | # 写入Excel |
81 | - self.open_excel.write_excel(row=case["id"] + 1, column=7, value="不通过") | |
89 | + self.open_add_excel.write_excel(row=case["id"] + 1, column=7, value="不通过") | |
82 | 90 | HandleLog.log.error("用例标题{},不通过".format(case['title'])) |
83 | 91 | HandleLog.log.exception(e) |
84 | 92 | raise e |
85 | 93 | else: |
86 | - self.open_excel.write_excel(row=case["id"] + 1, column=7, value="通过") | |
94 | + self.open_add_excel.write_excel(row=case["id"] + 1, column=7, value="通过") | |
87 | 95 | # 将创建使用的数据写入到excel表格中 |
88 | - self.open_excel.write_excel(row=case["id"] + 1, column=9, | |
89 | - value=case["data"]) | |
96 | + self.open_add_excel.write_excel(row=case["id"] + 1, column=9, | |
97 | + value=case["data"]) | |
90 | 98 | HandleLog.log.info("用例{},执行通过".format(case["title"])) |
91 | 99 | |
100 | + # ==================================================================== | |
101 | + # 查看院系 | |
102 | + # ==================================================================== | |
103 | + @myddt.data(*test_select_case) | |
104 | + def test_select_department(self, select_case): | |
105 | + """查看院系""" | |
106 | + url = conf.get("url", "url_ip") + select_case['url'] | |
107 | + # 准备数据 | |
108 | + # -----写入数据 | |
109 | + data = json.loads(select_case['data']) | |
110 | + # -----预期结果 | |
111 | + expected = json.loads(select_case['expected']) | |
112 | + # 调用接口 | |
113 | + # 请求头 | |
114 | + headers = {} | |
115 | + headers["Authorization"] = self.token | |
116 | + response = requests.request(method=select_case['method'], url=url, json=data, headers=headers) | |
117 | + res = response.json() | |
118 | + | |
119 | + print("用例入参:{}".format(data)) | |
120 | + print("预期结果:", expected) | |
121 | + print("实际结果:", res) | |
92 | 122 | |
93 | -# 专业相关的用例 | |
123 | + # 断言 | |
124 | + try: | |
125 | + self.assertEqual(expected['msg'], res['msg']) | |
126 | + self.assertEqual(expected['code'], res['code']) | |
127 | + except AssertionError as e: | |
128 | + # 写入Excel | |
129 | + self.select_excel.write_excel(row=select_case["id"] + 1, column=7, value="不通过") | |
130 | + HandleLog.log.error("用例标题{},不通过".format(select_case['title'])) | |
131 | + HandleLog.log.exception(e) | |
132 | + raise e | |
133 | + else: | |
134 | + self.open_select_excel.write_excel(row=select_case["id"] + 1, column=7, value="通过") | |
135 | + # 将创建使用的数据写入到excel表格中 | |
136 | + self.open_select_excel.write_excel(row=select_case["id"] + 1, column=9, | |
137 | + value=select_case["data"]) | |
138 | + HandleLog.log.info("用例{},执行通过".format(select_case["title"])) | |
139 | + | |
140 | + | |
141 | +# ==================专业相关的用例================== | |
94 | 142 | @myddt.ddt |
95 | 143 | class Test02Specialty(unittest.TestCase): |
96 | 144 | """专业相关的用例""" |
... | ... | @@ -113,15 +161,24 @@ class Test02Specialty(unittest.TestCase): |
113 | 161 | # 随机专业代码 |
114 | 162 | self.specialty_code = "py_code" + new_time |
115 | 163 | |
164 | + # ==================================================================== | |
165 | + # 新增专业 | |
166 | + # ==================================================================== | |
116 | 167 | @myddt.data(*test_data) |
117 | 168 | def test_add_specialty(self, case): |
118 | 169 | """新增专业""" |
119 | 170 | # 准备数据 |
120 | 171 | # --写入数据 |
172 | + # 获取院系id | |
173 | + department_list = SystemManagement.department_list() | |
174 | + department_id = jsonpath(department_list, "$..id")[0] | |
121 | 175 | if "#specialty_name#" in case["data"]: |
122 | 176 | case["data"] = case["data"].replace("#specialty_name#", self.specialty_name + "_" + str(case["id"])) |
123 | 177 | if "#specialty_code#" in case["data"]: |
124 | 178 | case["data"] = case["data"].replace("#specialty_code#", self.specialty_code + "_" + str(case["id"])) |
179 | + | |
180 | + if "#departmentId#" in case["data"]: | |
181 | + case["data"] = case["data"].replace("#departmentId#", department_id) | |
125 | 182 | data = json.loads(case["data"]) |
126 | 183 | # --预期结果 |
127 | 184 | expected = json.loads(case["expected"]) |
... | ... | @@ -149,10 +206,10 @@ class Test02Specialty(unittest.TestCase): |
149 | 206 | HandleLog.log.info("用例{},执行通过".format(case["title"])) |
150 | 207 | |
151 | 208 | |
152 | -# 校历(学年学期)相关的用例---2022 12.15 | |
209 | +# ==================校历(学年学期)相关的用例========2022 12.15 | |
153 | 210 | @myddt.ddt |
154 | 211 | class Test03Year(unittest.TestCase): |
155 | - """校历相关的用例""" | |
212 | + """校历(学年学期)相关的用例""" | |
156 | 213 | open_year_excel = Excel(os.path.join(System_path, "test_04_term.xlsx"), "add_term") |
157 | 214 | test_data = open_year_excel.read_excel() |
158 | 215 | |
... | ... | @@ -172,9 +229,12 @@ class Test03Year(unittest.TestCase): |
172 | 229 | # 随机学年备注 |
173 | 230 | self.year_comment = "py_comment备注" + new_time |
174 | 231 | |
232 | + # ==================================================================== | |
233 | + # 新增学年学期 | |
234 | + # ==================================================================== | |
175 | 235 | @myddt.data(*test_data) |
176 | 236 | def test_add_year(self, case): |
177 | - """新增专业""" | |
237 | + """新增学年学期""" | |
178 | 238 | # 准备数据 |
179 | 239 | # --写入数据 |
180 | 240 | if "#year#" in case["data"]: | ... | ... |
tools/fixture.py
0 → 100644
1 | +# -*- coding: utf-8 -*- | |
2 | +# ====================================== | |
3 | +# @Software: PyCharm | |
4 | +# @Author : Shitou ✊ | |
5 | +# @Time : 2022/12/21 19:38 | |
6 | +# @FileName: fixture.py | |
7 | +# ====================================== | |
8 | +""" | |
9 | +获取数据 | |
10 | +""" | |
11 | + | |
12 | +import requests | |
13 | +from common.handle_config import conf | |
14 | +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" | |
31 | + headers = {} | |
32 | + headers["Authorization"] = LoginToken.login_token() | |
33 | + data = { | |
34 | + "pageNumber": "0", | |
35 | + "pageSize": "3" | |
36 | + } | |
37 | + response = requests.request(url=url, method="get", json=data, headers=headers) | |
38 | + res = response.json() | |
39 | + return res | |
40 | + | |
41 | + | |
42 | +if __name__ == '__main__': | |
43 | + SystemManagement.department_list() | ... | ... |
请
注册
或
登录
后发表评论