-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathconfig.py
More file actions
84 lines (76 loc) · 2.11 KB
/
config.py
File metadata and controls
84 lines (76 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import os
# 当前文件路径
current_path = os.path.dirname(__file__)
# 元素名称转换映射关系
element_name = {
"输入框": "_input",
"按钮": "_button",
"下拉列表": "_select",
"iframe": "_iframe",
"js": "_java_script",
"链接": "_link",
}
url = {
# 生成缓存路径
"page_object_file_path": current_path,
"delete": True
}
selenium = {
# selenium使用的浏览器
"browser": "firefox",
# 当前平台,如果没有指定默认使用当前系统
"os": "linux",
# 浏览器驱动地址
"driver_path": "/home/amdins/桌面/geckodriver",
"log_path": current_path,
"log_name": "geckodriver.log",
"delete_log": True
}
report = {
# 生成的测试脚本路径(是文件夹!)
"file_url": "/home/amdins/桌面/text",
# 测试报告路径
"report_file_path": "home/amdins/桌面/text/report.html"
}
email = {
"use_email": False,
# 邮件使用的服务器
"stmp_server_addr": "smtp.yeah.net",
# 邮件中发送者邮箱
"author": "[email protected]",
# 邮件中接受者邮箱
"recv_email": "[email protected]",
# 邮箱服务器用户名
"username": "Administrator",
# 邮箱服务器密码
"password": "AdministratorPwd",
# 使用的邮箱模板,default表示使用默认的,如果使用自定义模板需要指定模板路径
"template": "default",
# 邮箱发送的信息
"message": "Test Case",
# 邮箱的Subject
"title": "Test"
}
case = {
# 选择测试用例的类型 excel表示用excel文件中读取,db表示从数据库读取
"type": "excel",
# 文件路径或者db的uri
"url": "/home/amdins/桌面/SeleniumAutoTest/case.xlsx",
# 生成的case信息文件路径
"case_info": current_path,
# 是否序列化Packages
"serialize_packages": True,
# 是否删除序列化文件
"delete_serialize_packages": True,
# 序列化路径
"serialize_path": current_path,
# 用例起始url
"base_url": "https://music.163.com/"
}
image = {
"path": current_path
}
# 注册的插件
plugins = [
"assertion"
]