-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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]: Adding Steps to Trace via Playwright API #33047
Comments
Could you propose the API here so that we could agree on it. If things work, we'll mark it as open-to-a-pr. |
good question. i was initially thinking of something like not sure if so start would increase the indentation level by one with the title and the location in the options. |
What's in the |
I like the idea of being similar to I was actually thinking, that it would be more or less compatible to the current test.step and its arguments. it should have
I am really not that deep in the architecture of Playwright.test and tracing, so i can not judge the impact, but i was not thinking, that any change on Playwright Python can not create test reports, can it? but tracing in context is possible. API doc: TracinggroupThe Arguments
groupEndThe |
This is an example how it could look like with Robot Framework. Robot Framework Browser (the Playwright library) is using Playwright NodeJS, because we started already in March 2020. But i do think that this feature would really also benefit PW Java, Python and .NET! i.e. If people would use Playwright in Behave or Cucumber or SpecFlow/Reqnroll, they could also create groups in the logs for every behaviour step. Because Robot Framework is used mostly for higher level tests, like system test, acceptance tests, or BDD, one test case can have easily 80 playwright steps. Then it can be hard to identify the actual "high level step" of your test case in the trace viewer and see which low level playwright calls belong to which step. |
this issue has also been raised at microsoft/playwright-python#1949 |
@DeeplyDiligent that is good. it first needs to be implemented here, afaik, so that Python side can adopt. so the python community has already an active demand |
@pavelfeldman is that roughly what you have expected as explanation from me? |
Your proposal looks reasonable.
Depending on the implementation it will either work or not work. But I think a naive implementation that implements tracing.group on the server side would make it work.
By default, location should be the call location. It will happen automatically for a naive implementation as well. |
I now was start thinking about how to implement that and how it should behave. So the question that is bothering me right now: "Should it be allowed to use If i understand it correctly, the When there is a So |
I now played a bit in the code and started drafting the feature. Some thoughts about the behaviour.
One Issue i am thinking about is what should happen with groups opened before tracing is started. @pavelfeldman: if the code i have committed here is not absolutely unacceptable it would be cool to have a mentor which could give some quicker feedback and support. Thanks. |
🚀 Feature Request
hey y'all,
I am one of the maintainers of the Robot Framework Playwright integration.
I would like to start and stop steps in Tracing via Playwright API. (without test)
I mean these steps that are added in Playwright test with
test.step
This is a very cool Unique Selling Point of Playwright compared to others like cypress, etc..
We are not using Playwright.test, because the actual test runner is Robot Framework. But we would like to add the test steps, which are calling Playwright actions, executed in Robot Framework to the tracing. That would massively help analysing the logs on longer system level tests.
How do other Playwright implementation do that?
i think this would be an extremely helpful feature for other language implementation like Playwright Python as well.
Thank you!
Kind regards from the thousands of Playwright users from the Robot Framework Community.
Cheers
René
Example
all language implementation could offer steps to their testing frameworks.
one huge disadvantage for higher level tests of i.e. cypress is, that you do see only all these click, fill and so on in the logs.
For system tests or end2end tests this is really bad.
Playwright Test has a huge advantage there.
Motivation
we want to show the Robot Framework keywords in Trace viewers so that users know where it failed not only in robot logs but in trace.
The text was updated successfully, but these errors were encountered: