作者 bianxinhua

add README

... ... @@ -2,36 +2,11 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="d6814b48-28ec-40b6-bcea-dcd9b8613715" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.env" beforeDir="false" afterPath="$PROJECT_DIR$/.env" afterDir="false" />
<change beforePath="$PROJECT_DIR$/api/m_api/m_admin_api.yml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/api/m_api/m_admin_detail_api.yml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/api/m_api/m_admin_forbidden_api.yml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/api/m_api/m_admin_list_api.yml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/api/m_api/m_admin_update(edit)_api.yml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/api/m_api/m_admin_update(new)_api.yml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/api/m_api/admin/m_admin_list_api.yml" beforeDir="false" afterPath="$PROJECT_DIR$/api/m_api/admin/m_admin_list_api.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/config/m_accessToken.csv" beforeDir="false" afterPath="$PROJECT_DIR$/config/m_accessToken.csv" afterDir="false" />
<change beforePath="$PROJECT_DIR$/debugtalk.py" beforeDir="false" afterPath="$PROJECT_DIR$/debugtalk.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/reports/20200703T160428.653066.html" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/reports/20200703T161235.039886.html" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/reports/20200704T145321.546364.html" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/reports/20200704T145529.449679.html" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/reports/20200704T145733.571779.html" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/reports/20200704T145908.560212.html" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/reports/20200704T150102.221713.html" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/reports/20200704T150127.659168.html" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/reports/20200704T150155.521761.html" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/reports/20200705T040834.224819.html" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/reports/20200705T040842.461290.html" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/reports/20200705T042603.456831.html" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/reports/20200705T042607.405057.html" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/reports/20200705T043106.738178.html" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/reports/20200705T043225.004655.html" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/reports/20200705T043304.280901.html" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/reports/20200705T043951.319183.html" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/testcases/m_admin_login_testcases.yml" beforeDir="false" afterPath="$PROJECT_DIR$/testcases/m_admin_login_testcases.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/testcases/m_partners_login_testcases.yml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/testsuites/demo_testsuite.yml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/venv/pip-selfcheck.json" beforeDir="false" afterPath="$PROJECT_DIR$/venv/pip-selfcheck.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/helpfunc/db_pg_func.py" beforeDir="false" afterPath="$PROJECT_DIR$/helpfunc/db_pg_func.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/testsuites/partner_testsuite.yml" beforeDir="false" afterPath="$PROJECT_DIR$/testsuites/partner_testsuite.yml" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
... ... @@ -48,8 +23,8 @@
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/debugtalk.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="770">
<caret line="35" lean-forward="true" selection-start-line="35" selection-end-line="35" />
<state relative-caret-position="273">
<caret line="31" column="32" selection-start-line="31" selection-start-column="32" selection-end-line="31" selection-end-column="32" />
<folding>
<element signature="e#0#13#0" expanded="true" />
</folding>
... ... @@ -57,38 +32,38 @@
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/helpfunc/db_pg_func.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="459">
<caret line="45" lean-forward="true" selection-start-line="45" selection-end-line="45" />
<state relative-caret-position="63">
<caret line="21" column="53" selection-start-line="21" selection-start-column="53" selection-end-line="21" selection-end-column="53" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/api/m_api/admin/m_admin_update(edit)_api.yml">
<entry file="file://$PROJECT_DIR$/api/m_api/admin/m_admin_list_api.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="151">
<caret line="20" column="8" selection-start-line="20" selection-start-column="8" selection-end-line="20" selection-end-column="8" />
<state relative-caret-position="239">
<caret line="24" column="8" selection-start-line="24" selection-start-column="8" selection-end-line="24" selection-end-column="8" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/testcases/admin/ADMIN002_edit_admin_testcases.yml">
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/testcases/admin/ADMIN003_list_admin_testcases.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-44">
<caret line="1" column="12" selection-start-line="1" selection-start-column="12" selection-end-line="1" selection-end-column="12" />
<state relative-caret-position="22">
<caret line="13" column="46" selection-start-line="13" selection-start-column="46" selection-end-line="13" selection-end-column="46" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/helpfunc/login_func.py">
<entry file="file://$PROJECT_DIR$/api/m_api/admin/m_admin_update(edit)_api.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="396">
<caret line="18" column="23" selection-start-line="10" selection-start-column="4" selection-end-line="18" selection-end-column="23" />
<state relative-caret-position="374">
<caret line="17" selection-start-line="17" selection-end-line="20" selection-end-column="8" />
</state>
</provider>
</entry>
... ... @@ -96,17 +71,8 @@
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/testsuites/partner_testsuite.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="211">
<caret line="18" column="9" selection-start-line="18" selection-start-column="9" selection-end-line="19" selection-end-column="42" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/.env">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="154">
<caret line="7" column="73" selection-start-line="7" selection-start-column="73" selection-end-line="7" selection-end-column="73" />
<state relative-caret-position="107">
<caret line="19" column="63" selection-start-line="19" selection-start-column="63" selection-end-line="19" selection-end-column="63" />
</state>
</provider>
</entry>
... ... @@ -123,11 +89,14 @@
<option value="$PROJECT_DIR$/.env" />
<option value="$PROJECT_DIR$/api/m_api/admin/m_admin_update(new)_api.yml" />
<option value="$PROJECT_DIR$/testcases/admin/ADMIN001_add_admin_testcases.yml" />
<option value="$PROJECT_DIR$/testsuites/partner_testsuite.yml" />
<option value="$PROJECT_DIR$/testcases/admin/ADMIN002_edit_admin_testcases.yml" />
<option value="$PROJECT_DIR$/api/m_api/admin/m_admin_update(edit)_api.yml" />
<option value="$PROJECT_DIR$/debugtalk.py" />
<option value="$PROJECT_DIR$/helpfunc/db_pg_func.py" />
<option value="$PROJECT_DIR$/testcases/admin/ADMIN002_list_admin_testcases.yml" />
<option value="$PROJECT_DIR$/testsuites/partner_testsuite.yml" />
<option value="$PROJECT_DIR$/api/m_api/admin/m_admin_list_api.yml" />
<option value="$PROJECT_DIR$/testcases/admin/ADMIN003_list_admin_testcases.yml" />
</list>
</option>
</component>
... ... @@ -278,22 +247,22 @@
<updated>1594200816252</updated>
<workItem from="1594200819333" duration="5002000" />
<workItem from="1594223232686" duration="1195000" />
<workItem from="1594261507053" duration="15616000" />
<workItem from="1594261507053" duration="21390000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="21813000" />
<option name="totallyTimeSpent" value="27587000" />
</component>
<component name="ToolWindowManager">
<frame x="-8" y="-8" width="1382" height="744" extended-state="6" />
<editor active="true" />
<layout>
<window_info id="Favorites" order="0" side_tool="true" />
<window_info content_ui="combo" id="Project" order="1" weight="0.24962178" />
<window_info content_ui="combo" id="Project" order="1" visible="true" weight="0.24962178" />
<window_info id="Structure" order="2" side_tool="true" weight="0.25" />
<window_info anchor="bottom" id="Docker" order="0" show_stripe_button="false" />
<window_info active="true" anchor="bottom" id="Terminal" order="1" visible="true" weight="0.5076661" />
<window_info active="true" anchor="bottom" id="Terminal" order="1" visible="true" weight="0.39523" />
<window_info anchor="bottom" id="Message" order="2" />
<window_info anchor="bottom" id="Event Log" order="3" side_tool="true" />
<window_info anchor="bottom" id="Find" order="4" />
... ... @@ -311,29 +280,6 @@
<window_info anchor="right" id="Ant Build" order="3" weight="0.25" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="4" weight="0.25" />
</layout>
<layout-to-restore>
<window_info id="Favorites" order="0" side_tool="true" />
<window_info content_ui="combo" id="Project" order="1" weight="0.24962178" />
<window_info id="Structure" order="2" side_tool="true" weight="0.25" />
<window_info anchor="bottom" id="Docker" order="0" show_stripe_button="false" />
<window_info anchor="bottom" id="Terminal" order="1" visible="true" weight="0.38841566" />
<window_info anchor="bottom" id="Message" order="2" />
<window_info anchor="bottom" id="Event Log" order="3" side_tool="true" />
<window_info anchor="bottom" id="Find" order="4" />
<window_info anchor="bottom" id="Python Console" order="5" weight="0.32879046" />
<window_info anchor="bottom" id="Database Changes" order="6" />
<window_info anchor="bottom" id="Run" order="7" weight="0.40545145" />
<window_info anchor="bottom" id="Version Control" order="8" weight="0.32879046" />
<window_info anchor="bottom" id="Debug" order="9" weight="0.4" />
<window_info anchor="bottom" id="Cvs" order="10" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="11" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="12" />
<window_info anchor="right" id="Database" order="0" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="1" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="SciView" order="2" />
<window_info anchor="right" id="Ant Build" order="3" weight="0.25" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="4" weight="0.25" />
</layout-to-restore>
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
... ... @@ -369,13 +315,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.env">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="154">
<caret line="7" column="73" selection-start-line="7" selection-start-column="73" selection-end-line="7" selection-end-column="73" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/m_api/admin/m_admin_update(new)_api.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="198">
... ... @@ -397,48 +336,69 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/testsuites/partner_testsuite.yml">
<entry file="file://$PROJECT_DIR$/helpfunc/login_func.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="211">
<caret line="18" column="9" selection-start-line="18" selection-start-column="9" selection-end-line="19" selection-end-column="42" />
<state relative-caret-position="396">
<caret line="18" column="23" selection-start-line="10" selection-start-column="4" selection-end-line="18" selection-end-column="23" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/helpfunc/login_func.py">
<entry file="file://$PROJECT_DIR$/debugtalk.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="396">
<caret line="18" column="23" selection-start-line="10" selection-start-column="4" selection-end-line="18" selection-end-column="23" />
<state relative-caret-position="273">
<caret line="31" column="32" selection-start-line="31" selection-start-column="32" selection-end-line="31" selection-end-column="32" />
<folding>
<element signature="e#0#13#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.env">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="154">
<caret line="7" column="73" selection-start-line="7" selection-start-column="73" selection-end-line="7" selection-end-column="73" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/testcases/admin/ADMIN002_edit_admin_testcases.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-44">
<state relative-caret-position="9">
<caret line="1" column="12" selection-start-line="1" selection-start-column="12" selection-end-line="1" selection-end-column="12" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/m_api/admin/m_admin_update(edit)_api.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="151">
<caret line="20" column="8" selection-start-line="20" selection-start-column="8" selection-end-line="20" selection-end-column="8" />
<state relative-caret-position="374">
<caret line="17" selection-start-line="17" selection-end-line="20" selection-end-column="8" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/debugtalk.py">
<entry file="file://$PROJECT_DIR$/helpfunc/db_pg_func.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="770">
<caret line="35" lean-forward="true" selection-start-line="35" selection-end-line="35" />
<folding>
<element signature="e#0#13#0" expanded="true" />
</folding>
<state relative-caret-position="63">
<caret line="21" column="53" selection-start-line="21" selection-start-column="53" selection-end-line="21" selection-end-column="53" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/helpfunc/db_pg_func.py">
<entry file="file://$PROJECT_DIR$/testsuites/partner_testsuite.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="107">
<caret line="19" column="63" selection-start-line="19" selection-start-column="63" selection-end-line="19" selection-end-column="63" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/m_api/admin/m_admin_list_api.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="239">
<caret line="24" column="8" selection-start-line="24" selection-start-column="8" selection-end-line="24" selection-end-column="8" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/testcases/admin/ADMIN003_list_admin_testcases.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="459">
<caret line="45" lean-forward="true" selection-start-line="45" selection-end-line="45" />
<state relative-caret-position="22">
<caret line="13" column="46" selection-start-line="13" selection-start-column="46" selection-end-line="13" selection-end-column="46" />
</state>
</provider>
</entry>
... ...
name: 管理员列表:/v1/admin/list
name: 管理员列表
base_url: ${ENV(base_manager_url)}
variables:
phone: 15005046165
password: d033e22ae348aeb5660fc2140aec35850c4da997
searchText: ${get_admin_account_from_database(admin_user)}
request:
headers:
Content-Type: application/json;charset=utf-8
User-Agent: okhttp/3.12.3
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1ODc0NTg0MjgsImlhdCI6MTU4NzQzNjgyNywiaXNzIjoibW1tX29wcG1nIiwibmJmIjoxNTg3NDM2ODI3LCJ1aWQiOjMyNDQ3NDc3Mjg1MzMyNDgsImNvbXBhbnlfaWQiOjM2MCwidXNlcl9jb21wYW55X2lkIjozMjQ0NzQ3NzI4NTMzMjQ4fQ.5t4HO5gbAXT_WXHGNf8ZsbXpPHrzsFhnuXWBtPZ4tWs
Authorization: Bearer ${get_m_accesstoken()}
json:
searchText:
searchText: $searchText
pageNumber: 1
pageSize: 10
method: POST
url: /v1/admin/list
url: v1/admin/list
validate:
- eq:
- content.msg
- ok
- eq:
- content.data.gridResult.lists.0.account
- $searchText
- eq:
- content.data.gridResult.lists.0.statue
- 1
\ No newline at end of file
... ...
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1OTQzMzczMDUsImlhdCI6MTU5NDI5NDEwNSwiaXNzIjoibW1tX3BhcnRuZXJtZyIsIm5iZiI6MTU5NDI5NDEwNSwidWlkIjoxOH0.dV65voPHf0XECR6M3Te3yNLdhfgzmCkw8OXhzPnpOvY
\ No newline at end of file
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1OTQzNTQyMzAsImlhdCI6MTU5NDMxMTAzMCwiaXNzIjoibW1tX3BhcnRuZXJtZyIsIm5iZiI6MTU5NDMxMTAzMCwidWlkIjoxOH0.9r2J8CDgqpHRdAfMh9IAl4Hjr67MPoewgUEywQAiVo0
\ No newline at end of file
... ...
... ... @@ -29,7 +29,7 @@ def create_channel(num):
def create_phone_number(num):
phone_number = []
for i in range(num):
phone_number.append('181%08d'%i)
phone_number.append('182%08d'%i)
# print(phone_number)
return phone_number
... ...
... ... @@ -19,7 +19,7 @@ def GetConnect():
def get_admin_id_from_database(tbl):
db = GetConnect()
cursor = db.cursor()
sql= "select id from " + tbl + ' ' + 'order by create_at desc '
sql= "select id from " + tbl + ' ' + 'order by id desc '
try:
cursor.execute(sql)
result = cursor.fetchone()
... ... @@ -33,7 +33,7 @@ def get_admin_id_from_database(tbl):
def get_admin_account_from_database(tbl):
db = GetConnect()
cursor = db.cursor()
sql= "select account from " + tbl + ' ' + 'order by create_at desc '
sql= "select account from " + tbl + ' ' + 'order by id desc '
try:
cursor.execute(sql)
result = cursor.fetchone()
... ...
config:
name: 编辑管理员
base_url: ${ENV(base_manager_url)}
variables:
phone: ${convert_to_string(10000000001)}
teardown_hooks:
- ${sleep(2)}
teststeps:
- name: $phone 登录系统
testcase: testcases/m_admin_login_testcases.yml
- name: $phone 管理员搜索
api: api/m_api/admin/m_admin_list_api.yml
validate:
- eq:
- content.msg
- ok
- eq:
- content.data.gridResult.lists.0.account
- $searchText
- eq:
- content.data.gridResult.lists.0.statue
- 1
... ...
... ... @@ -8,13 +8,13 @@ testcases:
# parameters:
# channel: ${create_channel(10)}
#- name: ADMIN001:新增管理员
# testcase: testcases/admin/ADMIN001_add_admin_testcases.yml
# parameters:
# account: ${create_phone_number(1)}
- name: ADMIN001:新增管理员
testcase: testcases/admin/ADMIN001_add_admin_testcases.yml
parameters:
account: ${create_phone_number(1)}
- name: ADMIN002:修改管理员
testcase: testcases/admin/ADMIN002_edit_admin_testcases.yml
# parameters:
# account: ${get_admin_account('admin_user')}
# id: ${get_admin_id('admin_user')}
- name: ADMIN003:搜索管理员
testcase: testcases/admin/ADMIN003_list_admin_testcases.yml
\ No newline at end of file
... ...