我正在尝试在artillery.io文件中使用int。我从.csv文件中引入了user_id和数量,但它们始终解析为字符串而不是整数。有没有什么办法解决这一问题?
下面是我到目前为止的代码:
config:
target: 'https://test.com'
phases:
- duration: 1
arrivalRate: 1
defaults:
headers:
Content-Type: 'application/json'
Authorization: 'Bearer: token
payload:
path: "tpd.csv"
fields:
- "user_Id"
- "amount"
- "reason"
- "external_transaction_id"
scenarios:
- flow:
- log: "{{ user_Id }}"
- post:
url: "/test/v2"
json:
user_id: "{{ user_id }}"
amount: "{{ amount }}"
reason: "{{ reason }}"
external_transaction_id: "{{ external_transaction_id }}"