JMeter之上传文件同时带有参数

文章目录

业务场景

针对下述接口构建jmeter测试,这是个post接口,在上传文件file的同时指定变量groupId的值

java 复制代码
	 @PostMapping("/importExcel")
    public ApiResultDto<String> importExcel(TagChildrenImportDto importDto) {
        SecurityUser user = SecurityUtils.getCurrentUser();
        return tagService.importExcel(importDto, user);
    }
    	
	public class TagChildrenImportDto {
	    @Schema(name = "file", description = "文件")
	    private MultipartFile file;
	    @Schema(name = "groupId", description = "分组id")
	    private UUID groupId;
	}
}

使用

在《参数》指定groupId,

在《文件上传》指定file

当《参数》模块有值的时候,《消息体数据》是无法点击的!必须要把《参数》模块的数据删除才能点击"消息体数据"

相关推荐
d***29243 分钟前
【spring】Spring事件监听器ApplicationListener的使用与源码分析
java·后端·spring
5***b977 分钟前
解决报错net.sf.jsqlparser.statement.select.SelectBody
java
6***B488 分钟前
存储过程(SQL)
android·数据库·sql
q***952213 分钟前
Tomcat下载,安装,配置终极版(2024)
java·tomcat
2***d88519 分钟前
详解tomcat中的jmx监控
java·tomcat
无敌最俊朗@28 分钟前
Qt事件循环队列剖析!!!
java
v***56540 分钟前
Spring Cloud Gateway 整合Spring Security
java·后端·spring
python零基础入门小白1 小时前
【万字长文】大模型应用开发:意图路由与查询重写设计模式(从入门到精通)
java·开发语言·设计模式·语言模型·架构·大模型应用开发·大模型学习
高山上有一只小老虎1 小时前
构造A+B
java·算法
学困昇1 小时前
C++中的异常
android·java·c++