It’s been over a month now since Roop and I started working on getting the ODF support in KWord upto shape (Our work is sponsored by the NLNet foundation). To give us direction in pursuit of that holy grail, we started out automating the test suite at OpenDocument Fellowship.
We decided that we would take the tests one by one, make them work in KWord and then commit the test to the KWord repository.
Writing each test is quite a tedious task:
- Read the specification for the feature. As all specs go, it leaves some details to the imagination of the reader.
- The test case itself is then analyzed for correctness.
- We then run the test in KWord and check if it works as expected.
- If it does not work as expected, we fix KWord. This is the fun part
- Once the functionality is added/fixed in KWord, we finally get around to automating the testcase. We have a framework that compares the document (QTextDocument) created by a script (QtScript) and the document created by KWord. So, all we have to do to automate the test case is to write a QtScript that generates the expected document.
As it stands, out of a total of 160 test cases, 33 have been automated. So, thats 33 completely working ODF text features in KWord! Not bad for a month, eh? We have been a bit low this month though thanks to my super flaky internet connection (Tata Wimax, a big rant on this later) and Roop being occupied with getting the website up and running.
You can browse the test suite online here: http://websvn.kde.org/trunk/koffice/libs/kotext/opendocument/tests/