Class EUnitTestRunner

java.lang.Object
org.junit.runner.Runner
org.junit.runners.ParentRunner<EUnitTest>
org.eclipse.epsilon.eunit.junit.EUnitTestRunner
All Implemented Interfaces:
org.junit.runner.Describable, org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.Orderable, org.junit.runner.manipulation.Sortable
Direct Known Subclasses:
EclipseEUnitTestRunner

public class EUnitTestRunner extends org.junit.runners.ParentRunner<EUnitTest>

Bridge runner between EUnit and JUnit. Can be used to turn an EUnit script into a JUnit Plug-in Test, for continuous integration.

This runner should only be used with test classes that implement the IEUnitSuite interface for specifying the URI to the .eunit script and reloading the models between tests.

Unlike previous EUnit test runners that only supported a subset of EUnit, this runner supports every feature in EUnit except for those specific to Ant, such as runTarget, useVariable, exportVariable and loadHutn.

Users can provide additional built-in operations for their tests by implementing the IEUnitSuite.getOperationContributor() method appropriately. This can be useful when invoking EVL code, for instance, as we can't access the Ant tasks from a JUnit plugin test.

TODO: integrate the EOL debugger somehow. TODO: add support for running Ant targets from a previously specified Ant script, in order to reuse the workflow tasks. We could get back most of the missing functionality this way. The main problem is that this would probably require copying over the original project to the runtime workspace, and that could complicate things quite a bit.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected EUnitModule
     
    protected IEUnitSuite
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    EUnitTestRunner(Class<? extends IEUnitSuite> testClass)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.junit.runner.Description
     
    protected void
    Runs the module once test listeners have been set up.
    protected List<EUnitTest>
     
    protected void
    runChild(EUnitTest child, org.junit.runner.notification.RunNotifier notifier)
     

    Methods inherited from class org.junit.runners.ParentRunner

    childrenInvoker, classBlock, classRules, collectInitializationErrors, createTestClass, filter, getDescription, getName, getRunnerAnnotations, getTestClass, isIgnored, order, run, runLeaf, setScheduler, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClasses, withInterruptIsolation

    Methods inherited from class org.junit.runner.Runner

    testCount

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • EUnitTestRunner

      public EUnitTestRunner(Class<? extends IEUnitSuite> testClass) throws org.junit.runners.model.InitializationError
      Throws:
      org.junit.runners.model.InitializationError
  • Method Details

    • getChildren

      protected List<EUnitTest> getChildren()
      Specified by:
      getChildren in class org.junit.runners.ParentRunner<EUnitTest>
    • describeChild

      protected org.junit.runner.Description describeChild(EUnitTest child)
      Specified by:
      describeChild in class org.junit.runners.ParentRunner<EUnitTest>
    • runChild

      protected void runChild(EUnitTest child, org.junit.runner.notification.RunNotifier notifier)
      Specified by:
      runChild in class org.junit.runners.ParentRunner<EUnitTest>
    • executeModule

      protected void executeModule() throws EolRuntimeException
      Runs the module once test listeners have been set up. Subclasses may want to override this method for any other instrumentation (e.g. debugging).
      Throws:
      EolRuntimeException