作者 bianxinhua

add README

... ... @@ -3,18 +3,12 @@
<component name="ChangeListManager">
<list default="true" id="d6814b48-28ec-40b6-bcea-dcd9b8613715" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/api/m_api/admin/m_admin_api.yml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/api/m_api/admin/m_admin_detail_api.yml" beforeDir="false" afterPath="$PROJECT_DIR$/api/m_api/admin/m_admin_detail_api.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/api/m_api/admin/m_admin_forbidden_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$/api/m_api/m_partner_add_api.yml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/api/m_api/partners/m_partner_add_api.yml" beforeDir="false" afterPath="$PROJECT_DIR$/api/m_api/partners/m_partner_add_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$/logs/testsuites/partner_testsuite.parse_failed.json" beforeDir="false" afterPath="$PROJECT_DIR$/logs/testsuites/partner_testsuite.parse_failed.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$/testcases/admin/ADMIN001_add_admin_testcases.yml" beforeDir="false" afterPath="$PROJECT_DIR$/testcases/admin/ADMIN001_add_admin_testcases.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/testcases/admin/ADMIN002_edit_admin_testcases.yml" beforeDir="false" afterPath="$PROJECT_DIR$/testcases/admin/ADMIN002_edit_admin_testcases.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/testcases/admin/ADMIN003_list_admin_testcases.yml" beforeDir="false" afterPath="$PROJECT_DIR$/testcases/admin/ADMIN003_list_admin_testcases.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/testcases/m_admin_login_testcases.yml" beforeDir="false" afterPath="$PROJECT_DIR$/testcases/m_login_testcases.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/testcases/partners/PARTNERS001_add_partner_testcases.yml" beforeDir="false" afterPath="$PROJECT_DIR$/testcases/partners/PARTNERS001_add_partner_testcases.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/testcases_excel/partner_api.xlsx" beforeDir="false" afterPath="$PROJECT_DIR$/testcases_excel/partner_api.xlsx" afterDir="false" />
<change beforePath="$PROJECT_DIR$/testsuites/partner_testsuite.yml" beforeDir="false" afterPath="$PROJECT_DIR$/testsuites/partner_testsuite.yml" afterDir="false" />
</list>
... ... @@ -25,15 +19,15 @@
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="CoverageDataManager">
<SUITE FILE_PATH="coverage/partner_api$debugtalk.coverage" NAME="debugtalk Coverage Results" MODIFIED="1594396508244" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/partner_api$db_pg_func.coverage" NAME="db_pg_func Coverage Results" MODIFIED="1594287508392" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/helpfunc" />
<SUITE FILE_PATH="coverage/partner_api$debugtalk.coverage" NAME="debugtalk Coverage Results" MODIFIED="1594439962224" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/partner_api$db_pg_func.coverage" NAME="db_pg_func Coverage Results" MODIFIED="1594485069390" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/helpfunc" />
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<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="123">
<state relative-caret-position="308">
<caret line="21" column="19" selection-start-line="21" selection-start-column="19" selection-end-line="21" selection-end-column="19" />
<folding>
<element signature="e#0#13#0" expanded="true" />
... ... @@ -45,49 +39,53 @@
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/api/m_api/partners/m_partner_add_api.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="295">
<caret line="14" column="37" selection-start-line="14" selection-start-column="37" selection-end-line="14" selection-end-column="37" />
<state relative-caret-position="244">
<caret line="19" selection-start-line="19" selection-end-line="22" selection-end-column="12" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/api/m_api/m_order_actual_api.yml">
<entry file="file://$PROJECT_DIR$/api/m_api/partners/m_partner_edit_api.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-264" />
<state relative-caret-position="638">
<caret line="29" column="12" selection-start-line="29" selection-start-column="12" selection-end-line="29" selection-end-column="12" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/api/m_api/m_order_purpose_add_api.yml">
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/testcases/partners/PARTNERS002_edit_partner_testcases.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-289" />
<state relative-caret-position="26">
<caret line="12" column="19" selection-start-line="12" selection-start-column="19" selection-end-line="12" selection-end-column="19" />
</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$/helpfunc/db_pg_func.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="374">
<caret line="17" selection-start-line="17" selection-end-line="20" selection-end-column="8" />
<state relative-caret-position="126">
<caret line="88" column="27" selection-start-line="88" selection-start-column="4" selection-end-line="88" selection-end-column="27" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/api/m_api/admin/m_admin_update(new)_api.yml">
<file pinned="false" current-in-tab="false">
<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="198">
<caret line="9" column="45" selection-start-line="9" selection-start-column="37" selection-end-line="9" selection-end-column="45" />
<state relative-caret-position="242">
<caret line="11" column="17" selection-start-line="11" selection-start-column="17" selection-end-line="11" selection-end-column="25" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/testcases/partners/PARTNERS001_add_partner_testcases.yml">
<entry file="file://$PROJECT_DIR$/api/m_api/admin/m_admin_forbidden_0_api.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="154">
<caret line="10" column="25" selection-start-line="10" selection-start-column="25" selection-end-line="10" selection-end-column="25" />
<state relative-caret-position="286">
<caret line="13" column="18" selection-start-line="13" selection-start-column="18" selection-end-line="13" selection-end-column="27" />
</state>
</provider>
</entry>
... ... @@ -95,8 +93,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="129">
<caret line="31" column="70" selection-start-line="31" selection-start-column="70" selection-end-line="31" selection-end-column="70" />
<state relative-caret-position="158">
<caret line="36" column="71" selection-start-line="36" selection-start-column="71" selection-end-line="36" selection-end-column="71" />
</state>
</provider>
</entry>
... ... @@ -113,24 +111,26 @@
<option value="$PROJECT_DIR$/.env" />
<option value="$PROJECT_DIR$/api/m_api/admin/m_admin_update(new)_api.yml" />
<option value="$PROJECT_DIR$/api/m_api/admin/m_admin_update(edit)_api.yml" />
<option value="$PROJECT_DIR$/helpfunc/db_pg_func.py" />
<option value="$PROJECT_DIR$/testcases/admin/ADMIN002_list_admin_testcases.yml" />
<option value="$PROJECT_DIR$/api/m_api/admin/m_admin_list_api.yml" />
<option value="$PROJECT_DIR$/api/m_api/admin/m_admin_detail_api.yml" />
<option value="$PROJECT_DIR$/testcases/admin/ADMIN003_list_admin_testcases.yml" />
<option value="$PROJECT_DIR$/api/m_api/admin/m_admin_forbidden_1_api.yml" />
<option value="$PROJECT_DIR$/api/m_api/admin/m_admin_forbidden_0_api.yml" />
<option value="$PROJECT_DIR$/testcases/partners/PARTNERS001_add_partner_testcases.yml" />
<option value="$PROJECT_DIR$/testcases/admin/ADMIN006_forbidden_admin_testcases.yml" />
<option value="$PROJECT_DIR$/testcases/admin/ADMIN005_forbidden_admin_testcases.yml" />
<option value="$PROJECT_DIR$/testcases/admin/ADMIN004_detail_admin_testcases.yml" />
<option value="$PROJECT_DIR$/testcases/admin/ADMIN002_edit_admin_testcases.yml" />
<option value="$PROJECT_DIR$/testcases/admin/ADMIN001_add_admin_testcases.yml" />
<option value="$PROJECT_DIR$/testcases/m_login_testcases.yml" />
<option value="$PROJECT_DIR$/testsuites/partner_testsuite.yml" />
<option value="$PROJECT_DIR$/api/m_api/admin/m_admin_api.yml" />
<option value="$PROJECT_DIR$/debugtalk.py" />
<option value="$PROJECT_DIR$/testcases/admin/ADMIN001_add_admin_testcases.yml" />
<option value="$PROJECT_DIR$/helpfunc/db_pg_func.py" />
<option value="$PROJECT_DIR$/api/m_api/partners/m_partner_add_api.yml" />
<option value="$PROJECT_DIR$/api/m_api/admin/m_admin_api.yml" />
<option value="$PROJECT_DIR$/api/m_api/partners/m_partner_edit_api.yml" />
<option value="$PROJECT_DIR$/testcases/partners/PARTNERS001_add_partner_testcases.yml" />
<option value="$PROJECT_DIR$/testsuites/partner_testsuite.yml" />
<option value="$PROJECT_DIR$/testcases/partners/PARTNERS002_edit_partner_testcases.yml" />
</list>
</option>
</component>
... ... @@ -145,6 +145,7 @@
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scope" />
<pane id="ProjectPane">
<subPane>
<expand>
... ... @@ -185,13 +186,13 @@
<path>
<item name="partner_api" type="b2602c69:ProjectViewProjectNode" />
<item name="partner_api" type="462c0819:PsiDirectoryNode" />
<item name="testcases" type="462c0819:PsiDirectoryNode" />
<item name="helpfunc" type="462c0819:PsiDirectoryNode" />
<item name="db_pg_func.py" type="8704e2dd:PyFileNode" />
</path>
<path>
<item name="partner_api" type="b2602c69:ProjectViewProjectNode" />
<item name="partner_api" type="462c0819:PsiDirectoryNode" />
<item name="testcases" type="462c0819:PsiDirectoryNode" />
<item name="admin" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="partner_api" type="b2602c69:ProjectViewProjectNode" />
... ... @@ -208,7 +209,6 @@
<select />
</subPane>
</pane>
<pane id="Scope" />
</panes>
</component>
<component name="PropertiesComponent">
... ... @@ -230,7 +230,7 @@
</list>
</option>
</component>
<component name="RunManager" selected="Python.debugtalk">
<component name="RunManager" selected="Python.db_pg_func">
<configuration name="db_pg_func" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="partner_api" />
<option name="INTERPRETER_OPTIONS" value="" />
... ... @@ -277,8 +277,8 @@
</configuration>
<recent_temporary>
<list>
<item itemvalue="Python.debugtalk" />
<item itemvalue="Python.db_pg_func" />
<item itemvalue="Python.debugtalk" />
</list>
</recent_temporary>
</component>
... ... @@ -296,27 +296,29 @@
<workItem from="1594223232686" duration="1195000" />
<workItem from="1594261507053" duration="21762000" />
<workItem from="1594352160255" duration="8702000" />
<workItem from="1594436598031" duration="2974000" />
<workItem from="1594481917603" duration="2344000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="36661000" />
<option name="totallyTimeSpent" value="41979000" />
</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 active="true" content_ui="combo" id="Project" order="1" visible="true" weight="0.2677761" />
<window_info active="true" content_ui="combo" id="Project" order="1" visible="true" weight="0.2753404" />
<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.39523" />
<window_info anchor="bottom" id="Terminal" order="1" visible="true" weight="0.42078364" />
<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="Run" order="7" weight="0.2879046" />
<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" />
... ... @@ -352,13 +354,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/helpfunc/db_func.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="145">
<caret line="15" column="32" selection-start-line="15" selection-start-column="4" selection-end-line="15" selection-end-column="32" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/helpfunc/login_func.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="396">
... ... @@ -373,13 +368,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/helpfunc/db_pg_func.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-135">
<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$/api/m_api/admin/m_admin_list_api.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="66">
... ... @@ -387,9 +375,7 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/m_api/admin/m_admin_forbidden_api.yml">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/api/m_api/admin/m_admin_forbidden_api.yml" />
<entry file="file://$PROJECT_DIR$/api/m_api/admin/m_admin_detail_api.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="41">
... ... @@ -397,13 +383,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/m_api/admin/m_admin_forbidden_0_api.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="173">
<caret line="13" column="18" selection-start-line="13" selection-start-column="18" selection-end-line="13" selection-end-column="27" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/m_api/admin/m_admin_forbidden_1_api.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-132">
... ... @@ -411,13 +390,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/testcases/admin/ADMIN001_add_admin_testcases.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="154">
<caret line="10" column="25" selection-start-line="10" selection-start-column="25" selection-end-line="10" selection-end-column="25" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/testcases/admin/ADMIN004_detail_admin_testcases.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="129">
... ... @@ -439,44 +411,62 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/testcases/admin/ADMIN002_edit_admin_testcases.yml">
<entry file="file://$PROJECT_DIR$/testcases/m_login_testcases.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="330">
<caret line="15" selection-start-line="15" selection-end-line="15" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/m_api/admin/m_admin_api.yml" />
<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="220">
<caret line="10" column="25" selection-start-line="10" selection-start-column="25" selection-end-line="10" selection-end-column="25" />
<caret line="10" column="17" lean-forward="true" selection-start-line="10" selection-start-column="17" selection-end-line="10" selection-end-column="17" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/testcases/m_login_testcases.yml">
<entry file="file://$PROJECT_DIR$/helpfunc/db_func.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="330">
<caret line="15" selection-start-line="15" selection-end-line="15" />
<state relative-caret-position="145">
<caret line="15" column="32" selection-start-line="15" selection-start-column="4" selection-end-line="15" selection-end-column="32" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/m_api/m_order_purpose_add_api.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="176">
<caret line="8" column="32" selection-start-line="8" selection-start-column="32" selection-end-line="8" selection-end-column="32" />
</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="132">
<caret line="12" column="22" selection-start-line="12" selection-start-column="22" selection-end-line="12" selection-end-column="22" />
<state relative-caret-position="44">
<caret line="14" selection-start-line="14" selection-end-line="17" selection-end-column="16" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/testcases/partners/PARTNERS001_add_partner_testcases.yml">
<entry file="file://$PROJECT_DIR$/testcases/admin/ADMIN002_edit_admin_testcases.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="154">
<state relative-caret-position="-32">
<caret line="10" column="25" selection-start-line="10" selection-start-column="25" selection-end-line="10" selection-end-column="25" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/testsuites/partner_testsuite.yml">
<entry file="file://$PROJECT_DIR$/api/m_api/m_order_actual_api.yml">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/testcases/admin/ADMIN001_add_admin_testcases.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="129">
<caret line="31" column="70" selection-start-line="31" selection-start-column="70" selection-end-line="31" selection-end-column="70" />
<state relative-caret-position="135">
<caret line="17" column="16" selection-start-line="17" selection-start-column="16" selection-end-line="17" selection-end-column="16" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/debugtalk.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="123">
<state relative-caret-position="308">
<caret line="21" column="19" selection-start-line="21" selection-start-column="19" selection-end-line="21" selection-end-column="19" />
<folding>
<element signature="e#0#13#0" expanded="true" />
... ... @@ -484,41 +474,59 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/m_api/partners/m_partner_add_api.yml">
<entry file="file://$PROJECT_DIR$/api/m_api/admin/m_admin_forbidden_0_api.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="295">
<caret line="14" column="37" selection-start-line="14" selection-start-column="37" selection-end-line="14" selection-end-column="37" />
<state relative-caret-position="286">
<caret line="13" column="18" selection-start-line="13" selection-start-column="18" selection-end-line="13" selection-end-column="27" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/m_api/m_order_actual_api.yml">
<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="-264" />
<state relative-caret-position="242">
<caret line="11" column="17" selection-start-line="11" selection-start-column="17" selection-end-line="11" selection-end-column="25" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/m_api/m_order_purpose_add_api.yml">
<entry file="file://$PROJECT_DIR$/helpfunc/db_pg_func.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="126">
<caret line="88" column="27" selection-start-line="88" selection-start-column="4" selection-end-line="88" selection-end-column="27" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/m_api/partners/m_partner_add_api.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-289" />
<state relative-caret-position="244">
<caret line="19" selection-start-line="19" selection-end-line="22" selection-end-column="12" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/m_api/admin/m_admin_api.yml">
<entry file="file://$PROJECT_DIR$/api/m_api/partners/m_partner_edit_api.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-132">
<caret column="11" selection-start-column="11" selection-end-column="11" />
<state relative-caret-position="638">
<caret line="29" column="12" selection-start-line="29" selection-start-column="12" selection-end-line="29" selection-end-column="12" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/m_api/admin/m_admin_update(edit)_api.yml">
<entry file="file://$PROJECT_DIR$/testcases/partners/PARTNERS001_add_partner_testcases.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="374">
<caret line="17" selection-start-line="17" selection-end-line="20" selection-end-column="8" />
<state relative-caret-position="264">
<caret line="12" column="20" selection-start-line="12" selection-start-column="20" selection-end-line="12" selection-end-column="20" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/m_api/admin/m_admin_update(new)_api.yml">
<entry file="file://$PROJECT_DIR$/testsuites/partner_testsuite.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="158">
<caret line="36" column="71" selection-start-line="36" selection-start-column="71" selection-end-line="36" selection-end-column="71" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/testcases/partners/PARTNERS002_edit_partner_testcases.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="198">
<caret line="9" column="45" selection-start-line="9" selection-start-column="37" selection-end-line="9" selection-end-column="45" />
<state relative-caret-position="26">
<caret line="12" column="19" selection-start-line="12" selection-start-column="19" selection-end-line="12" selection-end-column="19" />
</state>
</provider>
</entry>
... ...
... ... @@ -10,10 +10,14 @@ request:
partnerName: '卞信华'
partnerType: 3
area: '福建省福州市XXXXX区'
account: ${convert_to_string($account)}
account: $account
state: 1
cooperationTime: '2020-07-30'
cooperationTime: ${get_today()}
salesmanName: '小小'
phone: ${convert_to_string($account)}
method: POST
url: v1/partners/add
validate:
- eq:
- content.msg
- ok
\ No newline at end of file
... ...
name: 合伙人编辑
base_url: ${ENV(base_manager_url)}
variables:
account: ${get_admin_account_from_database(partner_info)}
id: ${get_admin_id_from_database(partner_info)}
partnerName: ${get_partnername_from_database(partner_info)}
area: ${get_area_from_database(partner_info)}
salesmanName: ${get_salesman_from_database(partner_info)}
phone: ${get_phone_from_database(partner_info)}
request:
headers:
Content-Type: application/json;charset=utf-8
User-Agent: okhttp/3.12.3
Authorization: Bearer ${get_m_accesstoken()}
json:
partnerName: $partnerName
partnerType: 1
area: $area
account: $account
state: 1
cooperationTime: ${get_today()}
salesmanName: $salesmanName
phone: $phone
id: $id
method: POST
url: v1/partners/edit
validate:
- eq:
- content.msg
- ok
\ No newline at end of file
... ...
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1OTQ0NDA5MzAsImlhdCI6MTU5NDM5NzczMCwiaXNzIjoibW1tX3BhcnRuZXJtZyIsIm5iZiI6MTU5NDM5NzczMCwidWlkIjoxOH0.ntMqxX3LGGsMEm4LxmBi5wjcIFZ47B_FcfUBDKp3-JY
\ No newline at end of file
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1OTQ1Mjg2NzAsImlhdCI6MTU5NDQ4NTQ3MCwiaXNzIjoibW1tX3BhcnRuZXJtZyIsIm5iZiI6MTU5NDQ4NTQ3MCwidWlkIjoxOH0.xQZCkxPOLzLxTd5sKsVXVA3QeHYZNzFyM1gO6-4XQkc
\ No newline at end of file
... ...
... ... @@ -18,7 +18,7 @@ def get_nowtime():
def get_today():
now_today = datetime.datetime.now()
str_time = now_today.strftime(" %Y-%m-%d ")
str_time = now_today.strftime("%Y-%m-%d")
return str_time
def get_second():
curr_time = datetime.datetime.now()
... ... @@ -33,5 +33,6 @@ def create_channel(num):
def create_phone_number(num):
phone_number = []
for i in range(num):
phone_number.append('18%d%08d'%(i,i))
return phone_number
\ No newline at end of file
number = random.randint(0,9)
phone_number.append('18%d%08d'%(number,number+1))
return phone_number
... ...
... ... @@ -43,3 +43,60 @@ def get_admin_account_from_database(tbl):
print(err)
db.rollback()
db.close()
def get_partnername_from_database(tbl):
db = GetConnect()
cursor = db.cursor()
sql= "select partner_name from " + tbl + ' ' + 'order by id desc '
try:
cursor.execute(sql)
result = cursor.fetchone()
return result[0]
except Exception as err:
# 发生错误时回滚
print(err)
db.rollback()
db.close()
def get_area_from_database(tbl):
db = GetConnect()
cursor = db.cursor()
sql= "select region_info from " + tbl + ' ' + 'order by id desc '
try:
cursor.execute(sql)
result = cursor.fetchone()
return result[0]['regionName']
except Exception as err:
# 发生错误时回滚
print(err)
db.rollback()
db.close()
def get_salesman_from_database(tbl):
db = GetConnect()
cursor = db.cursor()
sql= "select salesman from " + tbl + ' ' + 'order by id desc '
try:
cursor.execute(sql)
result = cursor.fetchone()
return result[0][0]['name']
except Exception as err:
# 发生错误时回滚
print(err)
db.rollback()
db.close()
def get_phone_from_database(tbl):
db = GetConnect()
cursor = db.cursor()
sql= "select salesman from " + tbl + ' ' + 'order by id desc '
try:
cursor.execute(sql)
result = cursor.fetchone()
return result[0][0]['telephone']
except Exception as err:
# 发生错误时回滚
print(err)
db.rollback()
db.close()
print(get_phone_from_database('partner_info'))
\ No newline at end of file
... ...
<head>
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title> - TestReport</title>
<style>
body {
background-color: #f2f2f2;
color: #333;
margin: 0 auto;
width: 960px;
}
#summary {
width: 960px;
margin-bottom: 20px;
}
#summary th {
background-color: skyblue;
padding: 5px 12px;
}
#summary td {
background-color: lightblue;
text-align: center;
padding: 4px 8px;
}
.details {
width: 960px;
margin-bottom: 20px;
}
.details th {
background-color: skyblue;
padding: 5px 12px;
}
.details tr .passed {
background-color: lightgreen;
}
.details tr .failed {
background-color: red;
}
.details tr .unchecked {
background-color: gray;
}
.details td {
background-color: lightblue;
padding: 5px 12px;
}
.details .detail {
background-color: lightgrey;
font-size: smaller;
padding: 5px 10px;
line-height: 20px;
text-align: left;
}
.details .success {
background-color: greenyellow;
}
.details .error {
background-color: red;
}
.details .failure {
background-color: salmon;
}
.details .skipped {
background-color: gray;
}
.button {
font-size: 1em;
padding: 6px;
width: 4em;
text-align: center;
background-color: #06d85f;
border-radius: 20px/50px;
cursor: pointer;
transition: all 0.3s ease-out;
}
a.button{
color: gray;
text-decoration: none;
display: inline-block;
}
.button:hover {
background: #2cffbd;
}
.overlay {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: rgba(0, 0, 0, 0.7);
transition: opacity 500ms;
visibility: hidden;
opacity: 0;
line-height: 25px;
}
.overlay:target {
visibility: visible;
opacity: 1;
}
.popup {
margin: 70px auto;
padding: 20px;
background: #fff;
border-radius: 10px;
width: 50%;
position: relative;
transition: all 3s ease-in-out;
}
.popup h2 {
margin-top: 0;
color: #333;
font-family: Tahoma, Arial, sans-serif;
}
.popup .close {
position: absolute;
top: 20px;
right: 30px;
transition: all 200ms;
font-size: 30px;
font-weight: bold;
text-decoration: none;
color: #333;
}
.popup .close:hover {
color: #06d85f;
}
.popup .content {
max-height: 80%;
overflow: auto;
text-align: left;
}
.popup .separator {
color:royalblue
}
@media screen and (max-width: 700px) {
.box {
width: 70%;
}
.popup {
width: 70%;
}
}
</style>
</head>
<body>
<h1>Test Report: </h1>
<h2>Summary</h2>
<table id="summary">
<tr>
<th>START AT</th>
<td colspan="4">2020-07-11T16:37:48.576936</td>
</tr>
<tr>
<th>DURATION</th>
<td colspan="4">0.978 seconds</td>
</tr>
<tr>
<th>PLATFORM</th>
<td>HttpRunner 2.5.7 </td>
<td>CPython 3.8.1 </td>
<td colspan="2">Windows-7-6.1.7601-SP1</td>
</tr>
<tr>
<th>STAT</th>
<th colspan="2">TESTCASES (success/fail)</th>
<th colspan="2">TESTSTEPS (success/fail/error/skip)</th>
</tr>
<tr>
<td>total (details) =></td>
<td colspan="2">1 (1/0)</td>
<td colspan="2">2 (2/0/0/0)</td>
</tr>
</table>
<h2>Details</h2>
<h3>PARTNERS002:编辑管理员</h3>
<table id="suite_1" class="details">
<tr>
<td>TOTAL: 2</td>
<td>SUCCESS: 2</td>
<td>FAILED: 0</td>
<td>ERROR: 0</td>
<td>SKIPPED: 0</td>
</tr>
<tr>
<th>Status</th>
<th colspan="2">Name</th>
<th>Response Time</th>
<th>Detail</th>
</tr>
<tr id="record_1_1">
<th class="success" style="width:5em;">success</th>
<td colspan="2">10000000001 登录系统</td>
<td style="text-align:center;width:6em;">142.01 ms</td>
<td class="detail">
<a class="button" href="#popup_log_1_1_1">log-1</a>
<div id="popup_log_1_1_1" class="overlay">
<div class="popup">
<h2>Request and Response data</h2>
<a class="close" href="#record_1_1_1">&times;</a>
<div class="content">
<h3>Name: 10000000001 登录系统</h3>
<h3>Request:</h3>
<div style="overflow: auto">
<table>
<tr>
<th>url</th>
<td>
https://public-interface-test.fjmaimaimai.com/partnermg/v1/auth/login
</td>
</tr>
<tr>
<th>method</th>
<td>
POST
</td>
</tr>
<tr>
<th>headers</th>
<td>
<pre>{
&#34;User-Agent&#34;: &#34;Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36&#34;,
&#34;Accept-Encoding&#34;: &#34;gzip, deflate&#34;,
&#34;Accept&#34;: &#34;*/*&#34;,
&#34;Connection&#34;: &#34;keep-alive&#34;,
&#34;Content-Type&#34;: &#34;application/json;charset=utf-8&#34;,
&#34;Content-Length&#34;: &#34;83&#34;
}</pre>
</td>
</tr>
<tr>
<th>body</th>
<td>
<pre>{
&#34;password&#34;: &#34;7c4a8d09ca3762af61e59520943dc26494f8941b&#34;,
&#34;username&#34;: &#34;10000000001&#34;
}</pre>
</td>
</tr>
</table>
</div>
<h3>Response:</h3>
<div style="overflow: auto">
<table>
<tr>
<th>ok</th>
<td>
True
</td>
</tr>
<tr>
<th>url</th>
<td>
https://public-interface-test.fjmaimaimai.com/partnermg/v1/auth/login
</td>
</tr>
<tr>
<th>status_code</th>
<td>
200
</td>
</tr>
<tr>
<th>reason</th>
<td>
OK
</td>
</tr>
<tr>
<th>cookies</th>
<td>
{}
</td>
</tr>
<tr>
<th>encoding</th>
<td>
utf-8
</td>
</tr>
<tr>
<th>headers</th>
<td>
<pre>{
&#34;Date&#34;: &#34;Sat, 11 Jul 2020 16:37:50 GMT&#34;,
&#34;Content-Type&#34;: &#34;application/json; charset=utf-8&#34;,
&#34;Transfer-Encoding&#34;: &#34;chunked&#34;,
&#34;Connection&#34;: &#34;keep-alive&#34;,
&#34;Vary&#34;: &#34;Accept-Encoding, Accept-Encoding&#34;,
&#34;Access-Control-Allow-Credentials&#34;: &#34;true&#34;,
&#34;Access-Control-Allow-Headers&#34;: &#34;Origin,Authorization,Access-Control-Allow-Origin,Content-Type,x-requested-with&#34;,
&#34;Access-Control-Allow-Methods&#34;: &#34;*&#34;,
&#34;Access-Control-Allow-Origin&#34;: &#34;*&#34;,
&#34;Access-Control-Expose-Headers&#34;: &#34;Content-Length&#34;,
&#34;Strict-Transport-Security&#34;: &#34;max-age=15724800; includeSubDomains&#34;,
&#34;Content-Encoding&#34;: &#34;gzip&#34;
}</pre>
</td>
</tr>
<tr>
<th>content_type</th>
<td>
application/json; charset=utf-8
</td>
</tr>
<tr>
<th>body</th>
<td>
<pre>{
&#34;code&#34;: 0,
&#34;msg&#34;: &#34;ok&#34;,
&#34;data&#34;: {
&#34;access&#34;: {
&#34;accessToken&#34;: &#34;eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1OTQ1Mjg2NzAsImlhdCI6MTU5NDQ4NTQ3MCwiaXNzIjoibW1tX3BhcnRuZXJtZyIsIm5iZiI6MTU5NDQ4NTQ3MCwidWlkIjoxOH0.xQZCkxPOLzLxTd5sKsVXVA3QeHYZNzFyM1gO6-4XQkc&#34;,
&#34;expiresIn&#34;: 43200
}
}
}</pre>
</td>
</tr>
</table>
</div>
<h3>Validators:</h3>
<div style="overflow: auto">
<table>
<tr>
<th>check</th>
<th>comparator</th>
<th>expect value</th>
<th>actual value</th>
</tr>
<tr>
<td class="passed">
content.msg
</td>
<td>equals</td>
<td>ok</td>
<td>ok</td>
</tr>
</table>
</div>
<h3>Statistics:</h3>
<div style="overflow: auto">
<table>
<tr>
<th>content_size(bytes)</th>
<td>311</td>
</tr>
<tr>
<th>response_time(ms)</th>
<td>142.01</td>
</tr>
<tr>
<th>elapsed(ms)</th>
<td>130.386</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</td>
</tr>
<tr id="record_1_2">
<th class="success" style="width:5em;">success</th>
<td colspan="2">10000000001 合伙人编辑</td>
<td style="text-align:center;width:6em;">45.00 ms</td>
<td class="detail">
<a class="button" href="#popup_log_1_2_1">log-1</a>
<div id="popup_log_1_2_1" class="overlay">
<div class="popup">
<h2>Request and Response data</h2>
<a class="close" href="#record_1_2_1">&times;</a>
<div class="content">
<h3>Name: 10000000001 合伙人编辑</h3>
<h3>Request:</h3>
<div style="overflow: auto">
<table>
<tr>
<th>url</th>
<td>
https://public-interface-test.fjmaimaimai.com/partnermg/v1/partners/edit
</td>
</tr>
<tr>
<th>method</th>
<td>
POST
</td>
</tr>
<tr>
<th>headers</th>
<td>
<pre>{
&#34;User-Agent&#34;: &#34;okhttp/3.12.3&#34;,
&#34;Accept-Encoding&#34;: &#34;gzip, deflate&#34;,
&#34;Accept&#34;: &#34;*/*&#34;,
&#34;Connection&#34;: &#34;keep-alive&#34;,
&#34;Content-Type&#34;: &#34;application/json;charset=utf-8&#34;,
&#34;Authorization&#34;: &#34;Bearer bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1OTQ1Mjg2NzAsImlhdCI6MTU5NDQ4NTQ3MCwiaXNzIjoibW1tX3BhcnRuZXJtZyIsIm5iZiI6MTU5NDQ4NTQ3MCwidWlkIjoxOH0.xQZCkxPOLzLxTd5sKsVXVA3QeHYZNzFyM1gO6-4XQkc&#34;,
&#34;Content-Length&#34;: &#34;252&#34;
}</pre>
</td>
</tr>
<tr>
<th>body</th>
<td>
<pre>{
&#34;partnerName&#34;: &#34;卞信华&#34;,
&#34;partnerType&#34;: 1,
&#34;area&#34;: &#34;福建省福州市XXXXX区&#34;,
&#34;account&#34;: &#34;18100000002&#34;,
&#34;state&#34;: 1,
&#34;cooperationTime&#34;: &#34;2020-07-12&#34;,
&#34;salesmanName&#34;: &#34;小小&#34;,
&#34;phone&#34;: &#34;10000000001&#34;,
&#34;id&#34;: 172
}</pre>
</td>
</tr>
</table>
</div>
<h3>Response:</h3>
<div style="overflow: auto">
<table>
<tr>
<th>ok</th>
<td>
True
</td>
</tr>
<tr>
<th>url</th>
<td>
https://public-interface-test.fjmaimaimai.com/partnermg/v1/partners/edit
</td>
</tr>
<tr>
<th>status_code</th>
<td>
200
</td>
</tr>
<tr>
<th>reason</th>
<td>
OK
</td>
</tr>
<tr>
<th>cookies</th>
<td>
{}
</td>
</tr>
<tr>
<th>encoding</th>
<td>
utf-8
</td>
</tr>
<tr>
<th>headers</th>
<td>
<pre>{
&#34;Date&#34;: &#34;Sat, 11 Jul 2020 16:37:51 GMT&#34;,
&#34;Content-Type&#34;: &#34;application/json; charset=utf-8&#34;,
&#34;Content-Length&#34;: &#34;44&#34;,
&#34;Connection&#34;: &#34;keep-alive&#34;,
&#34;Access-Control-Allow-Credentials&#34;: &#34;true&#34;,
&#34;Access-Control-Allow-Headers&#34;: &#34;Origin,Authorization,Access-Control-Allow-Origin,Content-Type,x-requested-with&#34;,
&#34;Access-Control-Allow-Methods&#34;: &#34;*&#34;,
&#34;Access-Control-Allow-Origin&#34;: &#34;*&#34;,
&#34;Access-Control-Expose-Headers&#34;: &#34;Content-Length&#34;,
&#34;Strict-Transport-Security&#34;: &#34;max-age=15724800; includeSubDomains&#34;
}</pre>
</td>
</tr>
<tr>
<th>content_type</th>
<td>
application/json; charset=utf-8
</td>
</tr>
<tr>
<th>body</th>
<td>
<pre>{
&#34;code&#34;: 0,
&#34;msg&#34;: &#34;ok&#34;,
&#34;data&#34;: {}
}</pre>
</td>
</tr>
</table>
</div>
<h3>Validators:</h3>
<div style="overflow: auto">
<table>
<tr>
<th>check</th>
<th>comparator</th>
<th>expect value</th>
<th>actual value</th>
</tr>
<tr>
<td class="passed">
content.msg
</td>
<td>equals</td>
<td>ok</td>
<td>ok</td>
</tr>
</table>
</div>
<h3>Statistics:</h3>
<div style="overflow: auto">
<table>
<tr>
<th>content_size(bytes)</th>
<td>44</td>
</tr>
<tr>
<th>response_time(ms)</th>
<td>45.0</td>
</tr>
<tr>
<th>elapsed(ms)</th>
<td>40.066</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</td>
</tr>
</table>
</body>
\ No newline at end of file
... ...
... ... @@ -12,4 +12,7 @@ teststeps:
- name: $phone 管理员新增
api: api/m_api/admin/m_admin_update(new)_api.yml
validate:
- eq:
- content.msg
- ok
... ...
... ... @@ -10,6 +10,9 @@ teststeps:
- name: $phone 登录系统
testcase: testcases/m_login_testcases.yml
- name: $phone 管理员新增
- name: $phone 合伙人新增
api: api/m_api/partners/m_partner_add_api.yml
validate:
- eq:
- content.msg
- ok
... ...
config:
name: 合伙人编辑
base_url: ${ENV(base_manager_url)}
variables:
phone: ${convert_to_string(10000000001)}
teardown_hooks:
- ${sleep(2)}
teststeps:
- name: $phone 登录系统
testcase: testcases/m_login_testcases.yml
- name: $phone 编辑合伙人
api: api/m_api/partners/m_partner_edit_api.yml
validate:
- eq:
- content.msg
- ok
... ...
... ... @@ -13,7 +13,7 @@ testcases:
# parameters:
# account: ${create_phone_number(1)}
#
#- name: ADMIN002:修改管理员
#- name: ADMIN002:编辑管理员
# testcase: testcases/admin/ADMIN002_edit_admin_testcases.yml
#
#- name: ADMIN003:搜索管理员
... ... @@ -28,7 +28,10 @@ testcases:
#- name: ADMIN006:启用管理员
# testcase: testcases/admin/ADMIN006_forbidden_admin_testcases.yml
- name: PARTNERS001:新增合伙人
testcase: testcases/partners/PARTNERS001_add_partner_testcases.yml
parameters:
account: ${create_phone_number(1)}
\ No newline at end of file
#- name: PARTNERS001:新增合伙人
# testcase: testcases/partners/PARTNERS001_add_partner_testcases.yml
# parameters:
# account: ${create_phone_number(1)}
- name: PARTNERS002:编辑管理员
testcase: testcases/partners/PARTNERS002_edit_partner_testcases.yml
\ No newline at end of file
... ...