11.5.  Verifying the Configuration

Verifying with a Script

The installation of PDFUnit can be checked using a special program, started with the script verifyInstallation.bat or verifyInstallation.sh:

::
:: Verify the installation of PDFUnit
::

:: Change the installation directories depending on your situation:
set ITEXT_HOME=../itext-5.5.1
set JUNIT_HOME=../junit4.11
set VIP_HOME=../vip-1.0.0
set PDFUNIT_HOME=.

set CLASSPATH=%ITEXT_HOME%/*;%CLASSPATH%
set CLASSPATH=%JUNIT_HOME%/*;%CLASSPATH%
set CLASSPATH=%VIP_HOME%/*;%CLASSPATH%

... (shortened for documentation)

:: Run installation verification:
java org.verifyinstallation.VIPMain  --in   pdfunit_development.vip  
                                     --out  verifyInstallation_result.html
                                     --xslt ./lib/vip-1.0.0/vip-java_simple.xslt 

You have do edit the paths depending on your installation.

The stylesheet option is provided to use individual stylesheets. If you don't use a stylesheet, a simple one is used automatically.

The script produces the following output on the console:

Checking installation ...
... finished. Report created, see 'verifyInstallation_result.html'.

The resulting report file shows errors and information about the classpath, environment variables and other runtime related data:

Verifying as an XML Test

You can also verify the installation using an XML test. That makes it possible to check the environment of the currently running tests:

<comment>
  This tests verifies that all required libraries and files are found.
  Additionally it logs some system properties and writes 
  all of them into both an XML file and an HTML formatted file.
</comment>

<testcase name="verifyRequiredFilesAndLibraries">
  <verifyInstallation verificationFile="verifyInstallation.vip"/>
</testcase>

This XML test performs the same tests as the script described above. In case of a configuration error, the test is red and the error message refers to the report file:

The report file contains the same data as when it was created by a shell script.