Skip to content

Custom metrics for playwright monitors #1875

@sevensolutions

Description

@sevensolutions

Is your feature request related to a problem? Please describe.
I'am using playwright monitors to monitor some websites where i need the flexibility to measure individual durations. Like login-duration, page-load duration etc.

Describe the solution you'd like
At the moment, a playwright test can only return a single value. It will be cool if i can return multiple values (metrics), which i can then use to attach some alerting rules to.
Each metric should also be shown in the overview (last value) and in the metrics tab (history).

Example API:

return {
    metrics: {
      loginDuration: endTime - startTime,
      pageLoadDuration: endTime2 - startTime2
    },
    screenshots: screenshots
};

Describe alternatives you've considered
At the moment i'am only using the single return value but i'am a little bit limited.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions