Today I had some time over and decided to work on my RSS Feed Reader extension for Chrome (I do think it needs a new name, don’t you? Or maybe it’s too late for that?). Certain things have been on the drawing board for a long time now: scrollbars, notifications, design issues, etc. I decided I’d write some tests instead.
Why? Because testing is awesome
One thing that always has left me with a bad-gut-feeling is pushing new releases to the public. This kind of extension should be able handle anything out there. How many poorly written RSS feeds aren’t there? And just how many different formats and interpretations of those format’s are out there? My guess is many. It’s hard to test all those different formats myself, especially whenI only subscribe to about 10 myself! So changing the parsing code is a big leap of faith for my soon-to-be 10 000 strong userbase.
In come the tests. They are designed to be run before each release as a sanity check that the code I’m shipping is bug-free. Or at least that it hasn’t introduced any new bugs in old previously working code. Sweet heaven. Can you imagine that? Running a command that assures you that it will work and that you can sleep worry free. It’s an enticing thought.
Writing tests is boring
The benefits with tests are many. The problem however that writing tests is tedious work. Instead of implementing cool features you write code to test what in your mind already is perfect. So choosing the right test framework is important. For RSS Feed Reader I’ve decided to use QUnit in a Node.js environment. Installing and everything is dead simple thanks to uptodate instructions and the Node Package Manager (NPM). The hard part is acquiring a large enough database of feeds to be relevant. Luckily developers before me have tackled this problem. A quick Google turned up this git repository of links to feeds – called Popular Feeds.
So now I’m going to scrape those to my harddrive and start writing the test code for all this. It won’t be as difficult and comprehensive as tests I’ve written for other projects. All I’m testing now is the parsing engine, so just attempting to parse all the feeds and checking that it doesn’t throw any exceptions should be fine. It might also prove to be a nice opportunity to optimize the process!
Wish me luck.
Not sure if this is the best place to offer some suggests for your RSS Feed Reader extension but here goes anyway. Things I would like to see:
Play a sound when a feed has new, unread content.
Add option to open all unread items for any given feed in new tabs.
Thanks for listening… :)
Of course, I found the open all unread context menu so now all I want for Christmas is to have it make noise when there ‘s new unread content available…
Thanks again.
Hi,
is it possible that there are problems with german umlauts? If I look at the Newsfeed http://www.getzner.com/rss.xml german umlauts are not displayed properly. The XML seems to be OK (utf-8).
Markus