在我的下面代码中,我必须在userEmail
,userName
,userMobile
中使用多个值。
我怎么能使用csv配置?
{"userDevicedId":"d0lfwViLwLQ:APA91bH4VSXS7VlthXhGQ4DPfb3otSUvwMnpmcK-mKyh7WN46xtDXWSYIOLB6Uw-nYr3zSBZOoiicpNuURQ2nR-a9vtwwSI8sehG-FbgYi4AaCdgurLG5C3Le4sYE0Lmp-piz_STLYnB","userEmail":"Tok@gmail.com","userMobileNo":"8989898995","userName":"Tik","userPasskey":"xmrVhb2MpmuzgLN941tGiLtdJnY3yvgMxlhXATEUa7SvsxclTiMLdJgPs7YTbNHF","userPassword":"Test123$$"}
答案 0 :(得分:0)
鉴于您的CSV文件如下:
someone@example.com,someone,1234567890
someoneelse@example.com,someoneelse,2345678901
etc.
配置CSV数据集配置如下:
userEmail,userName,userMobile
在必要时引用${userEmail}
,${userName}
等提取的值,即如果您想发送参数化的JSON,它应该如下所示:
{
"userDevicedId": "d0lfwViLwLQ:APA91bH4VSXS7VlthXhGQ4DPfb3otSUvwMnpmcK-mKyh7WN46xtDXWSYIOLB6Uw-nYr3zSBZOoiicpNuURQ2nR-a9vtwwSI8sehG-FbgYi4AaCdgurLG5C3Le4sYE0Lmp-piz_STLYnB",
"userEmail": "${userEmail}",
"userMobileNo": "${userMobile}",
"userName": "${userName}",
"userPasskey": "xmrVhb2MpmuzgLN941tGiLtdJnY3yvgMxlhXATEUa7SvsxclTiMLdJgPs7YTbNHF",
"userPassword": "Test123$$"
}
如果您正在使用HTTP Request采样器,请将其切换为“正文数据”模式: