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

[Bug]: Playwright Needs a Minimal Reproduction Template #29620

Closed
jwalkerinterpres opened this issue Feb 22, 2024 · 4 comments · Fixed by #29665
Closed

[Bug]: Playwright Needs a Minimal Reproduction Template #29620

jwalkerinterpres opened this issue Feb 22, 2024 · 4 comments · Fixed by #29665

Comments

@jwalkerinterpres
Copy link

jwalkerinterpres commented Feb 22, 2024

Version

Irrelevant

Steps to reproduce

  1. Try to file a bug against Playwright
  2. You can't, because you have no repro
  3. There's no information for how to provide a desired repro anywhere

Expected behavior

If a library is going to require a repro repo, it should explain what it exactly it wants. And really, it should provide a template: there should be a "Playwright Repro Repo" that anyone can clone to create a repro repo.

Ideally there would be one such repo for every language Playwright supports, but there should at least be one for Javascript (ie. the "lingua franca" of programming languages).

Actual behavior

No such repo exists (or if it does, it's not linked to in the template for this page). There's also no documentation or explanation of what is desired.

Additional context

No response

Environment

Irrelevant
@yury-s
Copy link
Member

yury-s commented Feb 22, 2024

If a library is going to require a repro repo, it should explain what it exactly it wants. And really, it should provide a template: there should be a "Playwright Repro Repo" that anyone can clone to create a repro repo.

It is up to you how you create the repro, sharing a github repo is arguably the most convenient but not the only way to achieve that. You can also create a template via npm init playwright my-repro and start from there. But usually when you have a bug you already have a project which just needs to be reduced to a minimal test and one doesn't need a template for that.

@jwalkerinterpres
Copy link
Author

jwalkerinterpres commented Feb 22, 2024

Of course the details of the repro are going to vary by bug.

But look, no one is just putting their entire codebase into a repro repository! And you wouldn't want us to, because 99.9% of that code would be irrelevant to the bug.

In the vast majority of cases, what people are submitting is a dummy playwright (with a demo test), and a dummy webserver (that's been configured to have a single demo page/route).

In other words, everyone who ever wants to submit a bug to Playwright has to repeat the same steps:

  1. Make a new repository
  2. Add a basic webserver to it, with a single example page/route to help demonstrate
  3. Add playwright to it, with a single test demonstrating the issue

Steps #1-3 are 100% the same for everyone. Then comes step #4: tweak the page and test to show your issue

But there's no reason to make everyone repeat #1-#3. And when everyone does them a different way, it makes things harder for you: you have to figure out how they setup their repro repo, if they used a webserver you don't know you have to learn it, etc.

With a repro template you would get every repro looking the exact same (modulo the actual issue details), while bug submitters would be saved time/effort.

@yury-s
Copy link
Member

yury-s commented Feb 22, 2024

But there's no reason to make everyone repeat #1.

For those who want to start from scratch we are talking about running npm init playwright bug-report vs. git clone some-url. Arguably same effort. You also making an assumption about how people approach this which varies and some just strip down existing project.

And when everyone does them a different way, it makes things harder for you: you have to figure out how they setup their repro repo, if they used a webserver you don't know you have to learn it, etc.

Having a template does not help here, the reproduction would still require bringing up the web server one way or the other and it might be easier to just take existing config rather that editing a template.

@jwalkerinterpres
Copy link
Author

jwalkerinterpres commented Feb 26, 2024

I think the new documentation change is great, but I really think you'd

A) make submitters life's easier, and
B) make your own life's easier

If you provided a single standard reproduction webserver. It could be a basic a server setup with https://www.npmjs.com/package/http-server, or you could have several variants (a React option, Angular option, etc.).

The point is, if I could run:

npx playwright repro

or:

npx playwright repro react

and have it generate both a playwright instance and a basic fake project instance, so that all I have to do is throw a single HTML file with my specific use case into the webserver ... that'd be a whole heck of a lot easier than the current process, AND every time someone submits a repro you'd know exactly how to spin it up to take a look.

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 a pull request may close this issue.

2 participants