去掉了邮箱和密码
This commit is contained in:
parent
6af61faf4a
commit
4661f84548
|
@ -1,78 +0,0 @@
|
|||
本框架采用python3+slenium3+allure2+pytest开发完成
|
||||
|
||||
# 环境要求
|
||||
|
||||
```
|
||||
allure-pytest==2.8.6
|
||||
allure-python-commons==2.8.6
|
||||
atomicwrites==1.3.0
|
||||
attrs==19.3.0
|
||||
colorama==0.4.1
|
||||
importlib-metadata==0.23
|
||||
more-itertools==7.2.0
|
||||
nose==1.3.7
|
||||
packaging==19.2
|
||||
Pillow==6.2.0
|
||||
pluggy==0.13.0
|
||||
py==1.8.0
|
||||
pyparsing==2.4.2
|
||||
pytesseract==0.3.0
|
||||
pytest==5.2.2
|
||||
pytest-html==2.0.0
|
||||
pytest-metadata==1.8.0
|
||||
pytest-rerunfailures==7.0
|
||||
selenium==3.141.0
|
||||
six==1.12.0
|
||||
urllib3==1.25.6
|
||||
wcwidth==0.1.7
|
||||
xlrd==1.2.0
|
||||
zipp==0.6.0
|
||||
```
|
||||
|
||||
# 安装allure2
|
||||
|
||||
windows下安装 Allure2工具
|
||||
环境
|
||||
1、安装JDK1.8+
|
||||
2、安装Allure2
|
||||
下载Allure2的zip安装包
|
||||
解压到allure-commandline目录
|
||||
进入bin目录,运行allure.bat
|
||||
添加allure到环境变量PATH(\安装路径\allure-commandline\bin)
|
||||
|
||||
# 测试框架介绍
|
||||
|
||||

|
||||
|
||||
# 配置文件
|
||||
|
||||
```
|
||||
#主目录文件路需要手动配置
|
||||
[projectConfig]
|
||||
project_path=H:\cmp
|
||||
#测试环境,展示到测试报,可自定义配置
|
||||
[env]
|
||||
url = http:\\192.168.54.13
|
||||
tester = wuzushun
|
||||
versioncode = v1.0
|
||||
csdpversion = v3.8.26
|
||||
|
||||
```
|
||||
|
||||
# 测试数据
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
# 测试报告
|
||||
|
||||
测试报告路径:
|
||||
|
||||
`H:\cmp\report\html\index.html`
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
|
@ -24,4 +24,4 @@ data_path = os.path.join(prj_path, 'data', 'testdata')
|
|||
url = read_config.getValue("env","url")
|
||||
#
|
||||
xml_report_path=os.path.join(prj_path, 'report', 'xml')
|
||||
html_report_path = os.path.join(prj_path, 'report', 'html')
|
||||
html_report_path = os.path.join(prj_path, 'report', 'html')
|
||||
|
|
|
@ -6,18 +6,16 @@
|
|||
# @File : initialize_Env.py
|
||||
# @Software: PyCharm
|
||||
|
||||
import os
|
||||
|
||||
from public.common.log import Log
|
||||
from config import globalparam
|
||||
from config.confRelevance import ConfRelevance
|
||||
BASE_PATH = str(os.path.abspath(os.path.dirname(os.path.dirname(__file__))))
|
||||
CONF_PATH = BASE_PATH + "\\config\\config.ini"
|
||||
ENV_PATH = BASE_PATH + "\\report\\xml\\environment.xml"
|
||||
|
||||
CONF_PATH = globalparam.config_file_path +"\\config.ini"
|
||||
ENV_PATH = globalparam.xml_report_path+"\\environment.xml"
|
||||
|
||||
|
||||
class Init_Env:
|
||||
"""初始化环境信息,更新xml文件"""
|
||||
|
||||
def __init__(self):
|
||||
log = Log()
|
||||
log.info("获取环境配置信息")
|
||||
|
|
|
@ -17,10 +17,10 @@ from config import globalparam
|
|||
reportPath = globalparam.report_path
|
||||
logger = Log()
|
||||
# 配置收发件人
|
||||
recvaddress = ['wuzushun1992@163.com','627383987@qq.com']
|
||||
recvaddress = ['邮箱','']
|
||||
# 163的用户名和密码
|
||||
sendaddr_name = 'wuzushun@aliyun.com'
|
||||
sendaddr_pswd = 'inspur123'
|
||||
sendaddr_name = '邮箱'
|
||||
sendaddr_pswd = '密码'
|
||||
|
||||
class SendMail:
|
||||
def __init__(self,recver=None):
|
||||
|
|
4
run.py
4
run.py
|
@ -33,14 +33,12 @@ if __name__ == '__main__':
|
|||
|
||||
log = log.Log()
|
||||
|
||||
|
||||
|
||||
shell = shell.Shell()
|
||||
xml_report_path = globalparam.xml_report_path
|
||||
html_report_path = globalparam.html_report_path
|
||||
|
||||
# 初始化allure环境配置文件environment.xml
|
||||
# initialize_Env.Init_Env().init()
|
||||
initialize_Env.Init_Env().init()
|
||||
|
||||
# 定义测试集
|
||||
args = ['-s', '-q', '--alluredir', xml_report_path]
|
||||
|
|
|
@ -42,7 +42,5 @@ class TestLoin(mytest.MyTest):
|
|||
assert flag
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
pytest.main(["-s", "test_00_login.py"])
|
||||
|
|
Loading…
Reference in New Issue