Testing Yandex tank-具有不同http头的多个请求

Testing Yandex tank-具有不同http头的多个请求,testing,http-headers,load-testing,yandex,yandex-tank,Testing,Http Headers,Load Testing,Yandex,Yandex Tank,有人试过使用http负载测试工具吗 我有一个用例来测试包含不同路径和查询参数以及不同http头耳的多个请求的http服务 例如,第一个请求类型-/test/user1?param1=1[X-Forwarded-For:192.168.0.1],第二个请求类型-/test/user2?param1=2[X-Forwarded-For:192.168.0.2] 问题是如何将ammo.txt文件配置为具有不同的http头 我试过: # load.conf [phantom] address=m

有人试过使用http负载测试工具吗

我有一个用例来测试包含不同路径和查询参数以及不同http头耳的多个请求的http服务

例如,第一个请求类型-/test/user1?param1=1[X-Forwarded-For:192.168.0.1],第二个请求类型-/test/user2?param1=2[X-Forwarded-For:192.168.0.2]

问题是如何将ammo.txt文件配置为具有不同的http头

我试过:

# load.conf    
[phantom]
address=myservice.loc #Target's address and port .
rps_schedule=line(1, 50, 1m) ## 1 minute, from 1 to 50 requests per second

# ammo.txt    
[X-Forwarded-For: 192.168.0.1]
/test/user1?param1=1    

[X-Forwarded-For: 192.168.0.2]
/test/user2?param1=2
测试执行正常,但所有请求的数据都具有X-Forwarded-For:192.168.0.1

我想知道如何配置ammo.txt以适合我的用例(使用不同的标题)? 您还可以建议一些替代工具来执行此操作吗?

使用URI格式时,不能有不同的标题

UPD:我们添加了一个新功能,现在您可以在uri样式的弹药中实现,请参阅。一个uri样式弹药的示例,带有标题修改:

[Connection: close]
[Host: target.example.com]
[Cookies: None]
/?drg tag1
/
/buy tag2
[Cookies: test]
/buy/?rt=0&station_to=7&station_from=9
您还可以按照所述的请求样式生成弹药。 具有不同“主机”头的请求样式弹药示例:

34 good
GET / HTTP/1.0
Host: xxx.tanks1.example.com
User-Agent: xxx (shell 1)

78 bad
GET /abra HTTP/1.0
Host: xxx.tanks2.example.com
User-Agent: xxx (shell 1)

79 unknown
GET /ab/ra HTTP/1.0
Host: xxx.tanks3.example.com
User-Agent: xxx (shell 1)

34 good
——这是标题,数字是以下请求的大小(以字节为单位)(包括行尾)。
good
是一个标记。

你能举个例子吗?