摘要: 1.在路径XXXXX\mydjango\mydjango\mydjango下新建views.py(在浏览器中url请求后所展示的内容设置) from django.http import HttpResponse def hello(request): return HttpResponse("He 阅读全文
posted @ 2020-11-12 17:05 亿逍遥 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 建议查看官方文档:https://docs.djangoproject.com/zh-hans/4.0/intro/tutorial01/ 1.本地安装python环境(略) 2.本地安装Django,在cmd中输入pip install Django==3.1.3 -i http://pypi.d 阅读全文
posted @ 2020-11-11 18:14 亿逍遥 阅读(541) 评论(0) 推荐(0) 编辑
摘要: 目的 1.需要将A.py中接口返回的某字段作为下一个B.py中是否跳过用例的判断 步骤 1.先将A.py中的接口返回的值存储到Map中 2.在B.py中利用map读取出变量 首先,先在util下创建GlobalMap.py import json,logging class GlobalMap: m 阅读全文
posted @ 2020-11-11 11:02 亿逍遥 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 版本说明 python: 3.7.4 httprunner:3.1.4 har2case:0.3.1 pytest-html 2.1.1 安装httprunner第三方库 pip install httprunner 安装har2case pip install har2case 查看是否安装成功 阅读全文
posted @ 2020-11-04 16:44 亿逍遥 阅读(255) 评论(0) 推荐(0) 编辑
摘要: 一.httprunner安装成功了,但是使用hrun -V查看版本号时,程序错误 原因:可能是python版本不支持,安装python36和python39均不支持,最后安装了python37,可以使用了。。。 二.查看了网上,安装httpruner后,运行hrun -V、har2case -V;但 阅读全文
posted @ 2020-10-22 18:07 亿逍遥 阅读(1628) 评论(0) 推荐(0) 编辑
摘要: MIME类型可根据抓包进行调整multipart/form-data;文件名称可进行参数化 备注: 最近在做上传文件接口时,postman可以调通,但是jmeter一直不通,抓包比较了两种调用方式后,jmeter上传文件提示:failed to decode multipart body,尝试了各种 阅读全文
posted @ 2020-10-22 16:30 亿逍遥 阅读(197) 评论(11) 推荐(0) 编辑
摘要: 接口A的返回值是接口B的入参 首先,先调通接口A 请求链接中可看到有一个时间戳参数ts,需要在接口A的Pre-request Script中进行设置 pm.environment.set('now',Math.round(new Date()/1000)+10); 然后就可以从接口A的返回内容中获取 阅读全文
posted @ 2020-10-09 13:15 亿逍遥 阅读(564) 评论(0) 推荐(0) 编辑
摘要: 参考地址 1.https://www.cnblogs.com/sundawei7/p/11956618.html#_label0_0 2.https://www.cnblogs.com/poloyy/tag/Pytest/ pytest和unittest区别 unittestpytest 用例编写规 阅读全文
posted @ 2020-09-11 18:34 亿逍遥 阅读(261) 评论(0) 推荐(0) 编辑
摘要: 使用的jmeter进行性能测试 先在本地编写测试脚本,没问题以后在服务器中运行 1.进入服务器jmeter的bin目录下,非GUI模式下压测: 2.运行:jmeter -n -t jmx脚本在服务器的存放路径 -l jtl文件生成路径 3.运行过程中可查看应用服务的日志,看是否报OOM等异常错误 4 阅读全文
posted @ 2020-08-05 16:25 亿逍遥 阅读(1091) 评论(0) 推荐(0) 编辑
摘要: 若本地安装不同版本的python环境,且需要将python37的第三方库在python38也安装一遍,方法如下: 先将python37中的第三方库信息生成txt文件 首先,先找到python37的安装路径 win+r,在cmd中访问python37的pip所在目录:D:\Python37\Scrip 阅读全文
posted @ 2020-08-05 14:28 亿逍遥 阅读(1612) 评论(2) 推荐(1) 编辑