在Artillery.io中将int用于CSV文件

时间:2018-07-03 09:27:47

标签: javascript artillery

我正在尝试在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 }}"

0 个答案:

没有答案