Class Actions.CoreRunner

  • All Implemented Interfaces:
    java.lang.Runnable
    Enclosing class:
    Actions

    class Actions.CoreRunner
    extends java.lang.Thread
    A thread in which a testclass is executed or at least a single testcase out of this testclass. Essentially, this is defined by the class testClassName. The major task of this class is, to reload testClassName using a classloader which allows reloading each test run without restarting the tester application. The core of the code is copied from JUnitCore.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.lang.Thread

        java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private RunNotifier notifier
      The notifier to run the tests as in JUnitCore.
      private java.lang.String testClassName
      The name of the class to be tested.
      • Fields inherited from class java.lang.Thread

        MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
    • 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
      void pleaseStop()  
      void run()
      Loads the class with name testClassName with a TestCaseClassLoader to allow reloading.
      void run​(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
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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.
    • Method Detail

      • run

        public void run()
        Loads the class with name testClassName with a TestCaseClassLoader to allow reloading. Then creates a Request filtering it with Actions.filter defining the tests to be run and runs those tests invoking run(Request).
        Specified by:
        run in interface java.lang.Runnable
        Overrides:
        run in class java.lang.Thread
      • run

        public void run​(Request request)
      • pleaseStop

        public void pleaseStop()