QA/Testing/Subsequenttests

Preparing the build
To run the subsequenttests you will need to have a full build with Java and Junit enabled.

Keeping your desktop unaffected
On 3.5 and later versions, the tests run in headless mode on X11 based platforms, so they will not pop up windows on your desktop. In version 3.4 and older, or on non-X11 platforms, you can prevent windows on your desktop by running the tests on a different display, for example using VNC or Xephyr or Xnest or (insert Windows equivalent). vncserver export DISPLAY=:1

running all tests
To run all tests on versions 3.5 or newer, type this in the top-level directory, after having done a full build: make subsequentcheck The most convenient way is to do a full build, and then run the subsequent tests, all with a single short command from the top-level: make check subsequenttests will report logs of any failed test to stdout. In addition you will find the logs of all tests at ${WORKDIR}/JunitTest/${Testname}/done.log or ${WORKDIR}/CppunitTest/${Testname}.test.log for further investigation.

running all tests on older versions
To run all tests on versions 3.4 or older, type: export gb_COLOR=T gb_TITLES=T # some eyecandy subsequenttests -kj3 the -k and -j flags are simply passed on to GNU make: -k lets the test run continue even if a test fails -j3 lets three tests be run in parallel You can go very high with the parallelization, however at some point stability issues will pop up. Subsequenttests is also a stresstest for X11, so you might find errors in your implementation too (crashing X11/WMs etc. subsequenttests will report logs of any failed test to stdout. In addition you will find the logs of all tests at ${WORKDIR}/JunitTest/${Testname}/done.log or ${WORKDIR}/CppunitTest/${Testname}.test.log for further investigation.

Running all tests from one module
To run all tests in one module, do: cd ${MODULE} make -sr subsequentcheck

Running a selected C++ test
To run a selected C++ test, do: cd ${SOLARSRC} make -srf GNUmakefile.mk ${WORKDIR}/CppunitTest/${Testname}.test or cd ${MODULE} make -sr ${WORKDIR}/CppunitTest/${Testname}.test

Running a selected Java test
To run a selected Java test, do: cd ${SOLARSRC} make -srf GNUmakefile.mk ${WORKDIR}/JunitTest/${Testname}/done or cd ${MODULE} make -sr ${WORKDIR}/JunitTest/${Testname}/done

Running tests not headless
To run the test not in headless mode, add "gb_JunitTest_HEADLESS=" to the command line to set the variable empty. That will make the tests run without the "--headless" switch to LO.

Reporting failures
see on how to report test failures.

Adding your own complex tests
tbd