Package com.github.invictum.reportportal
Class SuiteStorage
java.lang.Object
com.github.invictum.reportportal.SuiteStorage
Abstraction used to control active suites lifecycle
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddNewFail(String suiteId, String testId) Register id of failed test for specific suite by id.voidFinishes all the active suite that belongs to current thread Executes finishers registered by suiteFinisher methodintincrementAndGetRetriesCount(String suiteId, String testId) Increase count of failed test to track when exceed count of retires.booleanisFailPresent(String suiteId, String testId) This method need for check is test is retry.voidremoveFail(String suiteId, String testId) Should be called if failed test start passed after retry.io.reactivex.Maybe<String>Starts a new suite entityvoidsuiteFinisher(String id, Runnable finisher) Registers a suite finisher, a that should be executed to complete suite
-
Constructor Details
-
SuiteStorage
public SuiteStorage()
-
-
Method Details
-
start
Starts a new suite entity- Parameters:
id- defined by callerstart- function to start suite- Returns:
- internal RP identifier associated with created suite
-
suiteFinisher
Registers a suite finisher, a that should be executed to complete suite- Parameters:
id- defined by user to finish suite forfinisher- execution logic
-
finalizeActive
public void finalizeActive()Finishes all the active suite that belongs to current thread Executes finishers registered by suiteFinisher method -
addNewFail
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 detectedtestId- id of failed test
-
isFailPresent
This method need for check is test is retry. Part of retries logic.- Parameters:
suiteId- id of suite where fail test was detectedtestId- id of failed test
-
removeFail
Should be called if failed test start passed after retry. Part of retries logic.- Parameters:
suiteId- id of suite where fail test was detectedtestId- id of failed test
-
incrementAndGetRetriesCount
Increase count of failed test to track when exceed count of retires.- Parameters:
suiteId- id of suite where fail test was detectedtestId- id of failed test- Returns:
- failCount count of retires after ++
-