org.specs2.runner

JUnitRunner

class JUnitRunner extends Runner with ExecutionOrigin with DefaultSelection with DefaultSequence with Exporters

The JUnitRunner class is a junit Runner class meant to be used with the RunWith annotation to execute a specification as a JUnit suite.

The implementation is using a description Fold to fold the fragments into a tree of Description objects and a Map relating each Description to a Fragment to execute.

Linear Supertypes
Exporters, DefaultSequence, DefaultSelection, Selection, ExamplesSelection, StatusSelection, WithDefaultStatisticsRepository, WithStatisticsRepository, TagSelection, ExamplesIsolation, ExecutionOrigin, Stacktraces, Runner, Describable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. JUnitRunner
  2. Exporters
  3. DefaultSequence
  4. DefaultSelection
  5. Selection
  6. ExamplesSelection
  7. StatusSelection
  8. WithDefaultStatisticsRepository
  9. WithStatisticsRepository
  10. TagSelection
  11. ExamplesIsolation
  12. ExecutionOrigin
  13. Stacktraces
  14. Runner
  15. Describable
  16. AnyRef
  17. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new JUnitRunner(klass: Class[_])

Type Members

  1. type EE = (ExecutingSpecification) ⇒ ExecutedSpecification

    Definition Classes
    Exporters

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. implicit lazy val args: Arguments

    arguments for the specification

  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  9. def copyBody(name: SpecName, body: ⇒ Result, index: Int)(implicit arguments: Arguments): Result

    returns

    an Example which body comes from the execution of that example in a brand new instance of the Specification

    Attributes
    protected
    Definition Classes
    ExamplesIsolation
  10. def customExporter(arguments: Arguments): Option[Exporting]

    Definition Classes
    Exporters
  11. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  13. def exportConsole(accept: (String) ⇒ Boolean)(implicit arguments: Arguments): Option[Exporting]

    Definition Classes
    Exporters
  14. def exportCustom(accept: (String) ⇒ Boolean)(implicit arguments: Arguments): Option[Exporting]

    Definition Classes
    Exporters
  15. def exportHtml(accept: (String) ⇒ Boolean)(implicit arguments: Arguments): Option[Exporting]

    Definition Classes
    Exporters
  16. def exportJUnitxml(accept: (String) ⇒ Boolean)(implicit arguments: Arguments): Option[Exporting]

    Definition Classes
    Exporters
  17. def exportNotifier(accept: (String) ⇒ Boolean)(implicit arguments: Arguments): Option[Exporting]

    Definition Classes
    Exporters
  18. def exportToOthers(exporters: Seq[Exporting])(implicit arguments: Arguments): (ExecutingSpecification) ⇒ ExecutedSpecification

    Definition Classes
    Exporters
  19. def exportToOthers(args: Arguments, accept: (String) ⇒ Boolean): (ExecutingSpecification) ⇒ ExecutedSpecification

    Definition Classes
    Exporters
  20. def exportToOthers(arguments: Arguments): (ExecutingSpecification) ⇒ ExecutedSpecification

    Definition Classes
    Exporters
  21. def exporter(condition: Boolean)(e: ⇒ Exporting): Option[Exporting]

    Attributes
    protected
    Definition Classes
    Exporters
  22. def exporters(accept: (String) ⇒ Boolean)(implicit arguments: Arguments): Seq[Exporting]

    Definition Classes
    Exporters
  23. def filter(implicit commandLineArgs: Arguments): (Seq[(Fragment, Arguments, SpecName)]) ⇒ Seq[Fragment]

    returns

    filter fragments depending on the command line arguments and the current arguments in the specification

    Definition Classes
    DefaultSelection
  24. def filterExamples(implicit commandLineArgs: Arguments): (Seq[(Fragment, Arguments, SpecName)]) ⇒ Seq[Fragment]

    the filter method filters examples based on their description, keeping only the ones matching the ex attribute of the arguments object

    the filter method filters examples based on their description, keeping only the ones matching the ex attribute of the arguments object

    Attributes
    protected
    Definition Classes
    ExamplesSelection
  25. def filterPrevious(implicit commandLineArgs: Arguments): (Seq[(Fragment, Arguments, SpecName)]) ⇒ Seq[(Fragment, Arguments, SpecName)]

    returns

    fragments according to their previous execution state

    Definition Classes
    StatusSelection
  26. def filterTags(implicit commandLineArgs: Arguments): (Seq[(Fragment, Arguments, SpecName)]) ⇒ Seq[(Fragment, Arguments, SpecName)]

    returns

    filter fragments according to tags by collecting tags as applicable to each fragment and applying them

    Definition Classes
    TagSelection
  27. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  28. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  29. def getDescription(): Description

    returns

    a Description for the TestSuite

    Definition Classes
    JUnitRunner → Runner → Describable
  30. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  31. def includePrevious(specName: SpecName, e: Example, args: Arguments): Boolean

    Attributes
    protected
    Definition Classes
    StatusSelection
  32. def isExecutedFrom(name: String): Boolean

    This method is used to determine for example if the JUnit runner is executed from Maven or within Eclipse.

    This method is used to determine for example if the JUnit runner is executed from Maven or within Eclipse. In the first the test case names don't need to have the hashcode example.

    returns

    true if the this current piece of code contains name in its stacktrace.

    Definition Classes
    Stacktraces
  33. lazy val isExecutedFromAnIDE: Boolean

    return true if the current test is executed from an IDE

    return true if the current test is executed from an IDE

    Definition Classes
    ExecutionOrigin
  34. lazy val isExecutedFromEclipse: Boolean

    return true if the current test is executed with eclipse

    return true if the current test is executed with eclipse

    Definition Classes
    ExecutionOrigin
  35. lazy val isExecutedFromGradle: Boolean

    return true if the current test is executed with Gradle

    return true if the current test is executed with Gradle

    Definition Classes
    ExecutionOrigin
  36. lazy val isExecutedFromIntellij: Boolean

    return true if the current test is executed with Intellij

    return true if the current test is executed with Intellij

    Definition Classes
    ExecutionOrigin
  37. lazy val isExecutedFromMaven: Boolean

    return true if the current test is executed with Maven

    return true if the current test is executed with Maven

    Definition Classes
    ExecutionOrigin
  38. lazy val isExecutedFromSBT: Boolean

    return true if the current test is executed with sbt

    return true if the current test is executed with sbt

    Definition Classes
    ExecutionOrigin
  39. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  40. def isolateExamples(implicit arguments: Arguments): (Seq[(Fragment, Arguments, SpecName)]) ⇒ Seq[Fragment]

    This function "clones" the body of each example if the applicable arguments indicate that the specification should be isolated

    This function "clones" the body of each example if the applicable arguments indicate that the specification should be isolated

    Attributes
    protected
    Definition Classes
    ExamplesIsolation
  41. def isolateSteps(fragments: Seq[Fragment])(implicit arguments: Arguments): Seq[FragmentSeq]

    Attributes
    protected
    Definition Classes
    DefaultSequence
  42. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  43. def notifierExporter(arguments: Arguments): Option[Exporting]

    Definition Classes
    Exporters
  44. final def notify(): Unit

    Definition Classes
    AnyRef
  45. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  46. def optionalExporter(condition: Boolean)(e: Option[Exporting]): Option[Exporting]

    Attributes
    protected
    Definition Classes
    Exporters
  47. lazy val properties: SystemProperties

    system properties

    system properties

    Attributes
    protected
  48. lazy val repository: StatisticsRepository

    Attributes
    protected
    Definition Classes
    WithDefaultStatisticsRepository → WithStatisticsRepository
  49. def run(notifier: RunNotifier): Unit

    run the suite by executing each fragment related to a description: - execute all fragments (including Steps which are reported as steps) - for each result, report the failure/error/skipped or pending message as a junit failure or ignored event on the RunNotifier

    run the suite by executing each fragment related to a description: - execute all fragments (including Steps which are reported as steps) - for each result, report the failure/error/skipped or pending message as a junit failure or ignored event on the RunNotifier

    Definition Classes
    JUnitRunner → Runner
  50. def select(fragments: Seq[Fragment])(implicit arguments: Arguments = Arguments()): Seq[Fragment]

    select function returning a filtered seq of Fragments

    select function returning a filtered seq of Fragments

    Definition Classes
    DefaultSelection
  51. def select(implicit arguments: Arguments): (SpecificationStructure) ⇒ SpecificationStructure

    select function returning a filtered seq of Fragments

    select function returning a filtered seq of Fragments

    Definition Classes
    DefaultSelectionSelection
  52. def sequence(specName: SpecName, fragments: Seq[Fragment])(implicit arguments: Arguments = Arguments()): Seq[FragmentSeq]

    the sequence method returns sequences of fragments which can be executed concurrently.

    the sequence method returns sequences of fragments which can be executed concurrently. Among the constraints to respect, any Step Fragment must be executed before any following Example Fragment, so that "first" and "last" actions are executed properly in a Specification

    If the arguments specify that the specification is sequential, then each fragment will be executed individually

    Definition Classes
    DefaultSequence
  53. def sequence(implicit arguments: Arguments): (SpecificationStructure) ⇒ ExecutableSpecification

    sequence function returning an ordered seq of seq of Fragments

    sequence function returning an ordered seq of seq of Fragments

    Definition Classes
    DefaultSequence
  54. lazy val specification: SpecificationStructure

    specification to execute

    specification to execute

    Attributes
    protected
  55. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  56. def tags(fragments: Seq[Fragment]): Seq[TaggingFragment]

    From a Seq of Fragments create a seq of corresponding tags for each fragment, considering that:

    From a Seq of Fragments create a seq of corresponding tags for each fragment, considering that:

    • a TaggedAs fragment is applicable to the the previous fragment
    • a Tag fragment is applicable to the the next fragment
    • a AsSection fragment is applicable to the the previous fragment to the next AsSection fragment with the same name
    • a Section fragment is applicable to the the next fragment to the next Section fragment with the same name
    Definition Classes
    TagSelection
  57. def testCount(): Int

    Definition Classes
    Runner
  58. def toString(): String

    Definition Classes
    AnyRef → Any
  59. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  60. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  61. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from Exporters

Inherited from DefaultSequence

Inherited from DefaultSelection

Inherited from Selection

Inherited from ExamplesSelection

Inherited from StatusSelection

Inherited from WithDefaultStatisticsRepository

Inherited from WithStatisticsRepository

Inherited from TagSelection

Inherited from ExamplesIsolation

Inherited from ExecutionOrigin

Inherited from Stacktraces

Inherited from Runner

Inherited from Describable

Inherited from AnyRef

Inherited from Any