Skip to content
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

[Feature] ability group outputs in the trace viewer #1949

Closed
scott-au opened this issue Jun 1, 2023 · 8 comments · Fixed by #2660
Closed

[Feature] ability group outputs in the trace viewer #1949

scott-au opened this issue Jun 1, 2023 · 8 comments · Fixed by #2660

Comments

@scott-au
Copy link

scott-au commented Jun 1, 2023

the show steps/fixtures in the trace is certainly a nice feature released in 1.34 - grouping all the associated actions makes a trace file easier to go through.

is there any chance we could also have some sort of mechanism that allows us to group actions together in a similar fashion for users not using playwright test.

@DetachHead
Copy link

i looked into this and would like to have a go at implementing it. it seems straightforward, looks like trace events just need the parentId field in the metadata.

i will probably make a step context manager that works the same as the test.step method in @playwright/test

@EldoradoEU
Copy link

Any update ? I also looking for similar feature

@DetachHead
Copy link

unfortunately it turned out to be more difficult than i thought, so i went with a very hacky solution that's tied to my own project which i can't really share.

@mxschmitt would you happen to have some insight on how i could go about implementing this? do i need to expose TestInfo._addStep to python? if so, how?

@danielmhair
Copy link

danielmhair commented Apr 17, 2024

Grouping outputs is important to what I'm doing but I'm in Python, not typescript. I would love this feature!

@scott-au
Copy link
Author

unfortunately it turned out to be more difficult than i thought, so i went with a very hacky solution that's tied to my own project which i can't really share.

@mxschmitt would you happen to have some insight on how i could go about implementing this? do i need to expose TestInfo._addStep to python? if so, how?

@mxschmitt any guidance here ? sounds like @DetachHead is keen to submit a PR

@Snooz82
Copy link

Snooz82 commented Oct 17, 2024

this feature should be possible when microsoft/playwright#33081 is merged into Playwright NodeJS.

it introduces a grouping possibility for context.tracing.

Tracing.group('<group_name>')
it also can get a location as test.step but works without Playwright Test.

@Snooz82
Copy link

Snooz82 commented Nov 5, 2024

FYI: this feature has just been merged to core!🎊

Hi Dmitry (@dgozman),

is that already automatically added to Playwright-Python?

if so, i think this issue can also be closed.

Thanks
René

@mxschmitt mxschmitt added the v1.49 label Nov 5, 2024
@DetachHead
Copy link

they have a bot that automatically creates issues for porting changes from the main playwright repo. since your PR is mentioned in #2606 i guess this issue can now be closed

thanks for your work on this! i can finally delete a bunch of hacky patches from my project

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

Successfully merging a pull request may close this issue.

6 participants