我目前正在使用金牛座工具制作POC .
在我们公司,我们现在同时使用JMeter和Gatling.
我能够在我的测试中获得没有任何复杂配置的Gatling报告,但JMeter无法获得其报告.
谁能告诉我:
这个要求背后的原因是我们公司:
我希望有可能好像不是使用金牛座的NO-GO.
我尝试使用 taurus 并测试我的 Restapi。我的restapi 在 POST 请求中使用 JSON 主体。所以我找不到任何地方如何将 json 放入我的 POST 请求中。
我尝试这样做,但这不起作用。
execution:
- concurrency: 25
throughput: 25
ramp-up: 1m
hold-for: 5m
steps: 3
scenario: blazemeter-recording
scenarios:
blazemeter-recording:
timeout: 5s
retrieve-resources: false
store-cache: true
store-cookie: false
default-address: https://someurl
headers:
User-Agent: 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36'
Accept-Language: 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4'
Accept-Encoding: 'gzip, deflate, sdch'
Accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp'
requests:
- url: '/api/v8/url/url/url'
method: POST
label: '/api/v8/url/url/url'
headers:
Content-Type: application/json
body:
"{\"applicationId\":1,\"objectId\":196,\"tags\":[{\"tag\":\"#ObjectsFilter:filter:Data#\",\"objectId\":196,\"pagination\":{\"pageSize\":100}}]}"
Run Code Online (Sandbox Code Playgroud) 我有 locustio 文档中的下一个代码:
from locust import HttpLocust, TaskSet, between
def login(l):
l.client.post("/login", {"username":"ellen_key", "password":"education"})
def logout(l):
l.client.post("/logout", {"username":"ellen_key", "password":"education"})
def index(l):
l.client.get("/")
def profile(l):
l.client.get("/profile")
class UserBehavior(TaskSet):
tasks = {index: 2, profile: 1}
def on_start(self):
login(self)
def on_stop(self):
logout(self)
class WebsiteUser(HttpLocust):
task_set = UserBehavior
wait_time = between(5.0, 9.0)
Run Code Online (Sandbox Code Playgroud)
在蝗虫日志和蝗虫网络(localhost:8089)中我看到了接下来的任务
- /login
- /logout
- /
- /profile
Run Code Online (Sandbox Code Playgroud)
但是,如果我需要在一项任务中包含很少的请求并从完整的任务(而不是 1 个请求)中获取度量,该怎么办?
我想看到的是:
- login
- logout
- index
- profile
Run Code Online (Sandbox Code Playgroud)
我想查看任务名称而不是请求 url。在 Jmeter 中,我可以在一个操作中插入几个请求并获取操作时间(而不是请求)。