Skip to content

feat(html-reporter): add config options to ignore test steps on html reporter #36078

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

lucassodresa
Copy link

Context

Currently in my team we decided to go with playwright using Given When Then style to write our tests and make it in a common language with business. So as we also follow BDD approach we use our tests scenarios as living documentation and our currently living documentation is the html-reporter that works good for our case.

But there is a small problem for us using html-reporter. Since the html-reporter add some unwanted steps on the report. e.g. Before Hooks or After Hooks. That add no value to business people reading it.

So this pull request is to add a way to ignore/filter that unwanted steps making it more flexible.

image

@lucassodresa
Copy link
Author

@microsoft-github-policy-service agree

This comment has been minimized.

@lucassodresa lucassodresa force-pushed the feat/add-ignore-test-step-from-html-reporter branch 2 times, most recently from 3b45a9b to 020c768 Compare May 24, 2025 01:04
@lucassodresa
Copy link
Author

@microsoft-github-policy-service agree

This comment has been minimized.

@lucassodresa lucassodresa force-pushed the feat/add-ignore-test-step-from-html-reporter branch from 020c768 to d46d48b Compare May 24, 2025 11:22

This comment has been minimized.

@lucassodresa lucassodresa changed the title feat(html-reporter): add ignore test steps config on html reporter feat(html-reporter): add config options to ignore test steps on html reporter May 24, 2025
Copy link
Contributor

Test results for "tests 1"

1 failed
❌ [playwright-test] › reporter-html.spec.ts:2892:5 › merged › execSync doesnt produce a second stdout attachment @macos-latest-node18-2

6 flaky ⚠️ [firefox-library] › library/inspector/cli-codegen-1.spec.ts:986:7 › cli codegen › should not throw csp directive violation errors @firefox-ubuntu-22.04-node18
⚠️ [playwright-test] › ui-mode-test-ct.spec.ts:155:5 › should watch test @macos-latest-node18-1
⚠️ [playwright-test] › ui-mode-test-watch.spec.ts:145:5 › should watch all @ubuntu-latest-node20-1
⚠️ [webkit-library] › library/ignorehttpserrors.spec.ts:30:3 › should isolate contexts @webkit-ubuntu-22.04-node18
⚠️ [webkit-page] › page/page-screenshot.spec.ts:345:5 › page screenshot › should work while navigating @webkit-ubuntu-22.04-node18
⚠️ [playwright-test] › ui-mode-test-watch.spec.ts:145:5 › should watch all @windows-latest-node18-1

39228 passed, 804 skipped
✔️✔️✔️

Merge workflow run.

@pavelfeldman
Copy link
Member

I like the idea, but I'm not sure I like the implementation. I'd rather

  1. make a GUI option to hide hooks and fixtures
  2. hide readonly / getters from the report by default
  3. use step boxing on your end for everything else

It is best to start with filing a feature request, shaking hands on it and proceeding with the implementation later.

@pavelfeldman
Copy link
Member

I think (2) allHeaders is already hidden btw

@lucassodresa
Copy link
Author

I think (2) allHeaders is already hidden btw

I'm using the version ^1.49.1 maybe it is better to me to update 😅

@lucassodresa
Copy link
Author

I like the idea, but I'm not sure I like the implementation. I'd rather

  1. make a GUI option to hide hooks and fixtures
  2. hide readonly / getters from the report by default
  3. use step boxing on your end for everything else

It is best to start with filing a feature request, shaking hands on it and proceeding with the implementation later.

@pavelfeldman sure
I like more you idea of make it dynamic and controlled by the user to hide or show.

Let me create a feature request issue to make it happens and we can discuss the implementation there.

So should I close this PR then, right?

@pavelfeldman
Copy link
Member

Yep, let's close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants