	public void onExecutionFinish(TestModel aModel, SuiteSummaryResult aResult) {
		if (captureConsoleOutput) {
			consoleInterceptor.stopIntercept();
		}
		stackPop().setAttribute(TEST_RUN_DURATION, nanoTimeToString(System.nanoTime() - executionStartTime));
		if (!isFork()) {
			long tempStart = System.nanoTime();
			stripTemporaryAttributes(document.getRootElement());
			FileOutputStream tempOutputStream;
			try {
				tempOutputStream = new FileOutputStream(outputFile);
			} catch (FileNotFoundException exc) {
				exc.printStackTrace();
				return;
			}
			try {
				if (transformHandling == TransformHandling.EXECUTE_TRANSFORM) {
					System.out.print("Transforming Integrity Result XML to HTML...");
					try {
						if (System.getProperty("javax.xml.transform.TransformerFactory") == null) {
							System.setProperty("javax.xml.transform.TransformerFactory",
									"com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl");
						}
						TransformerFactory tempTransformerFactory = TransformerFactory.newInstance();
						Transformer tempTransformer = tempTransformerFactory.newTransformer(new StreamSource(
								getXsltStream()));
						tempTransformer.setOutputProperty(OutputKeys.METHOD, "html");
						tempTransformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
						Source tempSource = new JDOMSource(document);
						StreamResult tempResult = new StreamResult(new FilterOutputStream(tempOutputStream) {
							private final char[] triggerOpenTagName = new char[] { 'x', 'm', 'l', 'd', 'a', 't', 'a' };
							private final char[] triggerCloseTagName = new char[] { '/', 'x', 'm', 'l', 'd', 'a', 't',
									'a' };
							private static final char TRIGGER_TAG_START = '<';
							private static final char TRIGGER_TAG_END = '<';
							private static final char TRIGGER_ATTRIBUTE = '"';
							private boolean insideXmlPart;
							private boolean insideAttribute;
							private boolean pastXmlPart;
							private int tagPosition;
							@Override
							public void write(int aByte) throws IOException {
								char tempChar = (char) aByte;
								if (!pastXmlPart) {
									if (!insideAttribute) {
										if (tempChar == TRIGGER_TAG_START) {
											tagPosition = 0;
										} else if (tempChar == TRIGGER_TAG_END) {
											tagPosition = -1;
										} else if (tagPosition >= 0) {
											if (insideXmlPart && tempChar == TRIGGER_ATTRIBUTE) {
												insideAttribute = true;
											} else {
												tagPosition++;
												if (insideXmlPart) {
													if (tagPosition < triggerCloseTagName.length - 1) {
														if (tempChar != triggerCloseTagName[tagPosition]) {
															tagPosition = 0;
														}
													} else if (tagPosition == triggerCloseTagName.length - 1) {
														insideXmlPart = false;
														pastXmlPart = true;
													}
												} else {
													if (tagPosition < triggerOpenTagName.length - 1) {
														if (tempChar != triggerOpenTagName[tagPosition]) {
															tagPosition = 0;
														}
													} else if (tagPosition == triggerOpenTagName.length - 1) {
														insideXmlPart = true;
														pastXmlPart = false;
													}
												}
											}
										}
									} else {
										if (insideXmlPart) {
											if (tempChar == TRIGGER_ATTRIBUTE) {
												insideAttribute = false;
											} else {
												if (tempChar == '<') {
													super.write("&lt;".getBytes("UTF-8"));
													return;
												} else if (tempChar == '>') {
													super.write("&gt;".getBytes("UTF-8"));
													return;
												}
											}
										}
									}
								}
								super.write(aByte);
							}
							@Override
							public void write(byte[] someBytes, int anOffset, int aLength) throws IOException {
								if (!pastXmlPart) {
									super.write(someBytes, anOffset, aLength);
								} else {
									out.write(someBytes, anOffset, aLength);
								}
							}
						});
						tempTransformer.transform(tempSource, tempResult);
					} catch (TransformerConfigurationException exc) {
						exc.printStackTrace();
					} catch (TransformerException exc) {
						exc.printStackTrace();
					}
				} else {
					System.out.print("Writing Result XML...");
					XMLOutputter tempSerializer = new XMLOutputter(Format.getPrettyFormat());
					tempSerializer.output(document, tempOutputStream);
				}
				long tempTime = System.nanoTime() - tempStart;
				System.out.println("done in " + ((double) (tempTime / 1000000) / 1000.0) + " seconds!");
			} catch (IOException exc) {
				exc.printStackTrace();
			} finally {
				try {
					tempOutputStream.close();
				} catch (IOException exc) {
				}
			}
		}
	}

	public void onExecutionFinish(TestModel aModel, SuiteSummaryResult aResult) {
		if (captureConsoleOutput) {
			consoleInterceptor.stopIntercept();
		}
		stackPop().setAttribute(TEST_RUN_DURATION, nanoTimeToString(System.nanoTime() - executionStartTime));
		if (!isFork()) {
			long tempStart = System.nanoTime();
			stripTemporaryAttributes(document.getRootElement());
			FileOutputStream tempOutputStream;
			try {
				tempOutputStream = new FileOutputStream(outputFile);
			} catch (FileNotFoundException exc) {
				exc.printStackTrace();
				return;
			}
			try {
				if (transformHandling == TransformHandling.EXECUTE_TRANSFORM) {
					System.out.print("Transforming Integrity Result XML to HTML...");
					try {
						if (System.getProperty("javax.xml.transform.TransformerFactory") == null) {
							System.setProperty("javax.xml.transform.TransformerFactory",
									"com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl");
						}
						TransformerFactory tempTransformerFactory = TransformerFactory.newInstance();
						Transformer tempTransformer = tempTransformerFactory.newTransformer(new StreamSource(
								getXsltStream()));
						tempTransformer.setOutputProperty(OutputKeys.METHOD, "html");
						tempTransformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
						Source tempSource = new JDOMSource(document);
						StreamResult tempResult = new StreamResult(new FilterOutputStream(tempOutputStream) {
							private final char[] triggerOpenTagName = new char[] { 'x', 'm', 'l', 'd', 'a', 't', 'a' };
							private final char[] triggerCloseTagName = new char[] { '/', 'x', 'm', 'l', 'd', 'a', 't',
									'a' };
							private static final char TRIGGER_TAG_START = '<';
							private static final char TRIGGER_TAG_END = '<';
							private static final char TRIGGER_ATTRIBUTE = '"';
							private boolean insideXmlPart;
							private boolean insideAttribute;
							private boolean pastXmlPart;
							private int tagPosition;
							@Override
							public void write(int aByte) throws IOException {
								char tempChar = (char) aByte;
								if (!pastXmlPart) {
									if (!insideAttribute) {
										if (tempChar == TRIGGER_TAG_START) {
											tagPosition = 0;
										} else if (tempChar == TRIGGER_TAG_END) {
											tagPosition = -1;
										} else if (tagPosition >= 0) {
											if (insideXmlPart && tempChar == TRIGGER_ATTRIBUTE) {
												insideAttribute = true;
											} else {
												tagPosition++;
												if (insideXmlPart) {
													if (tagPosition < triggerCloseTagName.length - 1) {
														if (tempChar != triggerCloseTagName[tagPosition]) {
															tagPosition = 0;
														}
													} else if (tagPosition == triggerCloseTagName.length - 1) {
														insideXmlPart = false;
														pastXmlPart = true;
														tagPosition = 0;
													}
												} else {
													if (tagPosition < triggerOpenTagName.length - 1) {
														if (tempChar != triggerOpenTagName[tagPosition]) {
															tagPosition = 0;
														}
													} else if (tagPosition == triggerOpenTagName.length - 1) {
														insideXmlPart = true;
														pastXmlPart = false;
														tagPosition = 0;
													}
												}
											}
										}
									} else {
										if (insideXmlPart) {
											if (tempChar == TRIGGER_ATTRIBUTE) {
												insideAttribute = false;
											} else {
												if (tempChar == '<') {
													super.write("&lt;".getBytes("UTF-8"));
													return;
												} else if (tempChar == '>') {
													super.write("&gt;".getBytes("UTF-8"));
													return;
												}
											}
										}
									}
								}
								super.write(aByte);
							}
							@Override
							public void write(byte[] someBytes, int anOffset, int aLength) throws IOException {
								if (!pastXmlPart) {
									super.write(someBytes, anOffset, aLength);
								} else {
									out.write(someBytes, anOffset, aLength);
								}
							}
						});
						tempTransformer.transform(tempSource, tempResult);
					} catch (TransformerConfigurationException exc) {
						exc.printStackTrace();
					} catch (TransformerException exc) {
						exc.printStackTrace();
					}
				} else {
					System.out.print("Writing Result XML...");
					XMLOutputter tempSerializer = new XMLOutputter(Format.getPrettyFormat());
					tempSerializer.output(document, tempOutputStream);
				}
				long tempTime = System.nanoTime() - tempStart;
				System.out.println("done in " + ((double) (tempTime / 1000000) / 1000.0) + " seconds!");
			} catch (IOException exc) {
				exc.printStackTrace();
			} finally {
				try {
					tempOutputStream.close();
				} catch (IOException exc) {
				}
			}
		}
	}
