我正在将炮兵与剧作家一起使用炮兵来衡量网站的性能指标,但是我没有得到配置中指定的指标。相反,我只看到与浏览器相关的指标。 我的炮兵配置:

问题描述 投票:0回答:0
import { Page } from "@playwright/test"; export const config = { target: "https://www.artillery.io", defaults: { capture: { response: ["status_code", "latency"], metrics: [ "http.response_time.p50", "http.response_time.p95", "http.response_time.p99", "http.response_time.min", "http.response_time.max", "http.request_rate", "http.codes.200", "http.codes.4xx", "http.codes.5xx", ], }, }, plugins: { expect: { enabled: true }, ensure: { thresholds: { "browser.page.TTFB.https://www.artillery.io/": { p95: 100 }, "vusers.session_length.min": 1000, "browser.page.codes.404": 0, }, }, }, engines: { playwright: { showAllPageMetrics: false }, }, phases: [{ duration: 10, arrivalRate: 1, name: "Usersarrival" }], }; export const scenarios = [ { engine: "playwright", testFunction: helloWorld, }, ]; export async function helloWorld(page: Page) { await page.goto("https://www.artillery.io/"); await page.click("text=Docs"); }

sissue: 我希望在我的报告中看到http.response_time.p50,http.response_time.p95等。但是,当我运行测试时,我只会得到浏览器级指标:

Browser.page.ttfb.https://www.artillery.io/:min:49.7,max:111,p95: 63.4 browser.page.FCP.https://www.artillery.io/: min: 348.7, max: 921.8, p95: 528.6 browser.page.codes.200: 580 browser.page.codes.404: 10 vusers.session_length :min:717.4,最大:2245.9,P95:1353.1

有人可以帮我吗?

设置没有效果,因为它不是炮兵的公认配置选项。 (看起来可能是由AI副驾驶建议的?)

您没有看到该块中定义的the-prefix的指标,因为基于剧作家的测试不会捕获这些指标。您可以在此处的官方文档中查看这些测试报告的指标列表:

Https://www.artillery.io/docs/reference/reference/Engines/playwright#metrics-reported-by-the-the-wengine-

playwright load-testing artillery
最新问题
© www.soinside.com 2019 - 2024. All rights reserved.