Writer Unit tests
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
> 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 .
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  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.
More information about the LibreOffice