Changeset 1279 for trunk/autoquest-plugin-html-test/src
- Timestamp:
- 07/26/13 09:48:30 (11 years ago)
- Location:
- trunk/autoquest-plugin-html-test/src/test
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-plugin-html-test/src/test/java/de/ugoe/cs/autoquest/plugin/html/HTMLLogParserTest.java
r1069 r1279 47 47 } 48 48 49 50 49 /** 51 50 * Tests the parseFile method with a given trace file. … … 53 52 */ 54 53 @Test 55 public void testParseFile () throws Exception {54 public void testParseFile_1() throws Exception { 56 55 HTMLLogParser parser = new HTMLLogParser(); 57 56 parser.parseFile(new File(ClassLoader.getSystemResource("htmlmonitor_testtrace_1.xml").getFile())); 57 Collection<List<Event>> events = parser.getSequences(); 58 59 assertNotNull(events); 60 assertEquals(1, events.size()); 61 62 Iterator<List<Event>> iterator = events.iterator(); 63 assertNotNull(iterator); 64 assertEquals(1, iterator.next().size()); 65 assertFalse(iterator.hasNext()); 66 67 System.err.println("{"); 68 for (List<Event> session : events) { 69 System.err.println(" {"); 70 for (Event event : session) { 71 System.err.print(" "); 72 System.err.print(event); 73 System.err.println(","); 74 } 75 System.err.println(" }"); 76 } 77 System.err.println("}"); 78 System.err.println("\n\n"); 79 80 GUIModel guiModel = parser.getGuiModel(); 81 assertNotNull(guiModel); 82 83 for (IGUIElement root : guiModel.getRootElements()) { 84 dumpGUIElement(root, guiModel, ""); 85 } 86 } 87 88 /** 89 * Tests the parseFile method with a given trace file. 90 * @throws Exception 91 */ 92 @Test 93 public void testParseFile_2() throws Exception { 94 HTMLLogParser parser = new HTMLLogParser(); 58 95 parser.parseFile(new File(ClassLoader.getSystemResource("htmlmonitor_testtrace_2.xml").getFile())); 59 96 Collection<List<Event>> events = parser.getSequences(); 60 97 61 98 assertNotNull(events); 62 assertEquals( 2, events.size());99 assertEquals(1, events.size()); 63 100 64 101 Iterator<List<Event>> iterator = events.iterator(); 65 102 assertNotNull(iterator); 66 assertEquals(1, iterator.next().size()); 67 assertEquals(3, iterator.next().size()); 103 assertEquals(2, iterator.next().size()); 68 104 assertFalse(iterator.hasNext()); 69 105 -
trunk/autoquest-plugin-html-test/src/test/resources/htmlmonitor_testtrace_1.xml
r1069 r1279 16 16 <param name="parent" value="h86vXoTkkOrxPJvwFGujZyUjp0nFxzYmOtMrHz500vZAAxC8BSUSVDPd9n3fW20TpuoYyduSITXbQTe3HGGYzA=="/> 17 17 </component> 18 <component id="IqqUnwzS3twFrjNEAUKWBJpweVh/BCQNQqWOJ7lWz8Sevl1DYKyYYy1vSJxVnnYR3kMWdYdnJ4hJ1ZSBNvYolQ=="> 19 <param name="tagname" value="html"/> 20 <param name="index" value="1"/> 21 <param name="parent" value="RN9UvPsVVUbCHJ1cAOMIRiO4f081bg4mviZhJC4UfsmHHm5WMIjOt1gkEVJxOCGUFw0jb5D3seQTLrbRvixYmw=="/> 22 </component> 23 <component id="h86vXoTkkOrxPJvwFGujZyUjp0nFxzYmOtMrHz500vZAAxC8BSUSVDPd9n3fW20TpuoYyduSITXbQTe3HGGYzA=="> 24 <param name="tagname" value="head"/> 25 <param name="index" value="1"/> 26 <param name="parent" value="IqqUnwzS3twFrjNEAUKWBJpweVh/BCQNQqWOJ7lWz8Sevl1DYKyYYy1vSJxVnnYR3kMWdYdnJ4hJ1ZSBNvYolQ=="/> 27 </component> 28 <component id="CtZKltwzZ7+x5+nx8lTLBeRxNKaya9S2pyfTFvMibEpNy2w2R8hIPXNOhcqFQp6fufjcASzBb3b899Zel3aAAQ=="> 29 <param name="tagname" value="script"/> 30 <param name="index" value="1"/> 31 <param name="parent" value="h86vXoTkkOrxPJvwFGujZyUjp0nFxzYmOtMrHz500vZAAxC8BSUSVDPd9n3fW20TpuoYyduSITXbQTe3HGGYzA=="/> 32 </component> 33 <component id="ZTvDsD/CzvnrudmS16OhgdWk06Jy+rXgU5z4lMWMRj9/3u+r5wqQUkU9Dw1/gYzIL7pZKcNSLLHpO0DzpIo9fQ=="> 34 <param name="tagname" value="script"/> 35 <param name="index" value="2"/> 36 <param name="parent" value="h86vXoTkkOrxPJvwFGujZyUjp0nFxzYmOtMrHz500vZAAxC8BSUSVDPd9n3fW20TpuoYyduSITXbQTe3HGGYzA=="/> 37 </component> 38 <component id="OahLE2sJAmolfdlTwY/LzEBm2EDhu0Q6tqkCj1r+Upv9d0a6/KgBaxPMYTe9EGILNpcbm9WZohbQfdqJakxG5Q=="> 39 <param name="tagname" value="body"/> 40 <param name="index" value="1"/> 41 <param name="parent" value="IqqUnwzS3twFrjNEAUKWBJpweVh/BCQNQqWOJ7lWz8Sevl1DYKyYYy1vSJxVnnYR3kMWdYdnJ4hJ1ZSBNvYolQ=="/> 42 </component> 43 <component id="9Ed8y91D9+l5a4zKtGSFJPosy//OXF2Tj2pmC7jO+5r1iqGBuMjlRRhiITsHOUuQbJNqL1bbt/k8h0shZJsbWw=="> 44 <param name="tagname" value="h1"/> 45 <param name="index" value="1"/> 46 <param name="parent" value="OahLE2sJAmolfdlTwY/LzEBm2EDhu0Q6tqkCj1r+Upv9d0a6/KgBaxPMYTe9EGILNpcbm9WZohbQfdqJakxG5Q=="/> 47 </component> 48 <component id="Y6PN1LUVUC9L+RrpFp72C6xMt+lhDjDhVLOfFoJ/h173Xl9cikyXO+g9UwnX5PqiMPu0EK9rxADcg+HVZsFsbQ=="> 49 <param name="tagname" value="form"/> 50 <param name="index" value="1"/> 51 <param name="parent" value="OahLE2sJAmolfdlTwY/LzEBm2EDhu0Q6tqkCj1r+Upv9d0a6/KgBaxPMYTe9EGILNpcbm9WZohbQfdqJakxG5Q=="/> 52 </component> 53 <component id="gCu0QxzFASfSF7rScLhNRolN613LuJEASzlG5W9B61G0t/wKinFLiz9b61WYuB522JCkEQNuGSUSSFyVsZMl+Q=="> 54 <param name="tagname" value="table"/> 55 <param name="index" value="1"/> 56 <param name="parent" value="Y6PN1LUVUC9L+RrpFp72C6xMt+lhDjDhVLOfFoJ/h173Xl9cikyXO+g9UwnX5PqiMPu0EK9rxADcg+HVZsFsbQ=="/> 57 </component> 58 <component id="HjnTtYFaEQjs+S/hu/C2TxcpKpJ7s9RQ2JKwmGcGArrWSYwrnYTrA7ffBhCBbF25wHJhGycF+xRDE1mzKhaREQ=="> 59 <param name="tagname" value="tbody"/> 60 <param name="index" value="1"/> 61 <param name="parent" value="gCu0QxzFASfSF7rScLhNRolN613LuJEASzlG5W9B61G0t/wKinFLiz9b61WYuB522JCkEQNuGSUSSFyVsZMl+Q=="/> 62 </component> 63 <component id="kD0akjZR6COBUh1Cr3dsaR2ti23J37C5jmgduSrNp2tumLrjW1sjPLzRyMydx1s7H8YcWbDNO1IytRomOy0Niw=="> 64 <param name="tagname" value="tr"/> 65 <param name="index" value="1"/> 66 <param name="parent" value="HjnTtYFaEQjs+S/hu/C2TxcpKpJ7s9RQ2JKwmGcGArrWSYwrnYTrA7ffBhCBbF25wHJhGycF+xRDE1mzKhaREQ=="/> 67 </component> 68 <component id="BDclTyhEWN62cIwpzpTH93CrimtXqR++xHLHpkhr7s2mGLMKjl6vt1jVDz+6bnPK5Q0fU0OSL5bn5DIfYbp69g=="> 69 <param name="tagname" value="th"/> 70 <param name="index" value="1"/> 71 <param name="parent" value="kD0akjZR6COBUh1Cr3dsaR2ti23J37C5jmgduSrNp2tumLrjW1sjPLzRyMydx1s7H8YcWbDNO1IytRomOy0Niw=="/> 72 </component> 73 <component id="N+2MUqCbnVTcF3U/duJY+8QpfjMNGehfAIeOF7dHco6T2QH/J0vo9RsdDsjkaQwD7I6Q0NzRSd+QJ/4jhZFbLQ=="> 74 <param name="tagname" value="th"/> 75 <param name="index" value="2"/> 76 <param name="parent" value="kD0akjZR6COBUh1Cr3dsaR2ti23J37C5jmgduSrNp2tumLrjW1sjPLzRyMydx1s7H8YcWbDNO1IytRomOy0Niw=="/> 77 </component> 78 <component id="3Amho279IVN0Ey2/pnJZq8Qw0KD0WMgghdUZsM764dbaTWQSvQSbYtJ4NI1pqxTgK+oqd72gK3UsY9pw529vMg=="> 79 <param name="tagname" value="tr"/> 80 <param name="index" value="2"/> 81 <param name="parent" value="HjnTtYFaEQjs+S/hu/C2TxcpKpJ7s9RQ2JKwmGcGArrWSYwrnYTrA7ffBhCBbF25wHJhGycF+xRDE1mzKhaREQ=="/> 82 </component> 83 <component id="aFk4jNvrJ0sa/SwnFBbKSfaWf0JZPaBSfT/y2mvafu8cZSOhm20ykZ4vGTef29aKlbLBXTEocNI4ODlxvm+hXg=="> 84 <param name="tagname" value="td"/> 85 <param name="index" value="1"/> 86 <param name="parent" value="3Amho279IVN0Ey2/pnJZq8Qw0KD0WMgghdUZsM764dbaTWQSvQSbYtJ4NI1pqxTgK+oqd72gK3UsY9pw529vMg=="/> 87 </component> 88 <component id="SlNCDsFGs3QlhnV59N2pi0ixZVuEjqZOx01hmv2naPqIbL3UML+0C82Gj+2aQ7FeqX7U90gk4bxrigsga+9lyw=="> 89 <param name="tagname" value="td"/> 90 <param name="index" value="2"/> 91 <param name="parent" value="3Amho279IVN0Ey2/pnJZq8Qw0KD0WMgghdUZsM764dbaTWQSvQSbYtJ4NI1pqxTgK+oqd72gK3UsY9pw529vMg=="/> 92 </component> 93 <component id="Q/jTRf/j5EpxAmOo/N2pfGXblpqQEKLbug5XpKiB/0G5H1MgXcV9H7y0/k0KG1i5YWgDT/Ws5qicsvpYffWe6A=="> 94 <param name="tagname" value="input_text"/> 95 <param name="index" value="1"/> 96 <param name="parent" value="SlNCDsFGs3QlhnV59N2pi0ixZVuEjqZOx01hmv2naPqIbL3UML+0C82Gj+2aQ7FeqX7U90gk4bxrigsga+9lyw=="/> 97 </component> 98 <component id="TBJVtmPiQC0+zTTMmrFn7eavPkU+C27UQkBvb8aI/IDWHus9kW6J7zToF1hqF+LhDLNY3fvLXOIwN64LXy+BqA=="> 99 <param name="tagname" value="tr"/> 100 <param name="index" value="3"/> 101 <param name="parent" value="HjnTtYFaEQjs+S/hu/C2TxcpKpJ7s9RQ2JKwmGcGArrWSYwrnYTrA7ffBhCBbF25wHJhGycF+xRDE1mzKhaREQ=="/> 102 </component> 103 <component id="2bfLWPsPC4AzDpmzCqhBZVixZvPP60cA1t13wVCPhBx5i6Mjfw11LIvx68BfisrL+lV3fMnvXArnxl/nwpdmEQ=="> 104 <param name="tagname" value="td"/> 105 <param name="index" value="1"/> 106 <param name="parent" value="TBJVtmPiQC0+zTTMmrFn7eavPkU+C27UQkBvb8aI/IDWHus9kW6J7zToF1hqF+LhDLNY3fvLXOIwN64LXy+BqA=="/> 107 </component> 108 <component id="rgrJ3qG9nKTjfs1Cb5UTOPWul3pmgetbKVyfT/mOiIIQ68h2T1NDzfrW1VovNOTRMtZPA1lE5fb/fjIzG2cHsg=="> 109 <param name="tagname" value="td"/> 110 <param name="index" value="2"/> 111 <param name="parent" value="TBJVtmPiQC0+zTTMmrFn7eavPkU+C27UQkBvb8aI/IDWHus9kW6J7zToF1hqF+LhDLNY3fvLXOIwN64LXy+BqA=="/> 112 </component> 113 <component id="AiciBvB9N5YdjEhMBKDU9iBMSYBJuGKfJtR8sXGRgEMHIXJOLMnWGaNIX2M0R0DFD2a4YRUNehWG/ahP2IyYQg=="> 114 <param name="tagname" value="textarea"/> 115 <param name="index" value="1"/> 116 <param name="parent" value="rgrJ3qG9nKTjfs1Cb5UTOPWul3pmgetbKVyfT/mOiIIQ68h2T1NDzfrW1VovNOTRMtZPA1lE5fb/fjIzG2cHsg=="/> 117 </component> 118 <component id="Y5+tr0eGbjfpkf0/bXIvDw3yBUQnAwpUCA6d5KRGo/ts9r9Xi89WMKmCdKO0T8HaXvn1sXwOsOwGASyoLu00cQ=="> 119 <param name="tagname" value="tr"/> 120 <param name="index" value="4"/> 121 <param name="parent" value="HjnTtYFaEQjs+S/hu/C2TxcpKpJ7s9RQ2JKwmGcGArrWSYwrnYTrA7ffBhCBbF25wHJhGycF+xRDE1mzKhaREQ=="/> 122 </component> 123 <component id="5d1P2UUEObmMhQhwYuJ5g0oDHqRxSj03XkbVav56m7T+R0oGQCp8mkEVPO/Tb8ju+Sob1WNF1InI607rAvt0Jg=="> 124 <param name="tagname" value="td"/> 125 <param name="index" value="1"/> 126 <param name="parent" value="Y5+tr0eGbjfpkf0/bXIvDw3yBUQnAwpUCA6d5KRGo/ts9r9Xi89WMKmCdKO0T8HaXvn1sXwOsOwGASyoLu00cQ=="/> 127 </component> 128 <component id="g3AxjzW3aFRXxGUmz7H3tyER54EDGAQLWNwNSmclqRjU78Lvib5EDn7L8Jl67yID5xOgC3iMLtuCOucoeZ102w=="> 129 <param name="tagname" value="td"/> 130 <param name="index" value="2"/> 131 <param name="parent" value="Y5+tr0eGbjfpkf0/bXIvDw3yBUQnAwpUCA6d5KRGo/ts9r9Xi89WMKmCdKO0T8HaXvn1sXwOsOwGASyoLu00cQ=="/> 132 </component> 133 <component id="GEWwCYEj6REdKvD5PKMJRmf7Hoe98ZotJtr9GUoQwayoCZ+AGYdWr4sjoxW8cPqXY941YALqCMyPgp3S7waYgA=="> 134 <param name="tagname" value="input_button"/> 135 <param name="index" value="1"/> 136 <param name="parent" value="g3AxjzW3aFRXxGUmz7H3tyER54EDGAQLWNwNSmclqRjU78Lvib5EDn7L8Jl67yID5xOgC3iMLtuCOucoeZ102w=="/> 137 </component> 18 138 <component id="6+HHIC3R288zTD+UMh/vyD4Fh9v7TxI7zL5+B4buXKbCxxRCsQN2hoIFYYHu3fwpl7o2PVIXEzB8T0pN6MGyGg=="> 19 139 <param name="tagname" value="title"/> -
trunk/autoquest-plugin-html-test/src/test/resources/htmlmonitor_testtrace_2.xml
r1069 r1279 140 140 <param name="timestamp" value="1360748853619"/> 141 141 </event> 142 <event type="onfocus"> 143 <param name="targetDocument" value="RN9UvPsVVUbCHJ1cAOMIRiO4f081bg4mviZhJC4UfsmHHm5WMIjOt1gkEVJxOCGUFw0jb5D3seQTLrbRvixYmw=="/> 144 <param name="targetDOMPath" value="/html[1]/body[1]/form[1]/table[1]/tbody[1]/tr[4]/td[2]/input_button[1]"/> 145 <param name="timestamp" value="1360748853624"/> 146 </event> 142 <component id="giA4EEWHDWQ+rdlMm2iEQHbxNGTKX6zv0NqDw5HkQ6yO/W+vqUUxvrfbBp4RCiynNnTFXURP9Nt5Dwo8l+KKPQ=="> 143 <param name="tagname" value="style"/> 144 <param name="index" value="1"/> 145 <param name="parent" value="h86vXoTkkOrxPJvwFGujZyUjp0nFxzYmOtMrHz500vZAAxC8BSUSVDPd9n3fW20TpuoYyduSITXbQTe3HGGYzA=="/> 146 </component> 147 <component id="7ssiu7ntpCQmpGZcRmyK8ILHpfCYuU8P13NkBgdxq18wKTP9IB5m6mj9XNupvE+l340cozkUR/s2UmZpQr2X3Q=="> 148 <param name="tagname" value="meta"/> 149 <param name="index" value="1"/> 150 <param name="parent" value="h86vXoTkkOrxPJvwFGujZyUjp0nFxzYmOtMrHz500vZAAxC8BSUSVDPd9n3fW20TpuoYyduSITXbQTe3HGGYzA=="/> 151 </component> 152 <component id="6+HHIC3R288zTD+UMh/vyD4Fh9v7TxI7zL5+B4buXKbCxxRCsQN2hoIFYYHu3fwpl7o2PVIXEzB8T0pN6MGyGg=="> 153 <param name="tagname" value="title"/> 154 <param name="index" value="1"/> 155 <param name="parent" value="h86vXoTkkOrxPJvwFGujZyUjp0nFxzYmOtMrHz500vZAAxC8BSUSVDPd9n3fW20TpuoYyduSITXbQTe3HGGYzA=="/> 156 </component> 157 <component id="RN9UvPsVVUbCHJ1cAOMIRiO4f081bg4mviZhJC4UfsmHHm5WMIjOt1gkEVJxOCGUFw0jb5D3seQTLrbRvixYmw=="> 158 <param name="path" value="/home/pharms/Dropbox/shares/research/generic-software-and-usability/programming/autoquest-htmlmonitor-test/src/test/resources/test.html"/> 159 <param name="title" value="AutoQUEST-Testpage"/> 160 <param name="parent" value="gN7wo3y1ib514bl2rDp2Zub5zpw4MJARB/sXCqoOO9F/+WxYcZcuypH1BljrYyqkMbgE4rprLf/OKtCuZHEngg=="/> 161 </component> 162 <component id="gN7wo3y1ib514bl2rDp2Zub5zpw4MJARB/sXCqoOO9F/+WxYcZcuypH1BljrYyqkMbgE4rprLf/OKtCuZHEngg=="> 163 <param name="host" value=""/> 164 <param name="port" value="80"/> 165 </component> 147 166 </session>
Note: See TracChangeset
for help on using the changeset viewer.