vmiklos.hu
shameless self-promoting website
»Root
»Rejourn root
»LibreOffice Community Blogs
Search:
  • Sunday, 27 January 2013
    lcov (Comments)

    There are multiple strategies how to add testcases for code that sort of works, but has no or too few tests. One approach (that works quite well in LibreOffice, for example) is to just add tests for new code, and there the test is "good", if it passes, but it fails if you revert the corresponding real change.

    An other approach to avoid duplicated tests is to use a tool like lcov, that can perform line or function coverage analysis for you, so a test is "good" if it increases the coverage. I wanted to look into this later approach for LibreOffice, but I decided it’s more fun to try this out for a smaller project first. That’s when adding testcases for BitlBee’s Skype plugin came into my mind.

    The problem there is that manual testing typically includes multiple online Skype clients and an IRC client as well, and such tests are extremely unreliable. So I thought: if I’m able to mock both the interactive IRC and Skype clients, then it’ll be easy to test the C Skype plugin itself, even for very special scenarios (like changing a groupchat topic in the middle of inviting somebody to a groupchat or similar).

    So here is the result looks like:

     skyped mock file   +--------+         +---------+   pyexpect mock file
    ------------------> | skyped | <-----> | bitlbee | <--------------------
                        +--------+   TCP   +---------+

    For skyped, the exact traffic is recorded and played back later; for BitlBee, only the outgoing traffic is exact, for the incoming traffic pyexpect allows just patterns (to allow tolerance for not interesting changes). Once the framework was available, it was quite easy to add testcases: I already have 70%+ coverage, and I think approaching the 100% function coverage is realistic. :-)

    What was also interesting is that it turned out the latest upstream lcov release is not compatible with gcc-4.7, but the necessary patches are now integrated, and the next upstream release will work out of the box.

    The BitlBee mock files can be found here. Given that there are now instructions to do similar analysis for LibreOffice as well, I hope to look into increasing test coverage for the classes I maintain as well.


  • Sunday, 24 July 2011
    bitlbee-skype is now merged (Comments)

    http://bitlbee.org/style/logo.png

    Back in April I had the idea to merge my bitlbee-skype plugin to the main BitlBee project. The reason is simple: BitlBee does not really have plugins (basically my Skype plugin was the only one) and because of this, ABI compatibility was not guaranteed, so I usually had to rebuild or even fix it after each BitlBee release (though Wilmer was helpful in case I was in doubt). Today this is all past, the plugin is part of the main BitlBee repo I won’t make separate bitlbee-skype releases anymore. (Latest version of the code is here, bzr info here.)

    I’m quite happy this little piece of software did not get lost, but now is in the hands of an active maintainer again. :) If you need help with BitlBee, ask on #bitlbee, at irc.oftc.net.


  • Monday, 03 January 2011
    bitlbee-skype now supports groups (Comments)

    I released bitlbee-skype 0.9.0 today. The last feature that triggered the relase born in git during the last two days: now it reads and writes Skype group info. This means if you have a Skype group "work", then you can just /j &work to see work contacts only, and /invite also works in that channel as expected.

    More in the BitlBee wiki and in the NEWS file.


  • Wednesday, 08 December 2010
    BitlBee-Skype 0.8.4 (Comments)

    I just released 0.8.4. The happy thing about it is that basically the only fix I added to this release is to make it work when python is python3k (so we need to use python2.7 to get python2 support), but the rest is just merge from:

    • email

    • github

    • Debian

    Now the total number of contributors increased to 7. :)


  • Friday, 05 November 2010
    BitlBee 3.0 (Comments)

    Even if I gave it a quick testing about two weeks ago, now I tried the new Twitter / identi.ca support and I like it a lot. Now messages are not coming from a single user by default, but a separate channel is created, nicks are appearing there, and I can just highlight people to reply to their last tweet or simply type to submit a new one.

    And of course my Skype module still works, as Wilmer fixed it up. :)


more »