更新readme文件
This commit is contained in:
parent
b147737743
commit
1cf3c8883b
23
README.md
23
README.md
|
@ -1,9 +1,8 @@
|
|||
# SensoroApi
|
||||
# SensoroApiAutoTest
|
||||
## 联系方式:
|
||||
- 对本框架有任何疑问均可加入自动化交流群:
|
||||

|
||||
- 如群二维码过期,请联系我微信拉你入群(记得备注添加原因): wj1641540482
|
||||

|
||||
- CSDN博客:https://blog.csdn.net/weixin_65784341?spm=1011.2415.3001.5343
|
||||
- 对本框架有任何疑问均可加我微信拉你入自动化交流群(记得备注添加原因): wj1641540482
|
||||

|
||||
## 实现功能:
|
||||
|
||||
- 测试数据隔离, 实现数据驱动
|
||||
|
@ -41,7 +40,7 @@
|
|||
,则需要先在终端执行下方的命令,将终端编码格式改为utf-8,再执行上方install命令,即可解决编码问题
|
||||
* ``` chcp 65001 ```
|
||||
* 或者直接使用pycharm自带的提示功能安装依赖包,推荐这种!!!
|
||||

|
||||

|
||||
|
||||
## 项目结构
|
||||
|
||||
|
@ -163,7 +162,15 @@
|
|||
|
||||
### 2.使用实例
|
||||
|
||||
#### 2.1接口定义及测试用例准备
|
||||
#### 2.1配置项目各环境默认参数
|
||||
- 在lins_environment.py中进行各个环境相关的基础配置
|
||||

|
||||
|
||||
#### 2.2配置项目运行相关参数
|
||||
- 在settings.py中配置项目运行的环境、通知方式、通知内容等
|
||||

|
||||
|
||||
#### 2.3接口定义及测试用例准备
|
||||
|
||||
- 定义接口,在pageApi目录下设计接口对象
|
||||
|
||||
|
@ -259,7 +266,7 @@ class TestLogin: # 测试类名
|
|||
expected: '账号异常①,请联系管理员'
|
||||
```
|
||||
|
||||
#### 2.1整体项目运行流程
|
||||
#### 2.4项目运行
|
||||
|
||||
- 方式1:在run.py中配置需要运行的测试用例及对整个测试的一些其他配置,然后直接右键运行该文件
|
||||
- 方式2:如果在Jenkins上运行,可以通过命令行启动的方式执行(此方式可以指定运行环境,是否发送通知等参数,例如:python3 run.py
|
||||
|
|
|
@ -19,6 +19,9 @@ CONFIGS_DIR = os.path.join(BASE_DIR, 'configs')
|
|||
# datas目录的路径
|
||||
DATAS_DIR = os.path.join(BASE_DIR, 'datas')
|
||||
|
||||
# files目录的路径
|
||||
FILES_DIR = os.path.join(BASE_DIR, 'files')
|
||||
|
||||
# pageApi目录的路径
|
||||
PAGE_API_DIR = os.path.join(BASE_DIR, 'pageApi')
|
||||
|
||||
|
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 247 KiB After Width: | Height: | Size: 247 KiB |
Binary file not shown.
After Width: | Height: | Size: 750 KiB |
Binary file not shown.
After Width: | Height: | Size: 560 KiB |
8
run.py
8
run.py
|
@ -21,7 +21,8 @@ from common.mail_sender import MailSender
|
|||
from common.robot_sender import EnterpriseWechatNotification
|
||||
from common.settings import IS_SEND_EMAIL, IS_SEND_WECHAT, wechat_webhook_url, wechat_content, email_content, \
|
||||
email_config, max_fail, rerun, reruns_delay
|
||||
from configs.dir_path_config import BASE_DIR, TEMP_DIR, PYTEST_REPORT_DIR, PYTEST_RESULT_DIR, ALLURE_REPORT_DIR
|
||||
from configs.dir_path_config import BASE_DIR, TEMP_DIR, PYTEST_REPORT_DIR, PYTEST_RESULT_DIR, ALLURE_REPORT_DIR, \
|
||||
FILES_DIR
|
||||
from utils.data_handle import DataProcessor
|
||||
from utils.file_handle import FileHandle
|
||||
from utils.report_data_handle import ReportDataHandle
|
||||
|
@ -72,8 +73,9 @@ if __name__ == '__main__':
|
|||
# 修改allure报告标题
|
||||
AllureReportBeautiful.set_report_name("Sensoro自动化测试报告")
|
||||
# 将本地启动脚本和查看allure报告方法放入报告目录下面
|
||||
FileHandle.copy_file(BASE_DIR + os.sep + 'open_report.sh', ALLURE_REPORT_DIR)
|
||||
FileHandle.copy_file(BASE_DIR + os.sep + '查看allure报告方法', ALLURE_REPORT_DIR)
|
||||
allure_files = os.path.join(FILES_DIR, 'allure_files')
|
||||
FileHandle.copy_file(allure_files + os.sep + 'open_report.sh', ALLURE_REPORT_DIR)
|
||||
FileHandle.copy_file(allure_files + os.sep + '查看allure报告方法', ALLURE_REPORT_DIR)
|
||||
|
||||
# ------------------------------发送通知消息----------------------------------
|
||||
# 发送企业微信群聊
|
||||
|
|
Loading…
Reference in New Issue