blob: 529457da64c10fb79c23f77d88af8476867e47de [file] [log] [blame]
<?xml version="1.0"?>
<!DOCTYPE document SYSTEM "./dtd/document-v10.dtd">
<!-- ========================================================================= -->
<!-- Copyright (C) The Apache Software Foundation. All rights reserved. -->
<!-- -->
<!-- This software is published under the terms of the Apache Software License -->
<!-- version 1.1, a copy of which has been included with this distribution in -->
<!-- the LICENSE file. -->
<!-- ========================================================================= -->
<!-- ========================================================================= -->
<!-- author spei@cs.uiowa.edu -->
<!-- version $ID -->
<!-- ========================================================================= -->
<document>
<header>
<title>Batik: Regard Introduction</title>
<subtitle>A Regression Guard Tool in Java</subtitle>
<authors>
<person name="Sheng Pei" email="spei@cs.uiowa.edu"/>
<person name="Thierry Kormann" email="tkormann@apache.org"/>
<person name="Vincent Hardy" email="vincent.hardy@eng.sun.com"/>
</authors>
</header>
<body>
<s1 title="Regard Overview">
<p>
<!-- img src="images/logo.gif" alt="Batik Logo"/ -->
The idea of Regard is to have a tool that would automatically detect many kinds of regressions
during the development of Batik project. It uses Java 2D API's to produce the image difference to
visually faciliate the developer to distinguish regressions with improvement during the code
changes.
</p>
</s1>
<s1 title="Mechanism of Regard">
<p>
Before doing any regression check, there'll be an initilization, during which three
directories will be established:
regard-dir/svg : The SVG test files will be put under this directory
regard-dir/ref : The reference image files will be generated from the SVG files under
regard-dir/svg, before the code changes are made
regard-dir/new : The new image files will be generated from the SVG files under
regard-dir/svg, after the code changes are made, but before the
code changes will be checked in
</p>
<p>
After initilization, the users can generate the reference images from the SVG test files
before they make any changes to the Batik code; then after they made changes as they want,
and before they want the changes to be checked in to the Batik code base, the user should
generate new images from the same SVG test files and compare the new generated images with
the reference images. The result will be reported in an HTML file under the regard-dir.
If there's any regression, there'll be links in the report file directing to the difference
image, in which the original image, the new image and the difference between them is recorded.
</p>
</s1>
<s1 title="Usage of Regard">
<p>
General command:
java -classpath ... org.apache.batik.apps.regard.Main [-help|-init|-reset|-ref|-new|-diff]
</p>
<p>
-help Display the usage message
</p>
<p>
-init Initialize the workspace, generate a working directory of Regard and three sub-dir
under it: svg, ref and new
</p>
<p>
-ref Generate the reference image files from the SVG test files
</p>
<p>
-new Generate the new image files from the same SVG test files
</p>
<p>
-diff Generate the differnce report in an HTML file with links to the difference image
files, if any, that are stored under a sub-dir named diff
</p>
</s1>
</body>
</document>