Commit 70321f91 by zhangjingdong

测试

parent 3cd736cb
<?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>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.6 (py36)" project-jdk-type="Python SDK" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/bihe_interface_test.iml" filepath="$PROJECT_DIR$/.idea/bihe_interface_test.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="243b24f3-3df7-4c72-bf73-8de81d5ca458" name="Default" comment="" />
<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/bihe_interface_test$execute_automation_scripts.coverage" NAME="execute_automation_scripts Coverage Results" MODIFIED="1543368840363" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/碧合app" />
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="execute_automation_scripts.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/碧合app/execute_automation_scripts.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="153">
<caret line="9" column="19" selection-start-line="9" selection-start-column="19" selection-end-line="9" selection-end-column="19" />
<folding>
<element signature="e#18#29#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="活动2018-11-28_09:34:00.html" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/碧合app/活动2018-11-28_09:34:00.html">
<provider selected="true" editor-type-id="text-editor" />
</entry>
</file>
<file leaf-file-name="README.md" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="text-editor" />
</entry>
</file>
<file leaf-file-name="活动.postman_collection.json" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/碧合app/活动/活动.postman_collection.json">
<provider selected="true" editor-type-id="text-editor" />
</entry>
</file>
<file leaf-file-name="-活动_manage.postman_environment.json" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/碧合app/活动/-活动_manage.postman_environment.json">
<provider selected="true" editor-type-id="text-editor" />
</entry>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="Python Script" />
</list>
</option>
</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$/碧合app/execute_automation_scripts.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="NodePackageJsonFileManager">
<packageJsonPaths />
</component>
<component name="ProjectFrameBounds" fullScreen="true">
<option name="width" value="1440" />
<option name="height" value="900" />
</component>
<component name="ProjectView">
<navigator proportions="" version="1">
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="bihe_interface_test" type="b2602c69:ProjectViewProjectNode" />
<item name="bihe_interface_test" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="bihe_interface_test" type="b2602c69:ProjectViewProjectNode" />
<item name="bihe_interface_test" type="462c0819:PsiDirectoryNode" />
<item name="碧合app" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="bihe_interface_test" type="b2602c69:ProjectViewProjectNode" />
<item name="External Libraries" type="cb654da1:ExternalLibrariesNode" />
</path>
</expand>
<select />
</subPane>
</pane>
<pane id="Scope" />
</panes>
</component>
<component name="PropertiesComponent">
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
</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">
<configuration name="execute_automation_scripts" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="bihe_interface_test" />
<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$/碧合app" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/碧合app/execute_automation_scripts.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
</configuration>
<recent_temporary>
<list>
<item itemvalue="Python.execute_automation_scripts" />
</list>
</recent_temporary>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="243b24f3-3df7-4c72-bf73-8de81d5ca458" name="Default" comment="" />
<created>1543310367094</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1543310367094</updated>
</task>
<servers />
</component>
<component name="ToolWindowManager">
<frame x="0" y="0" width="1440" height="900" extended-state="0" />
<editor active="true" />
<layout>
<window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="bottom" id="Event Log" order="7" side_tool="true" />
<window_info anchor="bottom" id="Database Changes" order="7" show_stripe_button="false" />
<window_info anchor="bottom" id="Run" order="2" visible="true" weight="0.32969698" />
<window_info anchor="bottom" id="Version Control" order="7" />
<window_info anchor="bottom" id="Python Console" order="7" />
<window_info anchor="bottom" id="Terminal" order="7" />
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.2532189" />
<window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" />
<window_info anchor="right" id="Database" order="3" />
<window_info anchor="bottom" id="Find" order="1" weight="0.32969698" />
<window_info anchor="right" id="SciView" order="3" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info anchor="bottom" id="Concurrent Activities Diagram" weight="0.32969698" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
<window_info id="Favorites" order="2" side_tool="true" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
</layout>
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
<default-breakpoints>
<breakpoint type="python-exception">
<properties notifyOnTerminate="true" exception="BaseException">
<option name="notifyOnTerminate" value="true" />
</properties>
</breakpoint>
</default-breakpoints>
</breakpoint-manager>
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/htmlOut.html">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/碧合app/活动/活动.postman_collection.json">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/碧合app/活动/-活动_manage.postman_environment.json">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/碧合app/execute_automation_scripts.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="144">
<caret line="8" column="8" lean-forward="true" selection-start-line="8" selection-start-column="8" selection-end-line="8" selection-end-column="8" />
<folding>
<element signature="e#18#29#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/htmlOut.html">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/碧合app/活动/-活动_manage.postman_environment.json">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/碧合app/活动/活动.postman_collection.json">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/碧合app/htmlOut.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-229" />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/碧合app/活动2018-11-27">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/碧合app/.html.html">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/碧合app/活动2018-11-27_20:00:34.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-56833" />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/碧合app/execute_automation_scripts.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="153">
<caret line="9" column="19" selection-start-line="9" selection-start-column="19" selection-end-line="9" selection-end-column="19" />
<folding>
<element signature="e#18#29#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/碧合app/活动2018-11-28_09:34:00.html">
<provider selected="true" editor-type-id="text-editor" />
</entry>
</component>
</project>
\ No newline at end of file
No preview for this file type
# coding = utf-8
# coding = utf-8
import time
import os
import datetime
class PostmanApi:
def post(self):
file = []
report_file = "/Users/lucas/Documents/报告地址/"
# 获取当前文件路径
BASE_DIR = os.path.realpath(os.path.dirname(os.path.abspath(__file__)))
# 获取当前路径所有文件
path = os.listdir(os.getcwd())
for p in path:
if os.path.isdir(p):
file.append(p)
for file_path in file:
now_time = file_path + time.strftime("%Y-%m-%d_%H:%M:%S", time.localtime(time.time())) + '.html'
report_file_path = report_file + file_path
print(report_file_path)
execute = "newman run " + BASE_DIR + "/" + file_path + "/" + file_path + ".postman_collection.json -e " + BASE_DIR + "/" + file_path + "/-" + file_path + "_manage.postman_environment.json --delay-request 500 --timeout-request 5000 --reporters html --reporter-html-export " + now_time
os.system(execute)
return self
if __name__ == '__main__':
PostmanApi().post()
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment