Class Executions

java.lang.Object
org.junit.platform.testkit.engine.Executions

@API(status=MAINTAINED, since="1.7") public final class Executions extends Object
Executions is a facade that provides a fluent API for working with executions.
Since:
1.4
  • Method Details

    • list

      public List<Execution> list()
      Get the executions as a List.
      Returns:
      the list of executions; never null
      See Also:
    • stream

      public Stream<Execution> stream()
      Get the executions as a Stream.
      Returns:
      the stream of executions; never null
      See Also:
    • map

      public <R> Stream<R> map(Function<? super Execution, ? extends R> mapper)
      Shortcut for executions.stream().map(mapper).
      Parameters:
      mapper - a Function to apply to each execution; never null
      Returns:
      the mapped stream of executions; never null
      See Also:
    • filter

      public Stream<Execution> filter(Predicate<? super Execution> predicate)
      Shortcut for executions.stream().filter(predicate).
      Parameters:
      predicate - a Predicate to apply to each execution to decide if it should be included in the filtered stream; never null
      Returns:
      the filtered stream of executions; never null
      See Also:
    • count

      public long count()
      Get the number of executions contained in this Executions object.
    • skipped

      public Executions skipped()
      Get the skipped Executions contained in this Executions object.

      Executions that are not skipped are finished.

      Returns:
      the filtered Executions; never null
    • started

      @Deprecated(since="6.1", forRemoval=true) @API(status=DEPRECATED, since="6.1") public Executions started()
      Deprecated, for removal: This API element is subject to removal in a future version.
      by definition, all started executions are also finished executions. Use finished() instead.
      Get the started Executions contained in this Executions object.

      Executions that are not started are skipped.

      Returns:
      the filtered Executions; never null
    • finished

      public Executions finished()
      Get the finished Executions contained in this Executions object.

      Executions that are not finished are skipped.

      Returns:
      the filtered Executions; never null
    • aborted

      public Executions aborted()
      Get the aborted Executions contained in this Executions object.

      The aborted executions are a subset of the finished executions.

      Returns:
      the filtered Executions; never null
    • succeeded

      public Executions succeeded()
      Get the succeeded Executions contained in this Executions object.

      The succeeded executions are a subset of the finished executions.

      Returns:
      the filtered Executions; never null
    • failed

      public Executions failed()
      Get the failed Executions contained in this Executions object.

      The failed executions are a subset of the finished executions.

      Returns:
      the filtered Executions; never null
    • assertThatExecutions

      public ListAssert<Execution> assertThatExecutions()
      Shortcut for org.assertj.core.api.Assertions.assertThat(executions.list()).
      Returns:
      an instance of ListAssert for executions; never null
      See Also:
    • debug

      public Executions debug()
      Print all executions to System.out.
      Returns:
      this Executions object for method chaining; never null
    • debug

      public Executions debug(OutputStream out)
      Print all executions to the supplied OutputStream.
      Parameters:
      out - the OutputStream to print to; never null
      Returns:
      this Executions object for method chaining; never null
    • debug

      public Executions debug(Writer writer)
      Print all executions to the supplied Writer.
      Parameters:
      writer - the Writer to print to; never null
      Returns:
      this Executions object for method chaining; never null