Clover coverage report -
Coverage timestamp: Sat Jul 7 2007 16:41:13 CEST
file stats: LOC: 49   Methods: 5
NCLOC: 20   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
FailingTest.java 50% 83.3% 100% 84.6%
coverage coverage
 1    /*
 2    * FailingTest.java
 3    *
 4    * Created on April 9, 2007, 3:17 PM
 5    *
 6    * JTR is free software; you can redistribute it and/or modify it under the
 7    * terms of the GNU General Public License as published by the Free Software
 8    * Foundation; either version 2, or (at your option) any later version.
 9    */
 10   
 11    package jtr.test.jee.client;
 12   
 13    import jtr.runners.AbstractRunner;
 14    import jtr.test.IOutcome;
 15   
 16    /**
 17    * This simple runner shows how to enrich outcomes, how exceptions are showed in
 18    * the JTR Console, and how to access the instance-count for the category it belongs
 19    * to.
 20    *
 21    * @author frusso
 22    * @version
 23    * @since
 24    */
 25    public class FailingTest extends AbstractRunner {
 26   
 27    /** Creates a new instance of FailingTest */
 28  20 public FailingTest() {
 29    }
 30   
 31  9990 public void test() throws Throwable {
 32  9996 int instances = getInstanceCount();
 33  9997 if(instances==0)
 34  0 throw new IllegalStateException("getInstanceCount cannot return a 0 value");
 35   
 36  9998 throw new RuntimeException("This runner test error reporting.");
 37    }
 38   
 39  10000 public void receiveFailureNotification(Throwable t, String msg) {
 40  10000 logger.error("The following error occurred in run/epoch "+getCurrentRun()+"/"+getEpoch());
 41    }
 42   
 43  20 public void cleanupResources() {
 44    }
 45   
 46  9999 public void enrichOutcome(IOutcome outcome) {
 47  9999 outcome.setUserObject("This is a sample message from the runner "+this.getClass().getSimpleName());
 48    }
 49    }