Writer Unit tests

Markus Mohrhard markus.mohrhard at googlemail.com
Thu Mar 1 14:21:45 PST 2012


great to see someone interested in writer testing.

>        Well - writer unit tests are in sw/qa/core/ and I like the
> swdoc-test.cxx red-lining regression test - primarily because it doesn't
> work - and I didn't have time to dig into it ;-)
>        The idea was to create through random editing an arbitrarily complex
> red-lined document (ie. Edit->Changes->Record) and then thrash the core
> code that deals with that. Ideally we want to poke the layout engine too
> here but ... just getting the basics setup was not entirely trivial
> sadly.
>        I'd love someone to hack that - but no doubt Cedric . Markus have some
> better ideas.

We are working on some new idea for testing writer code. One idea that
is more or less ready and only needs someone having a bit of time
writing test cases is sw/qa/core/layout-test.cxx. The idea is that we
can import a document and then check that it does not crash and that
it is imported correctly.

The framework is more or less ready and we only need someone who is
willing to create test cases and write some code checking that the
document has been imported correctly. I think that Michael Stahls'
original test code from filters-test is helpful here too [1].

Then it should be not that difficult to test that the content has been
imported correctly. Miklos is already doing something similar in the
new rtf tests [2] and I think this should be a good idea for odt, doc
and docx, too. This mostly requires a bit of skill with writer's uno

Then there are some more rough ideas how we can make testing easier
but they are still in an early stage and I'm not sure how useful our
ideas are and if they will result in a new testing concept. But maybe
Cedric can add some more of his ideas.

I hope that this gives you some ideas what is already done and where
we have some room for improvements.


[1] http://cgit.freedesktop.org/libreoffice/core/commit/?id=247be4c2e6e31e73396cf7b9ce6abf37c617a2e2

[2] http://opengrok.libreoffice.org/xref/core/sw/qa/extras/rtftok/rtftok.cxx

More information about the LibreOffice mailing list