Message-ID: <1555345453.249.1386908986287.JavaMail.firstname.lastname@example.org> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_248_1436901824.1386908986287" ------=_Part_248_1436901824.1386908986287 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
The IzPack revamp comes with more tests which have been used for= the refactoring.
New code have been written with unit tests and integration tests has bee=
n made to check the overall sanity of the application.
The integratio= n test execute a compilation of an IzPack installer, load the generated jar= in the classpath and execute the installer. When the installer frame appea= r, a swing robot interact with the interface to realize the installation. This system allows to launch almost real installation and check live r= esult automatically on several platform.
We use several testing tools
Tests are automatically run by maven during the build. Just run &quo= t;mvn install" to run tests on the project.
You can run tests directly in your IDE.
If you use Eclipse, you ne= ed to install the TestNG eclipse plugin to run tests in th= e test-module.
It is possible to run graphical tests on a headless environment using Xv=
fb. Given that you have xvfb installed, you simply need to run
You can also run headless tests from your IDE by starting a Xvfb server = and specifying the DISPLAY variable to the DISPLAY created by the xvfb serv= er.
If you don't have Xvfb or don't want to run graphical tests, you can use=
the bamboo profile with maven (use -Pbamboo).
This profile run a spe= cial testNG suite excluding all tests using graphical elements.
First, you need to narrow what kind of tests you want.
Ideally, a test is considered as a unit if there is only one class and o= ne method under test, thus, they are small and fast but you need to restric= t the test to a minimum and mock others dependencies.
A test is not a unit test anymore when there are :
Basically, everything that is not a unit test is an integration tests.= p>
They are slower to run since there is more components to manage or there= is some i/o processing.
Those tests bootstrap and execute the entire application. They are heavy= and keep to a minimum but they are used to execute end-to-end test.
In the case of IzPack, functional tests run an installer compilation, lo= ad the created jar in the classpath and run the installer. Currently, they = are installation which are tested :