1 18 19 23 package org.apache.jmeter.testelement; 24 25 import org.apache.jmeter.testelement.property.IntegerProperty; 26 27 30 public abstract class OnErrorTestElement extends AbstractTestElement 31 { 32 33 public final static int ON_ERROR_CONTINUE = 0; 34 public final static int ON_ERROR_STOPTHREAD = 1; 35 public final static int ON_ERROR_STOPTEST = 2; 36 37 38 public final static String ON_ERROR_ACTION = "OnError.action"; 39 40 protected OnErrorTestElement() 41 { 42 super(); 43 } 44 45 public void setErrorAction(int value) 46 { 47 setProperty(new IntegerProperty(ON_ERROR_ACTION, value)); 48 } 49 50 public int getErrorAction() 51 { 52 int value = getPropertyAsInt(ON_ERROR_ACTION); 53 return value; 54 } 55 56 public boolean isContinue() 57 { 58 int value = getErrorAction(); 59 return value == ON_ERROR_CONTINUE; 60 } 61 62 public boolean isStopThread() 63 { 64 int value = getErrorAction(); 65 return value == ON_ERROR_STOPTHREAD; 66 } 67 68 public boolean isStopTest() 69 { 70 int value = getErrorAction(); 71 return value == ON_ERROR_STOPTEST; 72 } 73 } 74 | Popular Tags |