org.specs2.reporter

JUnitReporter

trait JUnitReporter extends ExecutionOrigin with DefaultReporter with Exporters

The JUnitReporter reports a specification by using a JUnit RunNotifier

To do so, it uses most of the execution pipeline of a normal reporter but overrides the fragments execution so as to notify JUnit of the appropriate events

Linear Supertypes
Exporters, DefaultReporter, DefaultStoring, Statistics, DefaultExecutionStrategy, FragmentExecution, DefaultSequence, DefaultSelection, ExamplesSelection, StatusSelection, WithDefaultStatisticsRepository, WithStatisticsRepository, TagSelection, TagsAssociation, ExamplesIsolation, Reporter, Exporting, Storing, ExecutionStrategy, Sequence, Selection, ExecutionOrigin, Stacktraces, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. JUnitReporter
  2. Exporters
  3. DefaultReporter
  4. DefaultStoring
  5. Statistics
  6. DefaultExecutionStrategy
  7. FragmentExecution
  8. DefaultSequence
  9. DefaultSelection
  10. ExamplesSelection
  11. StatusSelection
  12. WithDefaultStatisticsRepository
  13. WithStatisticsRepository
  14. TagSelection
  15. TagsAssociation
  16. ExamplesIsolation
  17. Reporter
  18. Exporting
  19. Storing
  20. ExecutionStrategy
  21. Sequence
  22. Selection
  23. ExecutionOrigin
  24. Stacktraces
  25. AnyRef
  26. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. type EE = (ExecutingSpecification) ⇒ ExecutedSpecification

    Definition Classes
    Exporters
  2. case class SpecStats extends Product with Serializable

    The SpecsStats class just stores a list of stats, each one corresponding to a Fragment

    The SpecsStats class just stores a list of stats, each one corresponding to a Fragment

    Definition Classes
    Statistics
  3. case class SpecsStatistics extends Product with Serializable

    The SpecsStatistics class stores the result of a specification execution, with the a list of 'current' stats for each fragment execution and the total statistics for the whole specification

    The SpecsStatistics class stores the result of a specification execution, with the a list of 'current' stats for each fragment execution and the total statistics for the whole specification

    Definition Classes
    Statistics

Abstract Value Members

  1. implicit abstract def args: Arguments

    arguments for the specification

  2. abstract def descriptions: Map[Fragment, Description]

    map providing a description for each fragment

  3. abstract def notifier: RunNotifier

    the junit notifier to use

  4. implicit abstract def properties: SystemProperties

    system properties

  5. abstract def selected: SpecificationStructure

    the selected fragments to report

Concrete 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 def SpecStatsMonoid: Monoid[SpecStats] { val zero: JUnitReporter.this.SpecStats }

    Definition Classes
    Statistics
  7. object SpecsStatistics extends Product with Serializable

    Definition Classes
    Statistics
  8. implicit def SpecsStatisticsMonoid: Monoid[SpecsStatistics] { val zero: JUnitReporter.this.SpecsStatistics }

    Definition Classes
    Statistics
  9. val StatisticsReducer: Reducer[ExecutedFragment, SpecsStatistics]

    Definition Classes
    Statistics
  10. val StatsReducer: Reducer[ExecutedFragment, SpecStats]

    Definition Classes
    Statistics
  11. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  12. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  13. def copyBody(name: SpecName, f: Fragment, body: ⇒ Result)(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
  14. def customExporter(arguments: Arguments): Option[Exporting]

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

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

    Definition Classes
    AnyRef → Any
  17. def execute(implicit arguments: Arguments): (ExecutableSpecification) ⇒ ExecutingSpecification

    execute sequences of Fragments.

    execute sequences of Fragments.

    If the stopOnFail argument is true, we check that the execution is ok before executing the next sequence.

    Definition Classes
    DefaultExecutionStrategy → ExecutionStrategy
  18. def execute(f: Fragment)(implicit arguments: Arguments = Arguments()): Product with Serializable with ExecutedFragment

    execute a Fragment.

    execute a Fragment.

    A Form is executed separately by executing each row and cell, setting the results on each cell

    Definition Classes
    FragmentExecution
  19. def executeBody(body: ⇒ Result)(implicit arguments: Arguments): Result

    This method could be overriden to provide alternate behavior when executing an Example

    This method could be overriden to provide alternate behavior when executing an Example

    Definition Classes
    FragmentExecution
  20. def executeFragment(implicit arguments: Arguments): (Fragment) ⇒ ExecutedFragment

    execute a Fragment.

    execute a Fragment.

    Definition Classes
    JUnitReporterFragmentExecution
  21. def export(implicit args: Arguments): (ExecutingSpecification) ⇒ ExecutedSpecification

    returns

    a function exporting an ExecutingSpecification

    Definition Classes
    JUnitReporter → Exporting
  22. def exportAll(exporters: Seq[Exporting])(implicit arguments: Arguments): (ExecutingSpecification) ⇒ ExecutedSpecification

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

    Definition Classes
    Exporters
  24. def exportAll(arguments: Arguments): (ExecutingSpecification) ⇒ ExecutedSpecification

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

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

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

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

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

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

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

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

    Definition Classes
    Exporters
  33. def exporters(implicit arguments: Arguments): Seq[Exporting]

    Definition Classes
    Exporters
  34. 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
  35. 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
  36. def filterPrevious(implicit commandLineArgs: Arguments): (Seq[(Fragment, Arguments, SpecName)]) ⇒ Seq[(Fragment, Arguments, SpecName)]

    returns

    fragments according to their previous execution state

    Definition Classes
    StatusSelection
  37. 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
  38. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  39. def foldAll(fs: Seq[ExecutedFragment]): SpecsStatistics

    Definition Classes
    Statistics
  40. def fromSpecs2orScalaz: (String) ⇒ Boolean

    Definition Classes
    ExecutionOrigin
  41. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  42. def hashCode(): Int

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

    Attributes
    protected
    Definition Classes
    StatusSelection
  44. def isConsole(args: Arguments): Boolean

    Definition Classes
    Exporters
  45. def isExecutedFrom(name: String, st: Seq[StackTraceElement]): Boolean

    Definition Classes
    Stacktraces
  46. 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 this current piece of code contains name in its stacktrace.

    Definition Classes
    Stacktraces
  47. 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
  48. 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
  49. 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
  50. 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
  51. 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
  52. 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
  53. def isFromClass(classNamePredicate: (String) ⇒ Boolean, st: Seq[StackTraceElement]): Boolean

    returns

    true if there is a stacktrace element satisfying the predicate

    Definition Classes
    Stacktraces
  54. def isFromClass(classNamePredicate: (String) ⇒ Boolean): Boolean

    returns

    true if there is a stacktrace element satisfying the predicate

    Definition Classes
    Stacktraces
  55. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  56. def isSpecificationFromSpecs2orScalaz(st: Seq[StackTraceElement]): Boolean

    try to approximate if a specification is a specs2 one or scalaz one by passing name = org.

    try to approximate if a specification is a specs2 one or scalaz one by passing name = org.specs2 or name = scalaz

    Definition Classes
    ExecutionOrigin
  57. 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
  58. def isolateSteps(fragments: Seq[Fragment])(implicit arguments: Arguments): Seq[FragmentSeq]

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

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

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

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

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

    Attributes
    protected
    Definition Classes
    Exporters
  64. def report: ExecutedSpecification

    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

  65. def report(spec: SpecificationStructure)(implicit arguments: Arguments): ExecutedSpecification

    report Fragments by:

    report Fragments by:

    • extracting arguments from the Fragments
    • selecting them
    • sequencing fragments in groups
    • executing fragments
    • exporting the results to the output format
    returns

    the reporter

    Definition Classes
    Reporter
  66. lazy val repository: StatisticsRepository

    Attributes
    protected
    Definition Classes
    WithDefaultStatisticsRepository → WithStatisticsRepository
  67. 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
  68. 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
  69. 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
  70. 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
  71. def setStatsOnSpecEndFragments(implicit args: Arguments): ((ExecutedFragment, Stats)) ⇒ ExecutedFragment

    set the statistics on SpecEndFragments after they've been computed by the StatisticsReducer Those statistics are updated from previously executed statistics to calculate trends

    set the statistics on SpecEndFragments after they've been computed by the StatisticsReducer Those statistics are updated from previously executed statistics to calculate trends

    Definition Classes
    DefaultStoring
  72. def store(implicit args: Arguments): (ExecutingSpecification) ⇒ ExecutingSpecification

    returns

    a function storing ExecutedFragments

    Definition Classes
    DefaultStoring → Storing
  73. def storeResults: ((SpecName, Seq[(SpecName, ExecutedResult)])) ⇒ repository.type

    store the results by spec name

    store the results by spec name

    Attributes
    protected
    Definition Classes
    DefaultStoring
  74. def storeStats: ((ExecutedFragment, SpecName)) ⇒ ExecutedFragment

    store the statistics: - for SpecEnd -> put the stats in the repository - for a SpecStart that's a link -> read the status of the previous execution

    store the statistics: - for SpecEnd -> put the stats in the repository - for a SpecStart that's a link -> read the status of the previous execution

    Attributes
    protected
    Definition Classes
    DefaultStoring
  75. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  76. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Exporters

Inherited from DefaultReporter

Inherited from DefaultStoring

Inherited from Statistics

Inherited from DefaultExecutionStrategy

Inherited from FragmentExecution

Inherited from DefaultSequence

Inherited from DefaultSelection

Inherited from ExamplesSelection

Inherited from StatusSelection

Inherited from WithDefaultStatisticsRepository

Inherited from WithStatisticsRepository

Inherited from TagSelection

Inherited from TagsAssociation

Inherited from ExamplesIsolation

Inherited from Reporter

Inherited from Exporting

Inherited from Storing

Inherited from ExecutionStrategy

Inherited from Sequence

Inherited from Selection

Inherited from ExecutionOrigin

Inherited from Stacktraces

Inherited from AnyRef

Inherited from Any

Ungrouped