Package eu.simuline.testhelpers
Class Actions.CoreRunner
- java.lang.Object
-
- java.lang.Thread
-
- eu.simuline.testhelpers.Actions.CoreRunner
-
- All Implemented Interfaces:
java.lang.Runnable
- Enclosing class:
- Actions
class Actions.CoreRunner extends java.lang.ThreadA thread in which a testclass is executed or at least a single testcase out of this testclass. Essentially, this is defined by the classtestClassName. The major task of this class is, to reloadtestClassNameusing a classloader which allows reloading each test run without restarting the tester application. The core of the code is copied fromJUnitCore.
-
-
Field Summary
Fields Modifier and Type Field Description private RunNotifiernotifierThe notifier to run the tests as in JUnitCore.private java.lang.StringtestClassNameThe name of the class to be tested.
-
Constructor Summary
Constructors Constructor Description CoreRunner(Actions.CoreRunner other)Copy constructor.CoreRunner(java.lang.String testClassName)Creates a runner running all testcases in the given test class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidpleaseStop()voidrun()Loads the class with nametestClassNamewith aTestCaseClassLoaderto allow reloading.voidrun(Request request)-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Field Detail
-
notifier
private final RunNotifier notifier
The notifier to run the tests as in JUnitCore.
-
testClassName
private final java.lang.String testClassName
The name of the class to be tested.
-
-
Constructor Detail
-
CoreRunner
CoreRunner(java.lang.String testClassName)
Creates a runner running all testcases in the given test class.
-
CoreRunner
CoreRunner(Actions.CoreRunner other)
Copy constructor.
-
-
Method Detail
-
run
public void run()
Loads the class with nametestClassNamewith aTestCaseClassLoaderto allow reloading. Then creates aRequestfiltering it withActions.filterdefining the tests to be run and runs those tests invokingrun(Request).- Specified by:
runin interfacejava.lang.Runnable- Overrides:
runin classjava.lang.Thread
-
run
public void run(Request request)
-
pleaseStop
public void pleaseStop()
-
-