摘要: """@Name: config.py@Author: zengchuanyin@Date 2023/9/14-0:2 0"""import osimport yamlproject_path = os.path.split(os.path.abspath(__file__))PRO_DIR = p 阅读全文
posted @ 2024-04-30 18:13 遇事不决,量子力学 阅读(2) 评论(0) 推荐(0) 编辑
摘要: """@Name: data_conf.py@Author: zengchuanyin@Date 2023/6/11-16:19"""import yamlconf_path = "conf_env.yml"def get_data_from_yml(): with open('conf_env.y 阅读全文
posted @ 2024-04-30 18:12 遇事不决,量子力学 阅读(2) 评论(0) 推荐(0) 编辑
摘要: """@Name: test_django_service_01.py@Author: zengchuanyin@Date 2024/2/25-10:56"""import pytestimport loggingimport jsonfrom config import get_env_msgfr 阅读全文
posted @ 2024-04-30 18:11 遇事不决,量子力学 阅读(2) 评论(0) 推荐(0) 编辑
摘要: class ServiceBase(object): def __init__(self, host, vpath, headers: dict = None): self.host = host self.vpath = vpath self.headers = headers def befor 阅读全文
posted @ 2024-04-30 18:10 遇事不决,量子力学 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 使用 jmeter做分布式压测时,需要一台主机master做控制,以及需要至少一台以上slave机器来做负载机。只需要在 master,slave的 jmeter.properties做简单的配置就可实现(jmeter版本及 jdk 版本最好一致,避免出现不必要的兼容问题) 例如用 19.13.19 阅读全文
posted @ 2024-04-27 11:53 遇事不决,量子力学 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 添加一个后置处理器beanshell postprocessor, public String resUnicoding ( String resMsg ){ String[] asciis = resMsg.split ("\\\\u"); String nativeValue = asciis[ 阅读全文
posted @ 2024-01-30 23:26 遇事不决,量子力学 阅读(9) 评论(0) 推荐(0) 编辑
摘要: @ResponseBody @RequestMapping("/def/response/body/service") public StringBuilder defResponseBodyService(@RequestParam(name="count") Integer count,Http 阅读全文
posted @ 2023-11-28 21:33 遇事不决,量子力学 阅读(32) 评论(0) 推荐(0) 编辑
摘要: entity下创建类文件,类名分别为:ResponseXml,ResponseItemcontroller下创建xml响应体实现方法 getResponseWithXml ResponseXml Start import javax.xml.bind.annotation.*; //根标签@XmlR 阅读全文
posted @ 2023-11-12 18:14 遇事不决,量子力学 阅读(37) 评论(0) 推荐(0) 编辑
摘要: 假设父类: class Parent(object): def __init__(self): print("打印父类") print(__class__) self.p_name = "父类属性" self.p_code = "10000" def get_parent_function(self 阅读全文
posted @ 2023-10-28 17:57 遇事不决,量子力学 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 场景1:构造一个返回请求参数(表单入参),请求header,设置响应header的测试demo接口 框架:springboot @ResponseBody @RequestMapping("/test/api/v1") public Map serverPostTestv1(HttpServletR 阅读全文
posted @ 2023-08-19 10:43 遇事不决,量子力学 阅读(3) 评论(0) 推荐(0) 编辑