artilleryio / artillery

The complete load testing platform. Everything you need for production-grade load tests. Serverless & distributed. Load test with Playwright. Load test HTTP APIs, GraphQL, WebSocket, and more. Use any Node.js module.
https://www.artillery.io
Mozilla Public License 2.0
7.94k stars 507 forks source link

artillery playwright does not publish metrics to honeycomb #1561

Open rakesh-rameshtr opened 2 years ago

rakesh-rameshtr commented 2 years ago

Version info:


Artillery Core: 2.0.0-22
Artillery Pro:  not installed (https://artillery.io/product)

Node.js: v17.9.0
OS:      darwin

    "artillery": "2.0.0-22",
    "artillery-engine-playwright": "^0.0.6",

Running this command:

 DEBUG=plugin:publish-metrics:honeycomb  npx artillery run   PlaywrightTests/specs/DMP/PerfTesting/config/hello-world.yml

YAML File

config:
  target: https://artillery.io
  # Enable the Playwright engine:
  engines:
    playwright: {}
  processor: "../flow.js"
  plugins:
    publish-metrics:
       - type: honeycomb
         apiKey: "{{ $processEnvironment.HONEYCOMB_API_KEY }}"
         dataset: "datasetname"
         sampleRate: 1
scenarios:
  - engine: playwright
    flowFunction: "helloFlow"
    flow: []

JS File

async function helloFlow(page, vuContext, events) {
  //
  // The code below is just a standard Playwright script:
  //
  // Go to https://artillery.io/
  await page.goto('https://artillery.io/');
  events.emit('counter', 'user.page_loads', 1);
  // Click text=Pricing
  await page.click('text=Pricing');
  // assert.equal(page.url(), 'https://artillery.io/pro/');
  // Click text=Sign up
  await page.click('text=Sign up');
}

module.exports = { helloFlow };

I expected to see this happen:

metrics should be available on Honeycomb

Instead, this happened:

Summary Report

--------------------------------
Summary report @ 10:35:36(-0400)
--------------------------------

engine.browser.http_requests: .................................................. 27
engine.browser.memory_used_mb:
  min: ......................................................................... 7.1
  max: ......................................................................... 7.1
  median: ...................................................................... 7
  p95: ......................................................................... 7
  p99: ......................................................................... 7
engine.browser.page.FCP.https://www.artillery.io/:
  min: ......................................................................... 760.3
  max: ......................................................................... 760.3
  median: ...................................................................... 757.6
  p95: ......................................................................... 757.6
  p99: ......................................................................... 757.6
engine.browser.page.LCP.https://www.artillery.io/:
  min: ......................................................................... 760.3
  max: ......................................................................... 760.3
  median: ...................................................................... 757.6
  p95: ......................................................................... 757.6
  p99: ......................................................................... 757.6
engine.browser.page.domcontentloaded: .......................................... 1
engine.browser.page.domcontentloaded.https://www.artillery.io/: ................ 1
engine.browser.page.dominteractive:
  min: ......................................................................... 622
  max: ......................................................................... 622
  median: ...................................................................... 620.3
  p95: ......................................................................... 620.3
  p99: ......................................................................... 620.3
engine.browser.page.dominteractive.https://www.artillery.io/:
  min: ......................................................................... 622
  max: ......................................................................... 622
  median: ...................................................................... 620.3
  p95: ......................................................................... 620.3
  p99: ......................................................................... 620.3
user.page_loads: ............................................................... 1
vusers.completed: .............................................................. 1
vusers.created: ................................................................ 1
vusers.created_by_name.0: ...................................................... 1
vusers.failed: ................................................................. 0
vusers.session_length:
  min: ......................................................................... 2791.9
  max: ......................................................................... 2791.9
  median: ...................................................................... 2780
  p95: ......................................................................... 2780
  p99: ......................................................................... 2780
  plugin:publish-metrics:honeycomb cleaning up +10s
hassy commented 2 years ago

hi @rakesh-rameshtr 👋 Honeycomb support is only available for HTTP tests at the protocol level currently (ie using the built-in http engine). Great feature request though, we'll look into extending it to support Playwright.

rakesh-rameshtr commented 2 years ago

@hassy do we support any other solution such as mixpanel or InfluxDB/Telegraf ?