Class HookSuite


  • public class HookSuite
    extends java.lang.Object
    Represents a suite of hook operations for Cucumber test execution. This class maintains the state and grouping of hooks (Before, After, BeforeStep, AfterStep) for reporting to Report Portal.

    A hook suite is created for each group of hooks of the same type that are executed together, allowing them to be represented as a logical group in the Report Portal UI.

    • Constructor Summary

      Constructors 
      Constructor Description
      HookSuite​(io.reactivex.Maybe<java.lang.String> id, io.cucumber.plugin.event.HookType type, com.epam.reportportal.listeners.ItemStatus status)
      Creates a new hook suite with the specified ID, type and initial status.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      io.reactivex.Maybe<java.lang.String> getId()
      Gets the Report Portal ID of this hook suite test item.
      com.epam.reportportal.listeners.ItemStatus getStatus()
      Gets the current aggregated status of this hook suite.
      io.cucumber.plugin.event.HookType getType()
      Gets the type of hooks in this suite.
      void updateStatus​(com.epam.reportportal.listeners.ItemStatus status)
      Updates the status of this hook suite based on the status of an individual hook.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HookSuite

        public HookSuite​(@Nonnull
                         io.reactivex.Maybe<java.lang.String> id,
                         @Nonnull
                         io.cucumber.plugin.event.HookType type,
                         @Nonnull
                         com.epam.reportportal.listeners.ItemStatus status)
        Creates a new hook suite with the specified ID, type and initial status.
        Parameters:
        id - The Report Portal ID of this hook suite test item
        type - The type of hooks in this suite
        status - The initial status of the hook suite
    • Method Detail

      • updateStatus

        public void updateStatus​(@Nonnull
                                 com.epam.reportportal.listeners.ItemStatus status)
        Updates the status of this hook suite based on the status of an individual hook. Uses status evaluation logic to determine the new aggregated status.
        Parameters:
        status - The status to evaluate against the current status
      • getStatus

        @Nonnull
        public com.epam.reportportal.listeners.ItemStatus getStatus()
        Gets the current aggregated status of this hook suite.
        Returns:
        The current status of the hook suite
      • getType

        @Nonnull
        public io.cucumber.plugin.event.HookType getType()
        Gets the type of hooks in this suite.
        Returns:
        The hook type (BEFORE, AFTER, BEFORE_STEP, or AFTER_STEP)
      • getId

        @Nonnull
        public io.reactivex.Maybe<java.lang.String> getId()
        Gets the Report Portal ID of this hook suite test item.
        Returns:
        The Report Portal ID assigned to this hook suite