Posts Tagged ‘Unit Testing’

Beautiful (XMPP) Testing

Monday, November 2nd, 2009

O’Reilly recently released the book Beautiful Testing, a collection of essays about testing and QA in general. As I mentioned earlier, I wrote an article in that book on (unit) testing XMPP protocols, using Swift as a motivating example. Since the book’s scope may (oddly enough) not always be as interesting for developers in general, I released my article under a Creative Commons Attribution license (thanks to the good folks from O’Reilly for encouraging us to do this), which you can find here (or directly from my Git repository). The original excerpt from the book (including the index, list of biographies, and all the fancy artwork) is also available for download under the same license.

I of course encourage you to buy either the PDF or dead tree version of the book, as all the proceeds of the book go to charity.

“Beautiful Testing” XMPP Chapter

Sunday, May 3rd, 2009

Adam Goucher and Tim Riley (Director of QA at Mozilla) announced a few months ago that they are putting together a Beautiful Testing book for O’Reilly. I took the opportunity to write a chapter about testing in the context of XMPP (more specifically, about testing protocol implementations in Swift), and just submitted the final draft for technical review. The book is expected to be released this August.

(more…)

Improving QtTest usability with QtTestUtil

Thursday, November 6th, 2008

As much as I like CppUnit for writing C++ unit tests, I still prefer using Qt’s built-in QtTest module for Qt-based projects. This avoids a dependency on an external library, lowering the threshold for running and writing unit tests. Unfortunately, QtTest is very basic, and lacks some useful features such as automatic test registration and running multiple test suites in one test binary. In order to improve QtTest’s usability, I started creating some macros and classes that fill in some of the gaps, and bundled them into QtTestUtil.

(more…)

Going Agile with Google Summer of Code

Thursday, June 26th, 2008

Although Psi has had a fair number of succesful Google Summer of Code projects so far, we have experienced some failures as well: the summer before last, 3 out of 6 projects didn’t make the final deadline. A project’s failure was typically due to not having anything really usable at the end of the summer, regardless of the good work that was done during the past months. To reduce the risk of such surprises, I decided to take an Agile Development approach for this year’s ‘Roster improvement’ project.

(more…)

Improving Psi’s roster

Thursday, May 1st, 2008

For a while now, Psi users have been requesting several changes and additions to the roster (or `contact list‘). These requests include grouping contacts into meta-contacts, nested roster groups, and displaying user avatars in the roster. We have been postponing all these changes to the roster as much as possible, because none of us wanted to touch the roster code, for reasons I’ll explain below. This year, Psi is fortunate enough to have Adam Czachorowski (aka Gislan), a student from the Google Summer of Code, to work on roster improvements.

(more…)

Unit testing method overrides

Friday, March 7th, 2008

It probably happened to most of us developers before: while refactoring, you change the name of a virtual method, but forget to change the name of the overriding method in one of your derived classes. Compilation works fine, all unit tests pass, but your program doesn’t work: the overriding method is never called. Java (and C#) programmers can avoid this problem by putting @Override (and override) in front of their methods, which causes the compiler to print out an error message if the method is not overriding anything. However, most other languages leave you hanging with this problem. Luckily, with statically typed languages like C++, you can avoid these bugs by slightly adapting your unit tests.

(more…)

Testing Psi

Monday, October 1st, 2007

While the last bugs are being squeezed out of Psi 0.11’s release candidates, work on 0.12 has already begun. One thing I’m excited about as a developer is the fact that we’re making the Psi codebase `testable’, which has some nice consequences.

(more…)