摘要: from locust import HttpLocust, TaskSet, taskimport pymysqlimport randomclass UserBehavior(TaskSet): def on_start(self): db = pymysql.connect("ip地址", " 阅读全文
posted @ 2018-07-06 09:43 简单的回忆哈 阅读(344) 评论(0) 推荐(0) 编辑
摘要: db=pymysql.connect("ip地址","用户名","密码","数据库")cursor=db.cursor()cursor.execute("select * from zj_class limit 5")data=cursor.fetchall()for i in range(5): 阅读全文
posted @ 2018-07-06 09:39 简单的回忆哈 阅读(93) 评论(0) 推荐(0) 编辑