This commit is contained in:
liwanlei
2017-10-16 21:00:09 +08:00
parent 70893105bb
commit 1ca7dcc802
24 changed files with 772 additions and 151 deletions

11
.idea/jiejko.iml generated Normal file
View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="TestRunnerService">
<option name="PROJECT_TEST_RUNNER" value="Unittests" />
</component>
</module>

4
.idea/misc.xml generated Normal file
View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.6.2 (D:\Program Files (x86)\python.exe)" project-jdk-type="Python SDK" />
</project>

8
.idea/modules.xml generated Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/jiejko.iml" filepath="$PROJECT_DIR$/.idea/jiejko.iml" />
</modules>
</component>
</project>

6
.idea/vcs.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

636
.idea/workspace.xml generated Normal file
View File

@@ -0,0 +1,636 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="fc75b4e4-fc7c-48fa-ac01-7a0375aeda74" name="Default" comment="">
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/jiejko.iml" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/misc.xml" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/modules.xml" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/vcs.xml" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/Public/log.py" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/log/jiekou-2017-10-16-20.log" />
<change type="DELETED" beforePath="$PROJECT_DIR$/201708031258.log" afterPath="" />
<change type="DELETED" beforePath="$PROJECT_DIR$/201708032005.log" afterPath="" />
<change type="DELETED" beforePath="$PROJECT_DIR$/201708032006.log" afterPath="" />
<change type="DELETED" beforePath="$PROJECT_DIR$/Public/tsest_log.py" afterPath="" />
<change type="DELETED" beforePath="$PROJECT_DIR$/TestLog/201708021352.log" afterPath="" />
<change type="DELETED" beforePath="$PROJECT_DIR$/test_Report/201708031258-result.html" afterPath="" />
<change type="DELETED" beforePath="$PROJECT_DIR$/test_Report/201708032006-result.html" afterPath="" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/img/log.png" afterPath="$PROJECT_DIR$/img/log.png" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/Interface/testFengzhuang.py" afterPath="$PROJECT_DIR$/Interface/testFengzhuang.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/Interface/test_requests.py" afterPath="$PROJECT_DIR$/Interface/test_requests.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/Public/create_report.py" afterPath="$PROJECT_DIR$/Public/create_report.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/Public/get_excel.py" afterPath="$PROJECT_DIR$/Public/get_excel.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/Public/panduan.py" afterPath="$PROJECT_DIR$/Public/panduan.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/result.txt" afterPath="$PROJECT_DIR$/result.txt" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/testCase/test_case.py" afterPath="$PROJECT_DIR$/testCase/test_case.py" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="CoverageDataManager">
<SUITE FILE_PATH="coverage/jiejko$main_html.coverage" NAME="main_html Coverage Results" MODIFIED="1508158482760" 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/jiejko$test_requests.coverage" NAME="test_requests Coverage Results" MODIFIED="1507970830187" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/Interface" />
<SUITE FILE_PATH="coverage/jiejko$main_excel_report.coverage" NAME="main_excel_report Coverage Results" MODIFIED="1508158495279" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="main_html.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/main_html.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="12" column="10" lean-forward="false" selection-start-line="12" selection-start-column="4" selection-end-line="12" selection-end-column="10" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="main_excel_report.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/main_excel_report.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-330">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="jiekou-2017-10-16-20.log" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/log/jiekou-2017-10-16-20.log">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="374">
<caret line="17" column="48" lean-forward="true" selection-start-line="17" selection-start-column="48" selection-end-line="17" selection-end-column="48" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="test_case.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/testCase/test_case.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="361">
<caret line="19" column="16" lean-forward="false" selection-start-line="19" selection-start-column="16" selection-end-line="19" selection-end-column="16" />
<folding>
<element signature="e#100#145#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="testFengzhuang.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/Interface/testFengzhuang.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="9">
<caret line="7" column="11" lean-forward="false" selection-start-line="7" selection-start-column="11" selection-end-line="7" selection-end-column="11" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="test_requests.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/Interface/test_requests.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="427">
<caret line="44" column="29" lean-forward="false" selection-start-line="44" selection-start-column="29" selection-end-line="44" selection-end-column="29" />
<folding>
<element signature="e#43#63#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="pyreport_excel.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/Public/pyreport_excel.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-1773">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/Interface/testFengzhuang.py" />
<option value="$PROJECT_DIR$/Public/log.py" />
<option value="$PROJECT_DIR$/Public/create_report.py" />
<option value="$PROJECT_DIR$/Public/get_excel.py" />
<option value="$PROJECT_DIR$/Public/panduan.py" />
<option value="$PROJECT_DIR$/testCase/test_case.py" />
<option value="$PROJECT_DIR$/Interface/test_requests.py" />
</list>
</option>
</component>
<component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsGulpfileManager">
<detection-done>true</detection-done>
<sorting>DEFINITION_ORDER</sorting>
</component>
<component name="ProjectFrameBounds" extendedState="7">
<option name="x" value="10" />
<option name="y" value="20" />
<option name="width" value="1346" />
<option name="height" value="688" />
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1">
<flattenPackages />
<showMembers />
<showModules />
<showLibraryContents />
<hideEmptyPackages />
<abbreviatePackageNames />
<autoscrollToSource />
<autoscrollFromSource />
<sortByType />
<manualOrder />
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scratches" />
<pane id="Scope" />
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="jiejko" type="b2602c69:ProjectViewProjectNode" />
<item name="jiejko" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="jiejko" type="b2602c69:ProjectViewProjectNode" />
<item name="jiejko" type="462c0819:PsiDirectoryNode" />
<item name="img" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
</pane>
</panes>
</component>
<component name="PropertiesComponent">
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="settings.editor.selected.configurable" value="com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable" />
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="C:\Users\Administrator\Desktop\xuexi\jiejko\Public" />
</key>
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="RunManager" selected="Python.main_excel_report">
<configuration name="main_excel_report" type="PythonConfigurationType" factoryName="Python" temporary="true">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<module name="jiejko" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/main_excel_report.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
</configuration>
<configuration name="main_html" type="PythonConfigurationType" factoryName="Python" temporary="true">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<module name="jiejko" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/main_html.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
</configuration>
<configuration name="test_requests" type="PythonConfigurationType" factoryName="Python" temporary="true">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/Interface" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<module name="jiejko" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/Interface/test_requests.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
</configuration>
<list size="3">
<item index="0" class="java.lang.String" itemvalue="Python.main_html" />
<item index="1" class="java.lang.String" itemvalue="Python.test_requests" />
<item index="2" class="java.lang.String" itemvalue="Python.main_excel_report" />
</list>
<recent_temporary>
<list size="3">
<item index="0" class="java.lang.String" itemvalue="Python.main_excel_report" />
<item index="1" class="java.lang.String" itemvalue="Python.main_html" />
<item index="2" class="java.lang.String" itemvalue="Python.test_requests" />
</list>
</recent_temporary>
</component>
<component name="ShelveChangesManager" show_recycled="false">
<option name="remove_strategy" value="false" />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="fc75b4e4-fc7c-48fa-ac01-7a0375aeda74" name="Default" comment="" />
<created>1507970128780</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1507970128780</updated>
</task>
<servers />
</component>
<component name="ToolWindowManager">
<frame x="-8" y="-8" width="1382" height="744" extended-state="7" />
<editor active="true" />
<layout>
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.24963397" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Python Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.67823344" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Data View" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
</layout>
<layout-to-restore>
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="true" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.329653" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Python Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.24963397" sideWeight="0.5" order="1" side_tool="false" content_ui="combo" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="combo" />
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="true" content_ui="tabs" />
<window_info id="Data View" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
</layout-to-restore>
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
</component>
<component name="UnknownFeatures">
<option featureType="com.intellij.fileTypeFactory" implementationName="*.log" />
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
<breakpoints>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/Public/get_excel.py</url>
<line>17</line>
</line-breakpoint>
</breakpoints>
<option name="time" value="1" />
</breakpoint-manager>
<watches-manager />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/main_html.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/testCase/test_case.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="88">
<caret line="4" column="0" lean-forward="false" selection-start-line="4" selection-start-column="0" selection-end-line="4" selection-end-column="0" />
<folding>
<element signature="e#100#145#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Interface/testFengzhuang.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="154">
<caret line="7" column="11" lean-forward="false" selection-start-line="7" selection-start-column="11" selection-end-line="7" selection-end-column="11" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Interface/test_requests.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="132">
<caret line="6" column="29" lean-forward="false" selection-start-line="6" selection-start-column="29" selection-end-line="6" selection-end-column="29" />
<folding>
<element signature="e#43#63#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Public/get_excel.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="176">
<caret line="8" column="40" lean-forward="false" selection-start-line="8" selection-start-column="40" selection-end-line="8" selection-end-column="40" />
<folding>
<element signature="e#121#137#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/main_html.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/testCase/test_case.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="88">
<caret line="4" column="0" lean-forward="false" selection-start-line="4" selection-start-column="0" selection-end-line="4" selection-end-column="0" />
<folding>
<element signature="e#100#145#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Interface/testFengzhuang.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="154">
<caret line="7" column="11" lean-forward="false" selection-start-line="7" selection-start-column="11" selection-end-line="7" selection-end-column="11" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Interface/test_requests.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="132">
<caret line="6" column="29" lean-forward="true" selection-start-line="6" selection-start-column="29" selection-end-line="6" selection-end-column="29" />
<folding>
<element signature="e#43#63#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://D:/Program Files (x86)/Lib/site-packages/requests/__init__.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1760">
<caret line="83" column="0" lean-forward="false" selection-start-line="83" selection-start-column="0" selection-end-line="83" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://D:/Program Files (x86)/Lib/site-packages/urllib3/contrib/pyopenssl.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="990">
<caret line="45" column="0" lean-forward="false" selection-start-line="45" selection-start-column="0" selection-end-line="45" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://D:/Program Files (x86)/Lib/site-packages/OpenSSL/__init__.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="154">
<caret line="7" column="0" lean-forward="false" selection-start-line="7" selection-start-column="0" selection-end-line="7" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Public/get_excel.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="176">
<caret line="8" column="40" lean-forward="true" selection-start-line="8" selection-start-column="40" selection-end-line="8" selection-end-column="40" />
<folding>
<element signature="e#121#137#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://D:/Program Files (x86)/Lib/site-packages/cryptography/x509/certificate_transparency.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="352">
<caret line="21" column="0" lean-forward="false" selection-start-line="21" selection-start-column="0" selection-end-line="21" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://D:/Program Files (x86)/Lib/site-packages/requests/__init__.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1760">
<caret line="83" column="0" lean-forward="false" selection-start-line="83" selection-start-column="0" selection-end-line="83" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://D:/Program Files (x86)/Lib/site-packages/cryptography/x509/certificate_transparency.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="242">
<caret line="31" column="11" lean-forward="true" selection-start-line="31" selection-start-column="11" selection-end-line="31" selection-end-column="11" />
</state>
</provider>
</entry>
<entry file="file://D:/Program Files (x86)/Lib/site-packages/urllib3/contrib/pyopenssl.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="22">
<caret line="45" column="0" lean-forward="false" selection-start-line="45" selection-start-column="0" selection-end-line="45" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://D:/Program Files (x86)/Lib/site-packages/OpenSSL/__init__.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="154">
<caret line="7" column="0" lean-forward="false" selection-start-line="7" selection-start-column="0" selection-end-line="7" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Public/log.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="154">
<caret line="7" column="13" lean-forward="false" selection-start-line="7" selection-start-column="13" selection-end-line="7" selection-end-column="13" />
<folding>
<element signature="e#76#85#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Public/create_report.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="308">
<caret line="14" column="34" lean-forward="false" selection-start-line="14" selection-start-column="34" selection-end-line="14" selection-end-column="34" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Public/emmail.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Public/get_excel.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="185">
<caret line="18" column="18" lean-forward="false" selection-start-line="18" selection-start-column="18" selection-end-line="18" selection-end-column="18" />
<folding>
<element signature="e#121#137#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Public/panduan.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="220">
<caret line="10" column="5" lean-forward="false" selection-start-line="10" selection-start-column="5" selection-end-line="10" selection-end-column="5" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Public/py_Html.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-1699">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Public/tsest_log.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Public/pyreport_excel.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-1773">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/testCase/test_case.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="361">
<caret line="19" column="16" lean-forward="false" selection-start-line="19" selection-start-column="16" selection-end-line="19" selection-end-column="16" />
<folding>
<element signature="e#100#145#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Interface/test_requests.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="427">
<caret line="44" column="29" lean-forward="false" selection-start-line="44" selection-start-column="29" selection-end-line="44" selection-end-column="29" />
<folding>
<element signature="e#43#63#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Interface/testFengzhuang.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="9">
<caret line="7" column="11" lean-forward="false" selection-start-line="7" selection-start-column="11" selection-end-line="7" selection-end-column="11" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/main_html.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="12" column="10" lean-forward="false" selection-start-line="12" selection-start-column="4" selection-end-line="12" selection-end-column="10" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/main_excel_report.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-330">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/img/log.png">
<provider selected="true" editor-type-id="images">
<state />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/img/xiangmujiegoutu.png">
<provider selected="true" editor-type-id="images">
<state />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/img/cebaogaotu.png">
<provider selected="true" editor-type-id="images">
<state />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/log/jiekou-2017-10-16-20.log">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="374">
<caret line="17" column="48" lean-forward="true" selection-start-line="17" selection-start-column="48" selection-end-line="17" selection-end-column="48" />
<folding />
</state>
</provider>
</entry>
</component>
</project>

View File

@@ -1,3 +0,0 @@
2017-08-03 12:58:42,228 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־ - INFO - inputdata> <20><><EFBFBD><EFBFBD>:sasa, url:http://www.tuling123.com/openapi/api ,<2C><><EFBFBD><EFBFBD>:{'code': 40001, 'text': '<27>װ<EFBFBD><D7B0>ģ<EFBFBD>key<65><79><EFBFBD><EFBFBD>Ŷ<EFBFBD><C5B6>'},Ԥ<><D4A4>:code=40001
2017-08-03 12:59:00,326 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־ - INFO - inputdata> <20><><EFBFBD><EFBFBD>:, url:http://www.tuling123.com/openapi/api
,<2C><><EFBFBD><EFBFBD>:{'code': 40002, 'text': '<27><>ʲô<CAB2><C3B4>˵<EFBFBD>Ļ<EFBFBD><C4BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ò<EFBFBD><C3B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFA3AC><EFBFBD><EFBFBD>ֱ<EFBFBD>Ӹ<EFBFBD><D3B8><EFBFBD><EFBFBD><EFBFBD>Ŷ~'},Ԥ<><D4A4>:code=40002

View File

@@ -1,4 +0,0 @@
2017-08-03 20:05:38,196 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־ - INFO - inputdata> <20><><EFBFBD><EFBFBD>:sasa, url:http://www.tuling123.com/openapi/api ,<2C><><EFBFBD><EFBFBD>:{'code': 40001, 'text': '<27>װ<EFBFBD><D7B0>ģ<EFBFBD>key<65><79><EFBFBD><EFBFBD>Ŷ<EFBFBD><C5B6>'},Ԥ<><D4A4>:code=40001
2017-08-03 20:05:38,289 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־ - INFO - inputdata> <20><><EFBFBD><EFBFBD>:, url:http://www.tuling123.com/openapi/api
,<2C><><EFBFBD><EFBFBD>:{'code': 40002, 'text': '<27><>ʲô<CAB2><C3B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>'},Ԥ<><D4A4>:code=40002
2017-08-03 20:05:38,611 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־ - INFO - inputdata> <20><><EFBFBD><EFBFBD>:, url:https://api.douban.com/v2/photo/:id ,<2C><><EFBFBD><EFBFBD>:{'msg': 'uri_not_found', 'code': 1001, 'request': 'POST /v2/photo/:id'},Ԥ<><D4A4>:code=1001&msg=uri_not_found

View File

@@ -1,4 +0,0 @@
2017-08-03 20:06:36,224 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־ - INFO - inputdata> <20><><EFBFBD><EFBFBD>:sasa, url:http://www.tuling123.com/openapi/api ,<2C><><EFBFBD><EFBFBD>:{'code': 40001, 'text': '<27>װ<EFBFBD><D7B0>ģ<EFBFBD>key<65><79><EFBFBD><EFBFBD>Ŷ<EFBFBD><C5B6>'},Ԥ<><D4A4>:code=40001
2017-08-03 20:06:36,294 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־ - INFO - inputdata> <20><><EFBFBD><EFBFBD>:, url:http://www.tuling123.com/openapi/api
,<2C><><EFBFBD><EFBFBD>:{'code': 40002, 'text': '<27><>Щ<EFBFBD><D0A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>ڣ<EFBFBD>'},Ԥ<><D4A4>:code=40002
2017-08-03 20:06:36,499 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־ - INFO - inputdata> <20><><EFBFBD><EFBFBD>:, url:https://api.douban.com/v2/photo/:id ,<2C><><EFBFBD><EFBFBD>:{'msg': 'uri_not_found', 'code': 1001, 'request': 'POST /v2/photo/:id'},Ԥ<><D4A4>:code=1001&msg=uri_not_found

View File

@@ -4,8 +4,8 @@
# @Site :
# @File : testFengzhuang.py
# @Software: PyCharm
from Interface.test_requests import reques
reques=reques()
from Interface.test_requests import requ
reques=requ()
class TestApi(object):
def __init__(self,url,key,connent,fangshi):
self.url=url

View File

@@ -1 +1 @@
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-

View File

@@ -4,10 +4,13 @@
@file: create_report.py
@time: 2017/8/3 12:27
"""
from Public.log import LOG,logger
@logger('保存测试结果')
def save_result(testtime,toial,passnum,fail):
try:
f=open('result.txt','a')
f.write("%s=%s=%s=%s \n"%(testtime,toial,passnum,fail))
f.close()
except:
LOG.info('保存测试结果出错,原因:%s'%Exception)
print('记录测试结果失败')

View File

@@ -6,26 +6,30 @@
import xlrd,xlwt
import unittest,sys
from xlutils.copy import copy
from Interface.test_requests import reques
from Interface.test_requests import requ
from .log import LOG,logger
@logger('解析测试用例文件')
def datacel():
filepath='.\\test_Data\\test_Data.xlsx'
file=xlrd.open_workbook(filepath)
me=file.sheets()[0]
nrows=me.nrows
listid=[]
listkey=[]
listconeent=[]
listurl=[]
listfangshi=[]
listqiwang=[]
listrelut=[]
listname=[]
for i in range(1,nrows):
listid.append(me.cell(i,0).value)
listkey.append(me.cell(i,2).value)
listconeent.append(me.cell(i,3).value)
listurl.append(me.cell(i,4).value)
listname.append(me.cell(i,1).value)
listfangshi.append((me.cell(i,5).value))
listqiwang.append((me.cell(i,6).value))
return listid,listkey,listconeent,listurl,listfangshi,listqiwang,listname
try:
filepath='.\\test_Data\\test_Data.xlsx'
file=xlrd.open_workbook(filepath)
me=file.sheets()[0]
nrows=me.nrows
listid=[]
listkey=[]
listconeent=[]
listurl=[]
listfangshi=[]
listqiwang=[]
listrelut=[]
listname=[]
for i in range(1,nrows):
listid.append(me.cell(i,0).value)
listkey.append(me.cell(i,2).value)
listconeent.append(me.cell(i,3).value)
listurl.append(me.cell(i,4).value)
listname.append(me.cell(i,1).value)
listfangshi.append((me.cell(i,5).value))
listqiwang.append((me.cell(i,6).value))
return listid,listkey,listconeent,listurl,listfangshi,listqiwang,listname
except:LOG.info('打开测试用例失败,原因是:%s'%Exception)

38
Public/log.py Normal file
View File

@@ -0,0 +1,38 @@
# -*- coding: utf-8 -*-
# @Date : 2017-10-14 15:35:17
# @Author : leizi
import os
import logbook
from logbook.more import ColorizedStderrHandler
from functools import wraps
check_path='.'
LOG_DIR = os.path.join(check_path, 'log')
file_stream = False
if not os.path.exists(LOG_DIR):
os.makedirs(LOG_DIR)
file_stream = True
def get_logger(name='jiekou', file_log=file_stream, level=''):
""" get logger Factory function """
logbook.set_datetime_format('local')
ColorizedStderrHandler(bubble=False, level=level).push_thread()
logbook.TimedRotatingFileHandler(
os.path.join(LOG_DIR, '%s.log' % name),
date_format='%Y-%m-%d-%H', bubble=True, encoding='utf-8').push_thread()
return logbook.Logger(name)
LOG = get_logger(file_log=file_stream, level='INFO')
def logger(param):
""" fcuntion from logger meta """
def wrap(function):
""" logger wrapper """
@wraps(function)
def _wrap(*args, **kwargs):
""" wrap tool """
LOG.info("当前模块 {}".format(param))
# LOG.info("全部args参数参数信息 , {}".format(str(args)))
# LOG.info("全部kwargs参数信息 , {}".format(str(kwargs)))
return function(*args, **kwargs)
return _wrap
return wrap

View File

@@ -1,6 +1,8 @@
# -*- coding: utf-8 -*-
# @Date : 2017-08-02 21:54:08
# @Author : lileilei
from .log import LOG,logger
@logger('断言测试结果')
def assert_in(asserqiwang,fanhuijson):
if len(asserqiwang.split('=')) > 1:
data = asserqiwang.split('&')
@@ -12,4 +14,5 @@ def assert_in(asserqiwang,fanhuijson):
else:
return 'fail'
else:
LOG.info('填写测试预期值')
raise ('请填写期望值')

View File

@@ -1,33 +0,0 @@
# -*- coding: utf-8 -*-
# @Time : 2017/6/17 15:56
# @Author : lileilei
# @File : tsest_log.py
# @Software: PyCharm
import logging,time,os
class log_re():
def __init__(self,title):
self.day = time.strftime("%Y%m%d%H%M", time.localtime(time.time()))
self.logger = logging.Logger(title)
# basdir = os.path.abspath(os.path.dirname(__file__))
# filepath=os.path.join(basdir+'\\TestLog\\%s.log'%self.day)
filepath = '%s.log'% self.day
# if os.path.exists(filepath) is False:
# os.system(r'touch %s' % filepath)
self.logger.setLevel(logging.INFO)
self.logfile = logging.FileHandler(filepath)
self.logfile.setLevel(logging.INFO)
self.control = logging.StreamHandler()
self.control.setLevel(logging.INFO)
self.formater = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
self.logfile.setFormatter(self.formater)
self.control.setFormatter(self.formater)
self.logger.addHandler(self.logfile)
self.logger.addHandler(self.control)
def debugInfo(self, message):
self.logger.debug(message)
def info_log(self, message):
self.logger.info(message)
def ware_log(self, message):
self.logger.warn(message)
def error_log(self, message):
self.logger.error(message)

View File

@@ -1,3 +0,0 @@
2017-08-02 13:52:36,234 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־ - INFO - inputdata> <20><><EFBFBD><EFBFBD>:sasa, url:http://www.tuling123.com/openapi/api ,<2C><><EFBFBD><EFBFBD>:{'code': 40001, 'text': '<27>װ<EFBFBD><D7B0>ģ<EFBFBD>key<65><79><EFBFBD><EFBFBD>Ŷ<EFBFBD><C5B6>'},Ԥ<><D4A4>:40002.0
2017-08-02 13:52:54,321 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־ - INFO - inputdata> <20><><EFBFBD><EFBFBD>:, url:http://www.tuling123.com/openapi/api
,<2C><><EFBFBD><EFBFBD>:{'code': 40002, 'text': '<27>ɹ<EFBFBD>ѽ<EFBFBD><D1BD>'},Ԥ<><D4A4>:40008.0

BIN
img/kongzhitai.PNG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

After

Width:  |  Height:  |  Size: 88 KiB

View File

@@ -0,0 +1,24 @@
[2017-10-16 20:54:46.439386] INFO: jiekou: 当前模块 requests封装
[2017-10-16 20:54:46.900412] INFO: jiekou: 当前模块 解析测试用例文件
[2017-10-16 20:54:47.323436] INFO: jiekou: 当前模块 解析测试用例文件
[2017-10-16 20:54:47.332437] INFO: jiekou: 当前模块 测试
[2017-10-16 20:54:47.554450] INFO: jiekou: inputdata> 参数:sasa, url:http://www.tuling123.com/openapi/api ,返回:{'code': 40001, 'text': '亲爱的key不对哦。'},预期:code=40001
[2017-10-16 20:54:47.556450] INFO: jiekou: 当前模块 断言测试结果
[2017-10-16 20:54:47.654455] INFO: jiekou: inputdata> 参数:, url:http://www.tuling123.com/openapi/api
,返回:{'code': 40002, 'text': '有啥事吗?'},预期:code=40002
[2017-10-16 20:54:47.656455] INFO: jiekou: 当前模块 断言测试结果
[2017-10-16 20:54:48.161484] INFO: jiekou: inputdata> 参数:, url:https://api.douban.com/v2/photo/:id ,返回:{'msg': 'uri_not_found', 'code': 1001, 'request': 'POST /v2/photo/:id'},预期:code=1001&msg=uri_not_found
[2017-10-16 20:54:48.163484] INFO: jiekou: 当前模块 断言测试结果
[2017-10-16 20:54:48.230488] INFO: jiekou: 当前模块 保存测试结果
[2017-10-16 20:54:56.272948] INFO: jiekou: 当前模块 requests封装
[2017-10-16 20:54:56.295950] INFO: jiekou: 当前模块 解析测试用例文件
[2017-10-16 20:54:56.323951] INFO: jiekou: 当前模块 解析测试用例文件
[2017-10-16 20:54:56.330952] INFO: jiekou: 当前模块 测试
[2017-10-16 20:54:56.548964] INFO: jiekou: inputdata> 参数:sasa, url:http://www.tuling123.com/openapi/api ,返回:{'code': 40001, 'text': '亲爱的key不对哦。'},预期:code=40001
[2017-10-16 20:54:56.548964] INFO: jiekou: 当前模块 断言测试结果
[2017-10-16 20:54:56.636969] INFO: jiekou: inputdata> 参数:, url:http://www.tuling123.com/openapi/api
,返回:{'code': 40002, 'text': '有些话,难以说出口?'},预期:code=40002
[2017-10-16 20:54:56.638969] INFO: jiekou: 当前模块 断言测试结果
[2017-10-16 20:54:56.844981] INFO: jiekou: inputdata> 参数:, url:https://api.douban.com/v2/photo/:id ,返回:{'msg': 'uri_not_found', 'code': 1001, 'request': 'POST /v2/photo/:id'},预期:code=1001&msg=uri_not_found
[2017-10-16 20:54:56.846981] INFO: jiekou: 当前模块 断言测试结果
[2017-10-16 20:54:56.888984] INFO: jiekou: 当前模块 保存测试结果

View File

@@ -9,3 +9,6 @@
2017-08-03 12:54:46.685132=2=2=0
2017-08-03 12:58:24.075566=2=2=0
2017-08-03 20:06:36.156240=3=3=0
2017-10-14 16:59:49.889103=3=3=0
2017-10-16 20:54:47.323436=3=3=0
2017-10-16 20:54:56.323951=3=3=0

View File

@@ -4,11 +4,10 @@
# @File : test_case.py
from Interface.testFengzhuang import TestApi
from Public.get_excel import datacel
from Public.tsest_log import log_re
from Public.log import LOG,logger
listid,listkey,listconeent,listurl,listfangshi,listqiwang,listname=datacel()
from Public.panduan import assert_in
title='测试日志'
log_can=log_re(title)
@logger('测试')
def testinterface():
list_pass = 0
list_fail = 0
@@ -18,7 +17,7 @@ def testinterface():
api=TestApi(url=listurl[i],key=listkey[i],connent=listconeent[i],fangshi=listfangshi[i])
apicode=api.getcode()
apijson=api.getJson()
log_can.info_log('inputdata> 参数:%s, url:%s ,返回:%s,预期:%s'%(listconeent[i],listurl[i],apijson,listqiwang[i]))
LOG.info('inputdata> 参数:%s, url:%s ,返回:%s,预期:%s'%(listconeent[i],listurl[i],apijson,listqiwang[i]))
assert_re=assert_in(asserqiwang=listqiwang[i],fanhuijson=apijson)
if assert_re=='pass':
list_json.append(apijson)

View File

@@ -1,71 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>接口测试报告</title>
<style type="text/css">
td{ width:40px; height:50px;}
</style>
</head>
<body>
<div style='width: 1170px;margin-left: 15%'>
<h1>接口测试的结果</h1>
<p><strong>开始时间:</strong> 2017-08-03 12:58:24.075566</p>
<p><strong>结束时间:</strong> 2017-08-03 12:59:00.367642</p>
<p><strong>耗时:</strong> 0:00:36.292076</p>
<p><strong>结果:</strong>
<span >Pass: <strong >2</strong>
Fail: <strong >0</strong>
</span></p>
<p ><strong>测试详情如下</strong></p> </div>
<p>&nbsp;</p>
<table border='2'cellspacing='1' cellpadding='1' width='1100'align="center" >
<tr >
<td ><strong>用例ID&nbsp;</strong></td>
<td><strong>用例名字</strong></td>
<td><strong>key</strong></td>
<td><strong>请求内容</strong></td>
<td><strong>url</strong></td>
<td><strong>请求方式</strong></td>
<td><strong>预期</strong></td>
<td><strong>实际返回</strong></td>
<td><strong>结果</strong></td>
</tr>
<tr>
<td>1.0</td>
<td>图灵api接口</td>
<td>aaaa</td>
<td>sasa
</td>
<td>http://www.tuling123.com/openapi/api</td>
<td>POST</td>
<td>code=40001</td>
<td>{'code': 40001, 'text': '亲爱的key不对哦。'}</td>
<td bgcolor="green">pass</td>
</tr>
<tr>
<td>2.0</td>
<td>图灵api接口</td>
<td>dfeb1cc8125943d29764a2f2f5c33739</td>
<td>
</td>
<td>http://www.tuling123.com/openapi/api
</td>
<td>POST</td>
<td>code=40002</td>
<td>{'code': 40002, 'text': '有什么想说的话,不用藏在心里,可以直接告诉我哦~'}</td>
<td bgcolor="green">pass</td>
</tr>
</table>
</body>
</html>

View File

@@ -11,9 +11,9 @@
<div style='width: 1170px;margin-left: 15%'>
<h1>接口测试的结果</h1>
<p><strong>开始时间:</strong> 2017-08-03 20:06:36.156240</p>
<p><strong>结束时间:</strong> 2017-08-03 20:06:36.585264</p>
<p><strong>耗时:</strong> 0:00:00.429024</p>
<p><strong>开始时间:</strong> 2017-10-16 20:54:47.323436</p>
<p><strong>结束时间:</strong> 2017-10-16 20:54:48.234489</p>
<p><strong>耗时:</strong> 0:00:00.911053</p>
<p><strong>结果:</strong>
<span >Pass: <strong >3</strong>
Fail: <strong >0</strong>
@@ -61,7 +61,7 @@
</td>
<td>POST</td>
<td>code=40002</td>
<td>{'code': 40002, 'text': '有些话,难以说出口'}</td>
<td>{'code': 40002, 'text': '有啥事吗'}</td>
<td bgcolor="green">pass</td>
</tr>