Created Reducing test cases (markdown)
40
Reducing-test-cases.md
Normal file
40
Reducing-test-cases.md
Normal file
@ -0,0 +1,40 @@
|
||||
When you're asking for help or reporting an issue, someone else has to take their time, understand your problem, and recreate it. Because there are always many more people who want help than there are developers to help them, it's in everyones best interest if you put some effort into your report to make the jobs of the developers easier. We can see when people do this and prioritize helping them rather than people who don't :)
|
||||
|
||||
*If the problem happens on the demo at [plyr.io](https://plyr.io/), skip to [describing the problem](#describe-the-problem).*
|
||||
|
||||
### Check the console for errors
|
||||
|
||||
Before going further, start by checking the developer console for errors. If you don't know how to do this, use a search engine to find it (it varies per browser and operating system).
|
||||
|
||||
If you have errors. Check where in the code they happened. If it's your code, then it's probably your mistake too and not something you should be asking us, while if it's Plyr code it's likely a Plyr bug (it's not always this simple though).
|
||||
|
||||
### Isolate the issue
|
||||
|
||||
Remove everything you don't need to demonstrate the issue. Keep *only* the HTML and CSS needed to show the problem, *only* the javascript code related to the problem, and no external frameworks or libraries, unless the issue *only* happen with the specific library or framework.
|
||||
|
||||
If you don't know how the problem is happening, remove one isolated part at the time while testing if the problem remains. Doing this often helps you find out if it was a mistake that you made, or external factor that's not related to Plyr. If it's neither of these it'll help you get closer to the issue.
|
||||
|
||||
Libraries and frameworks are just code, so most of the time you have an issue with a library or framework breaking Plyr's behavior it's better to demonstrate it by writing code that creates the same problem that the library or framework did. If it's the other way (Plyr breaking a library or framework) it may be a good idea to include the library or framework in the replication demo, in addition to describing the issue and documenting the code. You should do this without making the assumption that the reader has used the library or framework before.
|
||||
|
||||
### Put it up online
|
||||
|
||||
Unless your issue is super simple to replicate, just showing us a code snippet or link to a website with the problem isn't enough. We have set up minimal Codepen templates that makes it easy for you to get started and creating test cases. You don't have to use Codepen in particular, but if you don't, then please something a similar to create a demo of the problem. It saves us a lot of time.
|
||||
|
||||
* [HTML5 video](https://codepen.io/pen?template=bKeqpr)
|
||||
* [HTML5 audio](https://codepen.io/pen?template=rKLywR)
|
||||
* [YouTube](https://codepen.io/pen?template=GGqbbJ)
|
||||
* [Vimeo](https://codepen.io/pen?template=bKeXNq)
|
||||
* [Dash.js integration](https://codepen.io/pen?template=zaBgBy)
|
||||
* [Hls.js integration](https://codepen.io/pen?template=oyLKQb)
|
||||
* [Shaka Player integration](https://codepen.io/pen?template=ZRpzZO)
|
||||
|
||||
If your issue isn't super complex (which it shouldn't be by now), you should be able to move the code to your new "pen" quite easily. If the problem only happens to you locally and not with our templates, it's probably due to issues with your local environment, server or media, which doesn't have anything to do with Plyr (see our [FAQ](https://github.com/sampotts/plyr/wiki/FAQ#1-does-plyr-work-with--))
|
||||
|
||||
### Describe the problem
|
||||
|
||||
When you report an issue on github or describe your problem on [our Slack](https://bit.ly/plyr-chat), we need to know the answer to these questions
|
||||
|
||||
* Does it happen *only* with specific options and/or specific browsers?
|
||||
* Does is happen *only* with HTML5 video, audio, YouTube, Vimeo or a specific library?
|
||||
* Link to where the issue is happening ([our demo](https://plyr.io/) or a codepen)
|
||||
* Are you getting any errors in the developer console?
|
Reference in New Issue
Block a user