Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jk_interface_test
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
huangqiang
jk_interface_test
Commits
db9cc83a
Commit
db9cc83a
authored
Apr 12, 2021
by
huangqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化初始化接口
parent
ed4f4713
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
28 deletions
+22
-28
workspace.xml
.idea/workspace.xml
+11
-23
init_base_api.py
init_base_api.py
+11
-5
No files found.
.idea/workspace.xml
View file @
db9cc83a
...
@@ -20,20 +20,8 @@
...
@@ -20,20 +20,8 @@
</component>
</component>
<component
name=
"ChangeListManager"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"54f4d37d-1724-4813-a1e2-24e200088c5f"
name=
"Default Changelist"
comment=
"增加allure安装包"
>
<list
default=
"true"
id=
"54f4d37d-1724-4813-a1e2-24e200088c5f"
name=
"Default Changelist"
comment=
"增加allure安装包"
>
<change
afterPath=
"$PROJECT_DIR$/script/ji_yun_ying_pc/statistical_report/__init__.py"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/script/ji_yun_ying_pc/statistical_report/conftest.py"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/script/ji_yun_ying_pc/statistical_report/data_config/__init__.py"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/script/ji_yun_ying_pc/statistical_report/data_config/receipt_detail_data.py"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/script/ji_yun_ying_pc/statistical_report/test_receipt_detail.py"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/script/public_asserts_api.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/common/run_method.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/common/run_method.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/init_base_api.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/init_base_api.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/common/verify_method.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/common/verify_method.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/run.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/run.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/script/conftest.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/script/conftest.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/script/db_config.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/script/db_config.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/script/ji_yun_ying_pc/conftest.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/script/ji_yun_ying_pc/conftest.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/script/public_asserts.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/script/public_asserts.py"
afterDir=
"false"
/>
</list>
</list>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
<option
name=
"HIGHLIGHT_CONFLICTS"
value=
"true"
/>
<option
name=
"HIGHLIGHT_CONFLICTS"
value=
"true"
/>
...
@@ -76,7 +64,7 @@
...
@@ -76,7 +64,7 @@
<recent
name=
"$PROJECT_DIR$/script/ji_yun_ying_pc/data_config"
/>
<recent
name=
"$PROJECT_DIR$/script/ji_yun_ying_pc/data_config"
/>
</key>
</key>
</component>
</component>
<component
name=
"RunManager"
selected=
"Python.
run
"
>
<component
name=
"RunManager"
selected=
"Python.
init_base_api
"
>
<configuration
name=
"create_case"
type=
"PythonConfigurationType"
factoryName=
"Python"
temporary=
"true"
nameIsGenerated=
"true"
>
<configuration
name=
"create_case"
type=
"PythonConfigurationType"
factoryName=
"Python"
temporary=
"true"
nameIsGenerated=
"true"
>
<module
name=
"jk_interface_test"
/>
<module
name=
"jk_interface_test"
/>
<option
name=
"INTERPRETER_OPTIONS"
value=
""
/>
<option
name=
"INTERPRETER_OPTIONS"
value=
""
/>
...
@@ -184,9 +172,9 @@
...
@@ -184,9 +172,9 @@
</configuration>
</configuration>
<recent_temporary>
<recent_temporary>
<list>
<list>
<item
itemvalue=
"Python.init_base_api"
/>
<item
itemvalue=
"Python.run"
/>
<item
itemvalue=
"Python.run"
/>
<item
itemvalue=
"Python.create_case"
/>
<item
itemvalue=
"Python.create_case"
/>
<item
itemvalue=
"Python.init_base_api"
/>
<item
itemvalue=
"Python.run_method"
/>
<item
itemvalue=
"Python.run_method"
/>
<item
itemvalue=
"Python.data_config"
/>
<item
itemvalue=
"Python.data_config"
/>
</list>
</list>
...
@@ -248,37 +236,37 @@
...
@@ -248,37 +236,37 @@
<screen
x=
"0"
y=
"23"
width=
"1792"
height=
"1017"
/>
<screen
x=
"0"
y=
"23"
width=
"1792"
height=
"1017"
/>
</state>
</state>
<state
x=
"683"
y=
"296"
key=
"FileChooserDialogImpl/0.23.1792.1017@0.23.1792.1017"
timestamp=
"1611303152470"
/>
<state
x=
"683"
y=
"296"
key=
"FileChooserDialogImpl/0.23.1792.1017@0.23.1792.1017"
timestamp=
"1611303152470"
/>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.bottom"
timestamp=
"161822
1857420
"
>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.bottom"
timestamp=
"161822
3069056
"
>
<screen
x=
"0"
y=
"23"
width=
"1792"
height=
"1009"
/>
<screen
x=
"0"
y=
"23"
width=
"1792"
height=
"1009"
/>
</state>
</state>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.bottom/0.23.1792.1009@0.23.1792.1009"
timestamp=
"161822
1857420
"
/>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.bottom/0.23.1792.1009@0.23.1792.1009"
timestamp=
"161822
3069056
"
/>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.bottom/0.23.1792.1012@0.23.1792.1012"
timestamp=
"1617964714625"
/>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.bottom/0.23.1792.1012@0.23.1792.1012"
timestamp=
"1617964714625"
/>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.bottom/0.23.1792.1015@0.23.1792.1015"
timestamp=
"1617278419626"
/>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.bottom/0.23.1792.1015@0.23.1792.1015"
timestamp=
"1617278419626"
/>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.bottom/0.23.1792.1020@0.23.1792.1020"
timestamp=
"1617161360303"
/>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.bottom/0.23.1792.1020@0.23.1792.1020"
timestamp=
"1617161360303"
/>
<state
width=
"1771"
height=
"322"
key=
"GridCell.Tab.0.bottom/0.23.1792.1024@0.23.1792.1024"
timestamp=
"1617095706598"
/>
<state
width=
"1771"
height=
"322"
key=
"GridCell.Tab.0.bottom/0.23.1792.1024@0.23.1792.1024"
timestamp=
"1617095706598"
/>
<state
width=
"1771"
height=
"322"
key=
"GridCell.Tab.0.bottom/0.23.1792.1026@0.23.1792.1026"
timestamp=
"1617090434843"
/>
<state
width=
"1771"
height=
"322"
key=
"GridCell.Tab.0.bottom/0.23.1792.1026@0.23.1792.1026"
timestamp=
"1617090434843"
/>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.center"
timestamp=
"161822
1857420
"
>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.center"
timestamp=
"161822
3069055
"
>
<screen
x=
"0"
y=
"23"
width=
"1792"
height=
"1009"
/>
<screen
x=
"0"
y=
"23"
width=
"1792"
height=
"1009"
/>
</state>
</state>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.center/0.23.1792.1009@0.23.1792.1009"
timestamp=
"161822
1857420
"
/>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.center/0.23.1792.1009@0.23.1792.1009"
timestamp=
"161822
3069055
"
/>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.center/0.23.1792.1012@0.23.1792.1012"
timestamp=
"1617964714624"
/>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.center/0.23.1792.1012@0.23.1792.1012"
timestamp=
"1617964714624"
/>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.center/0.23.1792.1015@0.23.1792.1015"
timestamp=
"1617278419625"
/>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.center/0.23.1792.1015@0.23.1792.1015"
timestamp=
"1617278419625"
/>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.center/0.23.1792.1020@0.23.1792.1020"
timestamp=
"1617161360303"
/>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.center/0.23.1792.1020@0.23.1792.1020"
timestamp=
"1617161360303"
/>
<state
width=
"1771"
height=
"322"
key=
"GridCell.Tab.0.center/0.23.1792.1024@0.23.1792.1024"
timestamp=
"1617095706597"
/>
<state
width=
"1771"
height=
"322"
key=
"GridCell.Tab.0.center/0.23.1792.1024@0.23.1792.1024"
timestamp=
"1617095706597"
/>
<state
width=
"1771"
height=
"322"
key=
"GridCell.Tab.0.center/0.23.1792.1026@0.23.1792.1026"
timestamp=
"1617090434842"
/>
<state
width=
"1771"
height=
"322"
key=
"GridCell.Tab.0.center/0.23.1792.1026@0.23.1792.1026"
timestamp=
"1617090434842"
/>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.left"
timestamp=
"161822
1857419
"
>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.left"
timestamp=
"161822
3069055
"
>
<screen
x=
"0"
y=
"23"
width=
"1792"
height=
"1009"
/>
<screen
x=
"0"
y=
"23"
width=
"1792"
height=
"1009"
/>
</state>
</state>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.left/0.23.1792.1009@0.23.1792.1009"
timestamp=
"161822
1857419
"
/>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.left/0.23.1792.1009@0.23.1792.1009"
timestamp=
"161822
3069055
"
/>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.left/0.23.1792.1012@0.23.1792.1012"
timestamp=
"1617964714624"
/>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.left/0.23.1792.1012@0.23.1792.1012"
timestamp=
"1617964714624"
/>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.left/0.23.1792.1015@0.23.1792.1015"
timestamp=
"1617278419624"
/>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.left/0.23.1792.1015@0.23.1792.1015"
timestamp=
"1617278419624"
/>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.left/0.23.1792.1020@0.23.1792.1020"
timestamp=
"1617161360302"
/>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.left/0.23.1792.1020@0.23.1792.1020"
timestamp=
"1617161360302"
/>
<state
width=
"1771"
height=
"322"
key=
"GridCell.Tab.0.left/0.23.1792.1024@0.23.1792.1024"
timestamp=
"1617095706585"
/>
<state
width=
"1771"
height=
"322"
key=
"GridCell.Tab.0.left/0.23.1792.1024@0.23.1792.1024"
timestamp=
"1617095706585"
/>
<state
width=
"1771"
height=
"322"
key=
"GridCell.Tab.0.left/0.23.1792.1026@0.23.1792.1026"
timestamp=
"1617090434842"
/>
<state
width=
"1771"
height=
"322"
key=
"GridCell.Tab.0.left/0.23.1792.1026@0.23.1792.1026"
timestamp=
"1617090434842"
/>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.right"
timestamp=
"161822
1857420
"
>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.right"
timestamp=
"161822
3069056
"
>
<screen
x=
"0"
y=
"23"
width=
"1792"
height=
"1009"
/>
<screen
x=
"0"
y=
"23"
width=
"1792"
height=
"1009"
/>
</state>
</state>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.right/0.23.1792.1009@0.23.1792.1009"
timestamp=
"161822
1857420
"
/>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.right/0.23.1792.1009@0.23.1792.1009"
timestamp=
"161822
3069056
"
/>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.right/0.23.1792.1012@0.23.1792.1012"
timestamp=
"1617964714625"
/>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.right/0.23.1792.1012@0.23.1792.1012"
timestamp=
"1617964714625"
/>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.right/0.23.1792.1015@0.23.1792.1015"
timestamp=
"1617278419625"
/>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.right/0.23.1792.1015@0.23.1792.1015"
timestamp=
"1617278419625"
/>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.right/0.23.1792.1020@0.23.1792.1020"
timestamp=
"1617161360303"
/>
<state
width=
"1771"
height=
"319"
key=
"GridCell.Tab.0.right/0.23.1792.1020@0.23.1792.1020"
timestamp=
"1617161360303"
/>
...
...
init_base_api.py
View file @
db9cc83a
...
@@ -15,7 +15,7 @@ def query_sql(database_config, sql_str):
...
@@ -15,7 +15,7 @@ def query_sql(database_config, sql_str):
return
results
return
results
def
get_base_apis
():
def
get_base_apis
(
is_filter
=
True
):
config
=
{
config
=
{
'database'
:
'edu-admin'
,
'database'
:
'edu-admin'
,
"user"
:
'read_user'
,
"user"
:
'read_user'
,
...
@@ -32,8 +32,10 @@ def get_base_apis():
...
@@ -32,8 +32,10 @@ def get_base_apis():
"path_params"
:
get_path_params
(
x
[
2
]),
"path_params"
:
get_path_params
(
x
[
2
]),
"http_method"
:
x
[
3
],
"http_method"
:
x
[
3
],
"method_name"
:
x
[
2
]
.
replace
(
"{"
,
""
)
.
replace
(
"}"
,
""
)
.
replace
(
"-"
,
"_"
)
.
replace
(
"/"
,
"_"
)[
1
:]
+
"_"
+
x
[
3
]
.
lower
(),
"method_name"
:
x
[
2
]
.
replace
(
"{"
,
""
)
.
replace
(
"}"
,
""
)
.
replace
(
"-"
,
"_"
)
.
replace
(
"/"
,
"_"
)[
1
:]
+
"_"
+
x
[
3
]
.
lower
(),
"file_name"
:
x
[
2
]
.
replace
(
"-"
,
"_"
)[
1
:]
.
split
(
"/"
)[
0
]
+
".py"
"file_name"
:
x
[
2
]
.
replace
(
"-"
,
"_"
)[
1
:]
.
split
(
"/"
)[
0
]
+
"
temp
.py"
}
for
x
in
query_result
]
}
for
x
in
query_result
]
if
is_filter
:
base_apis
=
[
x
for
x
in
base_apis
if
x
.
get
(
"method_name"
)
not
in
get_current_method
()]
return
base_apis
return
base_apis
...
@@ -187,5 +189,10 @@ import allure
...
@@ -187,5 +189,10 @@ import allure
"""
"""
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
create_all
(
get_base_apis
())
base_apis
=
get_base_apis
()
# get_current_method()
print
(
"新接口"
,
base_apis
)
\ No newline at end of file
x
=
input
(
"是否创建:"
)
if
x
==
"是"
and
base_apis
:
create_all
(
base_apis
)
else
:
print
(
"取消创建"
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment