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()
    • stream

      public Stream<Execution> stream()
      Get the executions as a Stream.
      Returns:
      the stream of executions; never null
      See Also:
      list()
    • 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:
      stream(), Stream.map(Function)
    • 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:
      stream(), Stream.filter(Predicate)
    • 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.
      Returns:
      the filtered Executions; never null
    • started

      public Executions started()
      Get the started Executions contained in this Executions object.
      Returns:
      the filtered Executions; never null
    • finished

      public Executions finished()
      Get the finished Executions contained in this Executions object.
      Returns:
      the filtered Executions; never null
    • aborted

      public Executions aborted()
      Get the aborted Executions contained in this Executions object.
      Returns:
      the filtered Executions; never null
    • succeeded

      public Executions succeeded()
      Get the succeeded Executions contained in this Executions object.
      Returns:
      the filtered Executions; never null
    • failed

      public Executions failed()
      Get the failed Executions contained in this Executions object.
      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:
      Assertions.assertThat(List), ListAssert
    • 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