← Back to Discord Forum

How to pass an external parameter to a test script and get it on a custom reporter

Hi everyone I just want to find out a way to add an external parameter(Like test case id of the related test case) to a test script and passed it to a custom reporter generated report

This thread is trying to answer question "How can an external parameter be added to a test script and passed to a custom reporter generated report?"

2 replies

Hi, this sounds like a job for annotations: https://playwright.dev/docs/test-annotations#custom-annotations

At least, the part of passing something from the test to the custom reporter.

If you need to pass something custom from command line to the tests, then often environment variables are used. https://playwright.dev/docs/test-parameterize#passing-environment-variables

Related Discord Threads

AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email luc@ray.run.