Changeset 1992 for trunk/autoquest-plugin-uml-test
- Timestamp:
- 07/08/15 10:52:51 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-plugin-uml-test/src/test/java/de/ugoe/cs/autoquest/plugin/uml/UMLUtilsTest.java
r1989 r1992 42 42 import de.ugoe.cs.autoquest.plugin.http.HTTPLogParser; 43 43 import de.ugoe.cs.autoquest.plugin.http.SOAPUtils; 44 import de.ugoe.cs.autoquest.plugin.http.SOAPUtils.SequenceOrder; 44 45 import de.ugoe.cs.autoquest.plugin.http.eventcore.SimpleSOAPEventType; 45 46 import de.ugoe.cs.autoquest.testgeneration.RandomWalkGenerator; … … 330 331 "_" + i, 331 332 properties.getProperty("test.context"), 332 true));333 Boolean.parseBoolean(properties.getProperty("testcases.data.random", "false")))); 333 334 lengths[i - 1] = sequence.size(); 334 335 i++; … … 383 384 Collection<List<Event>> sequences = parser.getSequences(); 384 385 385 // remove non SOAP events and convert to SimpleSOAPEventType386 Collection<List<Event>> tmpSeqs = SOAPUtils.convertToSimpleSOAPEvent(sequences, true);387 // normalize method names388 Collection<List<Event>> simpleSOAPSequences = SOAPUtils.normalizeOperationNames(tmpSeqs, properties386 sequences = SOAPUtils.removeNonSOAPEvents(sequences); 387 sequences = SOAPUtils.sortSequences(sequences, SequenceOrder.REQUEST); 388 sequences = SOAPUtils.convertToSimpleSOAPEvent(sequences, true); 389 sequences = SOAPUtils.normalizeOperationNames(sequences, properties 389 390 .getProperty("methodName.prefixToRemove"), properties 390 391 .getProperty("methodName.suffixToRemove")); 391 392 // remove calls to ignored services 393 Set<String> ignoredServices = new HashSet<>(); 394 String ignoredServicesString = properties.getProperty("test.ignored.services"); 395 if (ignoredServicesString != null) { 396 for (String service : ignoredServicesString.split(",")) { 397 ignoredServices.add(service.trim()); 398 } 399 } 400 401 for (List<Event> sequence : simpleSOAPSequences) { 402 for (Iterator<Event> eventIter = sequence.iterator(); eventIter.hasNext();) { 403 Event event = eventIter.next(); 404 SimpleSOAPEventType eventType = (SimpleSOAPEventType) event.getType(); 405 if (ignoredServices.contains(eventType.getServiceName())) { 406 eventIter.remove(); 407 } 408 else if( ignoredServices.contains(eventType.getClientName())) { 409 eventIter.remove(); 410 } 411 } 412 } 413 return simpleSOAPSequences; 392 sequences = SOAPUtils.removeCallsToIgnoredServices(sequences, properties.getProperty("test.ignored.services")); 393 394 return sequences; 414 395 } 415 396
Note: See TracChangeset
for help on using the changeset viewer.