如何在 gatling 中修改 csv 提要文件

How to modify the csv feed file in gatling

我有一个这样的 user.csv 文件:

user, password
userid1, password1

我想解密csv文件中的密码。 一种方法是 .feed(csv("user.csv")) 然后

.exec(session => {
        val pwd = session("password").as[String]
        session.set("password", decrypt(pwd))//some function to decrypt the password
      })

现在我想在提供 csv 文件之前解密密码。在 Gatling 中有什么方法可以做到这一点吗?

您可以使用将转换给定值的函数向馈线定义添加转换。

https://gatling.io/docs/current/session/feeder/#converting

看起来像你的用例