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

坑

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

相关推荐
Wang's Blog2 小时前
Java 项目实战:交友项目 - 我的访客:需求说明
java·开发语言·交友
麻瓜code2 小时前
Spring AI 全模块 API 字典一览(1.1.0 版)
人工智能·windows·spring
哲鲤3 小时前
Binder 不只是 IPC:从一次跨进程调用看懂 Android 与 AAOS 的架构演进
android
用户128139778163 小时前
Eyf半字节【3.0 版】正式发布|订单、单证、扫码三大核心模块全新重构
android
云析赢指标公式网43 小时前
文华财经指标源码笔记:WINNER筹码函数、控盘变量与MACD变体的调试记录
java·笔记·算法
从琳开始9893 小时前
从Socket到TCP回显服务器:Java网络编程完整指南
java·服务器·网络·tcp/ip·java-ee
养军博客3 小时前
Spring Security 4.x / 5.x / 6.x 配置全对比:前后端不分离与前后端分离
java·后端·spring·springsecurity
wifi___3 小时前
SpringBoot自动装配原理
java·spring boot·后端
SL_staff4 小时前
制造订单交付闭环实践:用跨部门计划模板解决缺料-停机-返工三角死循环
java·开源·产品
device_Any4 小时前
接口文档写着三个字段,接口返回了五个
android·java·linux