Class SuiteStorage

java.lang.Object
com.github.invictum.reportportal.SuiteStorage

public class SuiteStorage extends Object
Abstraction used to control active suites lifecycle
  • Constructor Details

    • SuiteStorage

      public SuiteStorage()
  • Method Details

    • start

      public io.reactivex.Maybe<String> start(String id, Supplier<io.reactivex.Maybe<String>> start)
      Starts a new suite entity
      Parameters:
      id - defined by caller
      start - function to start suite
      Returns:
      internal RP identifier associated with created suite
    • suiteFinisher

      public void suiteFinisher(String id, Runnable finisher)
      Registers a suite finisher, a that should be executed to complete suite
      Parameters:
      id - defined by user to finish suite for
      finisher - execution logic
    • finalizeActive

      public void finalizeActive()
      Finishes all the active suite that belongs to current thread Executes finishers registered by suiteFinisher method
    • addNewFail

      public void addNewFail(String suiteId, String testId)
      Register id of failed test for specific suite by id. Should be called if test failed first time. Part of retries logic.
      Parameters:
      suiteId - id of suite where fail test was detected
      testId - id of failed test
    • isFailPresent

      public boolean isFailPresent(String suiteId, String testId)
      This method need for check is test is retry. Part of retries logic.
      Parameters:
      suiteId - id of suite where fail test was detected
      testId - id of failed test
    • removeFail

      public void removeFail(String suiteId, String testId)
      Should be called if failed test start passed after retry. Part of retries logic.
      Parameters:
      suiteId - id of suite where fail test was detected
      testId - id of failed test
    • incrementAndGetRetriesCount

      public int incrementAndGetRetriesCount(String suiteId, String testId)
      Increase count of failed test to track when exceed count of retires.
      Parameters:
      suiteId - id of suite where fail test was detected
      testId - id of failed test
      Returns:
      failCount count of retires after ++