Index: trunk/autoquest-plugin-html-test/src/test/java/de/ugoe/cs/autoquest/plugin/html/HTMLLogParserTest.java
===================================================================
--- trunk/autoquest-plugin-html-test/src/test/java/de/ugoe/cs/autoquest/plugin/html/HTMLLogParserTest.java	(revision 1340)
+++ trunk/autoquest-plugin-html-test/src/test/java/de/ugoe/cs/autoquest/plugin/html/HTMLLogParserTest.java	(revision 1496)
@@ -18,12 +18,12 @@
 
 import java.io.File;
+import java.io.FileOutputStream;
+import java.io.PrintWriter;
 import java.util.Collection;
-import java.util.HashMap;
 import java.util.Iterator;
-import java.util.LinkedList;
 import java.util.List;
-import java.util.Map;
 import java.util.logging.Level;
 
+import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -42,255 +42,266 @@
 public class HTMLLogParserTest {
 
-    /**
-    *
-    */
-   @Before
-   public void setUp() {
-       new TextConsole(Level.FINEST);
-   }
-
-   /**
-    * Tests the parseFile method with a given trace file.
-    * @throws Exception
-    */
-   @Test
-   public void testParseFile_1() throws Exception {
-       HTMLLogParser parser = new HTMLLogParser(new HashMap<String, List<String>>());
-       parser.parseFile
-           (new File(ClassLoader.getSystemResource("htmlmonitor_testtrace_1.xml").getFile()));
-       Collection<List<Event>> events = parser.getSequences();
-
-       assertNotNull(events);
-       assertEquals(1, events.size());
-       
-       Iterator<List<Event>> iterator = events.iterator();
-       assertNotNull(iterator);
-       assertEquals(1, iterator.next().size());
-       assertFalse(iterator.hasNext());
-
-       System.err.println("{");
-       for (List<Event> session : events) {
-           System.err.println("  {");
-           for (Event event : session) {
-               System.err.print("    ");
-               System.err.print(event);
-               System.err.println(",");
-           }
-           System.err.println("  }");
-       }
-       System.err.println("}");
-       System.err.println("\n\n");
-
-       GUIModel guiModel = parser.getGuiModel();
-       assertNotNull(guiModel);
-
-       for (IGUIElement root : guiModel.getRootElements()) {
-           dumpGUIElement(root, guiModel, "");
-       }
-   }
-
-   /**
-    * Tests the parseFile method with a given trace file.
-    * @throws Exception
-    */
-   @Test
-   public void testParseFile_2() throws Exception {
-       HTMLLogParser parser = new HTMLLogParser(new HashMap<String, List<String>>());
-       parser.parseFile
-           (new File(ClassLoader.getSystemResource("htmlmonitor_testtrace_2.xml").getFile()));
-       Collection<List<Event>> events = parser.getSequences();
-
-       assertNotNull(events);
-       assertEquals(1, events.size());
-       
-       Iterator<List<Event>> iterator = events.iterator();
-       assertNotNull(iterator);
-       assertEquals(2, iterator.next().size());
-       assertFalse(iterator.hasNext());
-
-       System.err.println("{");
-       for (List<Event> session : events) {
-           System.err.println("  {");
-           for (Event event : session) {
-               System.err.print("    ");
-               System.err.print(event);
-               System.err.println(",");
-           }
-           System.err.println("  }");
-       }
-       System.err.println("}");
-       System.err.println("\n\n");
-
-       GUIModel guiModel = parser.getGuiModel();
-       assertNotNull(guiModel);
-
-       for (IGUIElement root : guiModel.getRootElements()) {
-           dumpGUIElement(root, guiModel, "");
-       }
-   }
-
-   /**
-    * Tests the parseFile method with a given trace file.
-    * @throws Exception
-    */
-   @Test
-   public void testParseFile_3() throws Exception {
-       Map<String, List<String>> params = new HashMap<String, List<String>>();
-       List<String> list = new LinkedList<String>();
-       list.add("td[2]");
-       list.add("th");
-       params.put("clearIndex", list);
-       HTMLLogParser parser = new HTMLLogParser(params);
-       
-       parser.parseFile
-           (new File(ClassLoader.getSystemResource("htmlmonitor_testtrace_3.xml").getFile()));
-       Collection<List<Event>> events = parser.getSequences();
-
-       assertNotNull(events);
-       assertEquals(1, events.size());
-       
-       Iterator<List<Event>> iterator = events.iterator();
-       assertNotNull(iterator);
-       assertEquals(2, iterator.next().size());
-       assertFalse(iterator.hasNext());
-
-       System.err.println("{");
-       for (List<Event> session : events) {
-           System.err.println("  {");
-           for (Event event : session) {
-               System.err.print("    ");
-               System.err.print(event);
-               System.err.println(",");
-           }
-           System.err.println("  }");
-       }
-       System.err.println("}");
-       System.err.println("\n\n");
-
-       GUIModel guiModel = parser.getGuiModel();
-       assertNotNull(guiModel);
-
-       for (IGUIElement root : guiModel.getRootElements()) {
-           dumpGUIElement(root, guiModel, "");
-       }
-   }
-
-   /**
-    * Tests the parseFile method with a given trace file.
-    * @throws Exception
-    */
-   @Test
-   public void testParseFile_4() throws Exception {
-       Map<String, List<String>> params = new HashMap<String, List<String>>();
-       List<String> list = new LinkedList<String>();
-       list.add("html/body[1]/h1");
-       params.put("clearId", list);
-       HTMLLogParser parser = new HTMLLogParser(params);
-       
-       parser.parseFile
-           (new File(ClassLoader.getSystemResource("htmlmonitor_testtrace_4.xml").getFile()));
-       Collection<List<Event>> events = parser.getSequences();
-
-       assertNotNull(events);
-       assertEquals(1, events.size());
-       
-       Iterator<List<Event>> iterator = events.iterator();
-       assertNotNull(iterator);
-       assertEquals(2, iterator.next().size());
-       assertFalse(iterator.hasNext());
-
-       System.err.println("{");
-       for (List<Event> session : events) {
-           System.err.println("  {");
-           for (Event event : session) {
-               System.err.print("    ");
-               System.err.print(event);
-               System.err.println(",");
-           }
-           System.err.println("  }");
-       }
-       System.err.println("}");
-       System.err.println("\n\n");
-
-       GUIModel guiModel = parser.getGuiModel();
-       assertNotNull(guiModel);
-
-       for (IGUIElement root : guiModel.getRootElements()) {
-           dumpGUIElement(root, guiModel, "");
-       }
-   }
-
-   /**
-    * Tests the parseFile method with a given trace file.
-    * @throws Exception
-    */
-   @Test
-   public void testParseFile_5() throws Exception {
-       Map<String, List<String>> params = new HashMap<String, List<String>>();
-       List<String> list = new LinkedList<String>();
-       list.add("html/body[1]/h1(htmlId=id_h1)");
-       params.put("clearId", list);
-       HTMLLogParser parser = new HTMLLogParser(params);
-       
-       parser.parseFile
-           (new File(ClassLoader.getSystemResource("htmlmonitor_testtrace_4.xml").getFile()));
-       Collection<List<Event>> events = parser.getSequences();
-
-       assertNotNull(events);
-       assertEquals(1, events.size());
-       
-       Iterator<List<Event>> iterator = events.iterator();
-       assertNotNull(iterator);
-       assertEquals(2, iterator.next().size());
-       assertFalse(iterator.hasNext());
-
-       System.err.println("{");
-       for (List<Event> session : events) {
-           System.err.println("  {");
-           for (Event event : session) {
-               System.err.print("    ");
-               System.err.print(event);
-               System.err.println(",");
-           }
-           System.err.println("  }");
-       }
-       System.err.println("}");
-       System.err.println("\n\n");
-
-       GUIModel guiModel = parser.getGuiModel();
-       assertNotNull(guiModel);
-
-       for (IGUIElement root : guiModel.getRootElements()) {
-           dumpGUIElement(root, guiModel, "");
-       }
-   }
-
-   /**
-    * Helper method to print out GUIElements
-    * @param guiElement
-    * @param guiModel
-    * @param indent
-    */
-   private void dumpGUIElement(IGUIElement guiElement, GUIModel guiModel, String indent) {
-       assertTrue(guiElement instanceof HTMLGUIElement);
-
-       System.err.print(indent);
-       System.err.print(guiElement);
-
-       List<IGUIElement> children = guiModel.getChildren(guiElement);
-
-       if ((children != null) && (children.size() > 0)) {
-           System.err.println(" {");
-
-           for (IGUIElement child : children) {
-               dumpGUIElement(child, guiModel, indent + "  ");
-           }
-
-           System.err.print(indent);
-           System.err.print("}");
-       }
-
-       System.err.println();
-   }
+    /** */
+    private static final String PARSE_PARAM_FILE = "tmpParseParamFile";
+    
+    /**
+     *
+     */
+    @Before
+    public void setUp() {
+        new TextConsole(Level.FINEST);
+    }
+
+    /**
+     *
+     */
+    @After
+    public void tearDown() {
+        new File(PARSE_PARAM_FILE).delete();
+    }
+
+    /**
+     * Tests the parseFile method with a given trace file.
+     * @throws Exception
+     */
+    @Test
+    public void testParseFile_1() throws Exception {
+        HTMLLogParser parser = new HTMLLogParser(null);
+        parser.parseFile
+        (new File(ClassLoader.getSystemResource("htmlmonitor_testtrace_1.xml").getFile()));
+        Collection<List<Event>> events = parser.getSequences();
+
+        assertNotNull(events);
+        assertEquals(1, events.size());
+
+        Iterator<List<Event>> iterator = events.iterator();
+        assertNotNull(iterator);
+        assertEquals(1, iterator.next().size());
+        assertFalse(iterator.hasNext());
+
+        System.err.println("{");
+        for (List<Event> session : events) {
+            System.err.println("  {");
+            for (Event event : session) {
+                System.err.print("    ");
+                System.err.print(event);
+                System.err.println(",");
+            }
+            System.err.println("  }");
+        }
+        System.err.println("}");
+        System.err.println("\n\n");
+
+        GUIModel guiModel = parser.getGuiModel();
+        assertNotNull(guiModel);
+
+        for (IGUIElement root : guiModel.getRootElements()) {
+            dumpGUIElement(root, guiModel, "");
+        }
+    }
+
+    /**
+     * Tests the parseFile method with a given trace file.
+     * @throws Exception
+     */
+    @Test
+    public void testParseFile_2() throws Exception {
+        HTMLLogParser parser = new HTMLLogParser(null);
+        parser.parseFile
+        (new File(ClassLoader.getSystemResource("htmlmonitor_testtrace_2.xml").getFile()));
+        Collection<List<Event>> events = parser.getSequences();
+
+        assertNotNull(events);
+        assertEquals(1, events.size());
+
+        Iterator<List<Event>> iterator = events.iterator();
+        assertNotNull(iterator);
+        assertEquals(2, iterator.next().size());
+        assertFalse(iterator.hasNext());
+
+        System.err.println("{");
+        for (List<Event> session : events) {
+            System.err.println("  {");
+            for (Event event : session) {
+                System.err.print("    ");
+                System.err.print(event);
+                System.err.println(",");
+            }
+            System.err.println("  }");
+        }
+        System.err.println("}");
+        System.err.println("\n\n");
+
+        GUIModel guiModel = parser.getGuiModel();
+        assertNotNull(guiModel);
+
+        for (IGUIElement root : guiModel.getRootElements()) {
+            dumpGUIElement(root, guiModel, "");
+        }
+    }
+
+    /**
+     * Tests the parseFile method with a given trace file.
+     * @throws Exception
+     */
+    @Test
+    public void testParseFile_3() throws Exception {
+        PrintWriter out = new PrintWriter(new FileOutputStream(new File(PARSE_PARAM_FILE)));
+        out.println("td[2]=CLEAR_INDEX");
+        out.println("th=CLEAR_INDEX");
+        out.close();
+
+        HTMLLogParser parser = new HTMLLogParser(PARSE_PARAM_FILE);
+
+        parser.parseFile
+        (new File(ClassLoader.getSystemResource("htmlmonitor_testtrace_3.xml").getFile()));
+        Collection<List<Event>> events = parser.getSequences();
+
+        assertNotNull(events);
+        assertEquals(1, events.size());
+
+        Iterator<List<Event>> iterator = events.iterator();
+        assertNotNull(iterator);
+        assertEquals(2, iterator.next().size());
+        assertFalse(iterator.hasNext());
+
+        System.err.println("{");
+        for (List<Event> session : events) {
+            System.err.println("  {");
+            for (Event event : session) {
+                System.err.print("    ");
+                System.err.print(event);
+                System.err.println(",");
+            }
+            System.err.println("  }");
+        }
+        System.err.println("}");
+        System.err.println("\n\n");
+
+        GUIModel guiModel = parser.getGuiModel();
+        assertNotNull(guiModel);
+
+        for (IGUIElement root : guiModel.getRootElements()) {
+            dumpGUIElement(root, guiModel, "");
+        }
+    }
+
+    /**
+     * Tests the parseFile method with a given trace file.
+     * @throws Exception
+     */
+    @Test
+    public void testParseFile_4() throws Exception {
+        PrintWriter out = new PrintWriter(new FileOutputStream(new File(PARSE_PARAM_FILE)));
+        out.println("html/body[1]/h1=");
+        out.close();
+
+        HTMLLogParser parser = new HTMLLogParser(PARSE_PARAM_FILE);
+
+        parser.parseFile
+        (new File(ClassLoader.getSystemResource("htmlmonitor_testtrace_4.xml").getFile()));
+        Collection<List<Event>> events = parser.getSequences();
+
+        assertNotNull(events);
+        assertEquals(1, events.size());
+
+        Iterator<List<Event>> iterator = events.iterator();
+        assertNotNull(iterator);
+        assertEquals(2, iterator.next().size());
+        assertFalse(iterator.hasNext());
+
+        System.err.println("{");
+        for (List<Event> session : events) {
+            System.err.println("  {");
+            for (Event event : session) {
+                System.err.print("    ");
+                System.err.print(event);
+                System.err.println(",");
+            }
+            System.err.println("  }");
+        }
+        System.err.println("}");
+        System.err.println("\n\n");
+
+        GUIModel guiModel = parser.getGuiModel();
+        assertNotNull(guiModel);
+
+        for (IGUIElement root : guiModel.getRootElements()) {
+            dumpGUIElement(root, guiModel, "");
+        }
+    }
+
+    /**
+     * Tests the parseFile method with a given trace file.
+     * @throws Exception
+     */
+    @Test
+    public void testParseFile_5() throws Exception {
+        PrintWriter out = new PrintWriter(new FileOutputStream(new File(PARSE_PARAM_FILE)));
+        out.println("html/body[1]/h1(htmlId\\=id_h1)=");
+        out.close();
+        
+        HTMLLogParser parser = new HTMLLogParser(PARSE_PARAM_FILE);
+
+        parser.parseFile
+        (new File(ClassLoader.getSystemResource("htmlmonitor_testtrace_4.xml").getFile()));
+        Collection<List<Event>> events = parser.getSequences();
+
+        assertNotNull(events);
+        assertEquals(1, events.size());
+
+        Iterator<List<Event>> iterator = events.iterator();
+        assertNotNull(iterator);
+        assertEquals(2, iterator.next().size());
+        assertFalse(iterator.hasNext());
+
+        System.err.println("{");
+        for (List<Event> session : events) {
+            System.err.println("  {");
+            for (Event event : session) {
+                System.err.print("    ");
+                System.err.print(event);
+                System.err.println(",");
+            }
+            System.err.println("  }");
+        }
+        System.err.println("}");
+        System.err.println("\n\n");
+
+        GUIModel guiModel = parser.getGuiModel();
+        assertNotNull(guiModel);
+
+        for (IGUIElement root : guiModel.getRootElements()) {
+            dumpGUIElement(root, guiModel, "");
+        }
+    }
+
+    /**
+     * Helper method to print out GUIElements
+     * @param guiElement
+     * @param guiModel
+     * @param indent
+     */
+    private void dumpGUIElement(IGUIElement guiElement, GUIModel guiModel, String indent) {
+        assertTrue(guiElement instanceof HTMLGUIElement);
+
+        System.err.print(indent);
+        System.err.print(guiElement);
+
+        List<IGUIElement> children = guiModel.getChildren(guiElement);
+
+        if ((children != null) && (children.size() > 0)) {
+            System.err.println(" {");
+
+            for (IGUIElement child : children) {
+                dumpGUIElement(child, guiModel, indent + "  ");
+            }
+
+            System.err.print(indent);
+            System.err.print("}");
+        }
+
+        System.err.println();
+    }
 
 }
