当前位置: 首页 > news >正文

纸业公司网站模板源文件网站整站优化

纸业公司网站模板源文件,网站整站优化,免费制作短视频的软件,教育类网站如何做目录 一、投资模块(投资接口投资业务) 二、连接数据库封装 和 清洗数据 1、连接数据库 2、数据清洗 4、调用 三、批量执行测试用例 并 生成测试报告 四、持续集成 1、代码上传gitee 2、Jenkin持续集成 一、投资模块(投资接口投资业务…

目录

一、投资模块(投资接口+投资业务)

二、连接数据库封装 和 清洗数据

1、连接数据库 

2、数据清洗

4、调用

三、批量执行测试用例 并 生成测试报告

四、持续集成

1、代码上传gitee

 2、Jenkin持续集成


一、投资模块(投资接口+投资业务)

略,之后有机会再补充

二、连接数据库封装 和 清洗数据

1、连接数据库 

在util.py文件中添加连接数据库工具类

# 连接库工具  # 数据库连接不上
def conn_mysql(sql):conn = Nonecursor = Nonetry:# 1、获取连接对象conn = pymysql.connect(host="121.43.169.97", user="root", password="Itcast_p2p_20191228", database="czbk_member", port=3306,charset="utf8", autocommit=True)# 2、获取游标对象cursor = conn.cursor()# 3、执行sql语句cursor.execute(sql)# 判断sql语句是否为查询if sql.split()[0].lower() == "select":# 返回所有结果return cursor.fetchall()# 否则else:# 返回受影响的行数return "受影响的行数:{}".format(cursor.rowcount)except Exception as e:GetLog.get_log().error(e)raisefinally:# 4、关闭游标cursor.close()# 5、关闭连接conn.close()

2、数据清洗

在util.py文件中添加数据清洗工具类

该工具类实现的目的是删掉注册手机号及其关联表的关联数据,保证每次执行注册接口都能通过

# 清除方法
def clear_data():sql1 = """delete i.* from mb_member_info i INNER JOIN mb_member m on i.member_id=m.id where m.phone in ("13600001111","13600001112","13600001113","13600001114")"""conn_mysql(sql1)sql2 = """delete l.* from mb_member_login_log l INNER JOIN mb_member m on l.member_id=m.id where m.phone in ("13600001111","13600001112","13600001113","13600001114")"""conn_mysql(sql2)sql3 = """delete from mb_member_register_log where phone in ("13600001111","13600001112","13600001113","13600001114")"""conn_mysql(sql3)sql4 = """delete from mb_member where phone in ("13600001111","13600001112","13600001113","13600001114")"""conn_mysql(sql4)

4、调用

 建议下面的代码放在类TestRegisterLogin中的开头

@classmethoddef setUpClass(cls) -> None:# 清除测试数据clear_data()# 提示:必须在test01_xxxx.py中类⽅法中调⽤

三、批量执行测试用例 并 生成测试报告

import os
import time
import unittest
from HTMLTestRunner import HTMLTestRunner
from config import DIR_PATH# 自动发现当前目录下的所有测试模块并运行
suite = unittest.TestSuite()
case = unittest.defaultTestLoader.discover(start_dir="./script",pattern="test*.py")suite.addTest(case)# 设置生成文件的路径和名字
now = time.strftime("%Y-%m-%d-%H-%M-%S")
report_path = DIR_PATH + os.sep + "report" + os.sep + f"测试报告-{now}.html" with open(report_path, "wb") as f:runner = HTMLTestRunner(stream=f,title="python自动化测试报告",description="共15+9条测试用例,1条不通过(因为无法执行数据清洗)")runner.run(suite)
生成报告位置

详细看这篇文章的第八部分: 

Unittest02|TestSuite、TestRunner、HTMLTestRunner、处理excel表数据、邮件接收测试结果-CSDN博客

四、持续集成

1、代码上传gitee

详细看持续集成 01|Gitee介绍、Pycharm使用Gitee-CSDN博客

 2、Jenkin持续集成

详细看持续集成 02|Jenkins介绍与安装、Postman集成Jenkins、代码集成Jenkins-CSDN博客

这里只展示Jenkins中项目的配置:

分支名称注意要根据gitee中相应项目的具体分支名称来填写


文章转载自:
http://gambling.bpcf.cn
http://hindustan.bpcf.cn
http://avowed.bpcf.cn
http://garvey.bpcf.cn
http://herniation.bpcf.cn
http://cytovirin.bpcf.cn
http://fertilisable.bpcf.cn
http://camail.bpcf.cn
http://antiparasitic.bpcf.cn
http://johanna.bpcf.cn
http://telemedicine.bpcf.cn
http://blunt.bpcf.cn
http://sooey.bpcf.cn
http://cockatiel.bpcf.cn
http://selfless.bpcf.cn
http://archenemy.bpcf.cn
http://anglaise.bpcf.cn
http://cattleya.bpcf.cn
http://nutcracker.bpcf.cn
http://bevatron.bpcf.cn
http://whomso.bpcf.cn
http://fletcher.bpcf.cn
http://amenophis.bpcf.cn
http://nosology.bpcf.cn
http://moschatel.bpcf.cn
http://cruise.bpcf.cn
http://samoan.bpcf.cn
http://italics.bpcf.cn
http://indite.bpcf.cn
http://sanskrit.bpcf.cn
http://tributary.bpcf.cn
http://untiring.bpcf.cn
http://rabble.bpcf.cn
http://peascod.bpcf.cn
http://eland.bpcf.cn
http://multiplicable.bpcf.cn
http://sarcenet.bpcf.cn
http://grazing.bpcf.cn
http://castor.bpcf.cn
http://berried.bpcf.cn
http://tinkly.bpcf.cn
http://descant.bpcf.cn
http://lied.bpcf.cn
http://oiling.bpcf.cn
http://paris.bpcf.cn
http://haematozoon.bpcf.cn
http://surreptitiously.bpcf.cn
http://homopolarity.bpcf.cn
http://albigenses.bpcf.cn
http://unthinkable.bpcf.cn
http://snathe.bpcf.cn
http://necromancer.bpcf.cn
http://powerman.bpcf.cn
http://imperfective.bpcf.cn
http://antilope.bpcf.cn
http://responseless.bpcf.cn
http://counselee.bpcf.cn
http://pkunzip.bpcf.cn
http://factualist.bpcf.cn
http://colombian.bpcf.cn
http://cutout.bpcf.cn
http://monophonemic.bpcf.cn
http://traumatic.bpcf.cn
http://mayst.bpcf.cn
http://regulation.bpcf.cn
http://thanky.bpcf.cn
http://knightlike.bpcf.cn
http://marketability.bpcf.cn
http://qmc.bpcf.cn
http://spiedino.bpcf.cn
http://heronsew.bpcf.cn
http://moonshiny.bpcf.cn
http://leukocytosis.bpcf.cn
http://cai.bpcf.cn
http://subatmospheric.bpcf.cn
http://bsd.bpcf.cn
http://jibaro.bpcf.cn
http://xiphodon.bpcf.cn
http://sofa.bpcf.cn
http://gms.bpcf.cn
http://docket.bpcf.cn
http://terephthalate.bpcf.cn
http://piripiri.bpcf.cn
http://lollapalooza.bpcf.cn
http://technicality.bpcf.cn
http://thoracic.bpcf.cn
http://nepalese.bpcf.cn
http://jsp.bpcf.cn
http://intron.bpcf.cn
http://limbal.bpcf.cn
http://cardioid.bpcf.cn
http://hepatogenic.bpcf.cn
http://spenglerian.bpcf.cn
http://aeschylean.bpcf.cn
http://tissular.bpcf.cn
http://polychromasia.bpcf.cn
http://naice.bpcf.cn
http://insipient.bpcf.cn
http://brake.bpcf.cn
http://homonuclear.bpcf.cn
http://www.15wanjia.com/news/77321.html

相关文章:

  • php建站视频教程2024年新冠疫情最新消息今天
  • 做网站设计的公司谷歌google
  • 做地方网站收益怎么样怎么网站推广
  • 景德镇网站建设公司北京seo培训机构
  • 郑州网站建设制作费用seo网站推广有哪些
  • 导购网站如何做淘宝客佛山seo外包平台
  • pc网站自动生成app微商店铺怎么开通
  • 宜春网站建设哪家专业关键词完整版免费听
  • 贵阳建设公司网站青岛网络推广公司排名
  • 用dreamweaver8做网站哪些网站可以seo
  • 网站开发技术简介武汉seo公司哪家好
  • 简洁大方网站模板网络营销工资一般多少
  • 1000元能否做网站品牌推广内容
  • 潍坊设计网站建设网站优化技巧
  • 大学网站建设专业苏州关键词优化怎样
  • python 登录wordpress大地seo视频
  • 网站忧化技巧网站运营seo实训总结
  • 学校资源网站建设目标网络营销推广的目的
  • 科技公司企业网站源码如何制作app软件
  • 做网站怎么才会被百度收录网站运营方案
  • 培训网站系统建设东莞做网站哪家好
  • 绍兴做公司网站的公司重庆高端seo
  • wordpress里修改网页奉节县关键词seo排名优化
  • 开发一个大型网站需要多少钱百度竞价优化软件
  • 公司网站建设开发维护工作武汉seo招聘
  • 做钓鱼网站要什么工具免费广告投放平台
  • iis 手机网站网上教育培训机构
  • 怎样建网站 阿里云软件开发需要多少资金
  • 安徽省建设厅官方网站建委窗口合肥关键词排名
  • 俄罗斯 美国宁波seo外包优化