Res facta quae tamen fingi potuit (
pauamma) wrote in
dw_dev_training2011-11-21 05:27 pm
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
![[site community profile]](https://www.dreamwidth.org/img/comm_staff.png)
Entry tags:
Question thread #3
It's time for another question thread!
The rules:
- You may ask any dev-related question you have in a comment. (It doesn't even need to be about Dreamwidth, although if it involves a language/library/framework/database Dreamwidth doesn't use, you will probably get answers pointing that out and suggesting a better place to ask.)
- You may also answer any question, using the guidelines given in To Answer, Or Not To Answer.
The rules:
- You may ask any dev-related question you have in a comment. (It doesn't even need to be about Dreamwidth, although if it involves a language/library/framework/database Dreamwidth doesn't use, you will probably get answers pointing that out and suggesting a better place to ask.)
- You may also answer any question, using the guidelines given in To Answer, Or Not To Answer.
Testing
So I'm working on Bug 2886, and I've reached the point (with lots of help!) where I MIGHT have a working patch. And now I need to test it.
And I'm kind of stuck, to be honest.
How do I go about designing a testing plan for a bug like this? What kind of use cases do I need to take into account?
Thanks, guys!
Re: Testing
- all 3 fields
- text + URL
- title + URL
- text + title
- text only
- title only
- URL only
Also, what happens if you put a URL in the title field? Text in the URL field? What happens if people use the URL to a picture? HTML in the title or text field?
Remember, when testing, you need to test both what you implemented, and what already existed, to make sure you didn't break it ;)
Good luck!
Re: Testing
- Links without a title (should still be possible to specify them, and they should still display correctly)
- Links with an empty title
- Links with a not-empty title that's shorter than the maximum allowed
- Links with a not-empty title that's exactly the maximum allowed
- Links with a not-empty title that's 1 byte longer than the maximum allowed
- Links with a not-empty title longer than that
- Links with a not-empty title with a Unicode character that straddles the maximum allowed (eg, if the maximum allowed is 40 bytes, what happens if a 2-byte Unicode character takes positions 40 and 41?)
- Links with HTML markup characters in the title (eg, innocuous-looking text"></a><script src="http://haxxor.example.net/pwned.js" /><a title=")
- Links with entities in the title, but no markup (like I ♥ titles)
- Links with a single or double quote in the title
Finally, it shouldn't break any existing automated tests (which isn't to say that all tests in our test suite need to pass, but any test that passed should still pass, and any test that failed should fail in roughly the same way). Note that the test suite can be overwhelming, so you may want to leave that for a reviewer/committer to check.