On 02/23/10 18:45, Terrence Enger wrote:
On Thu, 2010-02-11 at 10:16 +0100, Stephan Bergmann wrote:
On 02/11/10 03:11, Terrence Enger wrote:
Let me pick on the first assertion which failed, and one which is
failing quite regularly. It is ...
Error: seekEntry(): Bad map
From File /home/terry/OOo_hacking/DEV300_m71/svl/source/misc/inettype.cxx
at line 818
Now addressed by
<http://www.openoffice.org/issues/show_bug.cgi?id=109146>.
How can I--or similarly situated newbies--contribute? Particularly, how
should I go about creating test cases? In other words where should I
start reading?
Test cases: Due to me currently working in that area on CWS sb118,
things are somewhat in flux right now. Once that CWS is integrated and
things have settled, the situation should be somewhat like this:
- You can write tests in plain JUnit or CppUnit (JUnit will become a
prerequisite for building OOo, CppUnit is available in module cppunit).
For CppUnit there is a slightly modified test runner cppunittester,
built at sal/cppunittester (for technical reasons, it is preferable if
the tester executable uses SAL_MAIN instead of plain main).
- Tests that require an elaborate test environment (e.g., a running OOo
instance to test against) are supported by Java and C++ libraries that
set up and tear down such environments (i.e., to be called from the
tests' setUp/tearDown) and makefile helpers to start the test runners
appropriately. For now, the libraries (from module test) support
starting/stopping an OOo instance to which the tests can connect via
UNO, and there is one helper solenv/inc/installationtest.mk makefile.
This will probably expand to cover other common needs of tests.
- All directories containing test code are added to the modules'
prj/build.lst files. Tests that cannot be built/run in a normal OOo
build, because they have build/run-time dependencies on other modules
higher up in the hierarchy (e.g., all tests requiring a running OOo
instance, which is only made available in topmost module
smoketestoo_native) have makefiles enclosed in
.IF"$(OOO_SUBSEQUENT_TESTS)"!="". That way, they are ignored on a first
build, and a second build to run all tests can be scheduled as "cd
smoketestoo_native && OOO_SUBSEQUENT_TESTS=x build --all".
Reading: For how to write tests, I would suggest the generic testing
and xUnit literature. Writing tests for specific parts of OOo probably
requires the same knowledge as when developing non-test code there, so
documentation pointers would be the same as for general newbie developers.
Let me know if you have any trouble going forward. Maybe you can
explain a concrete thing you would like to write a test for, and we can
see how to get started with that concrete example.
-Stephan
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.org
For additional commands, e-mail: dev-h...@openoffice.org