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
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