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

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

相关推荐
阿维的博客日记2 小时前
MultipartFile 是不是表示仅仅是一个分片?
java·后端·spring·multipartfile
程序员无隅3 小时前
Coding Agent 为什么压缩上下文后还能继续工作?上下文模块设计拆解
java·开发语言·数据库
Python+993 小时前
Java 枚举类(Enum)详解:从基础到高级应用
java·开发语言·python
二炮手亮子3 小时前
浅记java线程池
java·开发语言
一路向北North3 小时前
Spring Security OAuth2.0(23):分布式系统授权-转发明文给微服务
java·spring·微服务
心中有国也有家5 小时前
AtomGit Flutter 鸿蒙客户端:Canvas 绘制进阶-路径、渐变与混合模式
android·javascript·flutter·华为·harmonyos
爱吃牛肉的大老虎5 小时前
rust基础之环境搭建
java·开发语言·rust
tellmewhoisi6 小时前
多版本共用redis的token有效期校验(过期重新登录)
java·redis·缓存
疯狂打码的少年6 小时前
【软件工程】结构化设计:模块独立性与耦合内聚
java·开发语言·笔记·软件工程
hunterandroid6 小时前
WorkManager 可靠性实战:唯一任务、重试与幂等设计
android·前端