Class TestFeatureLogCollection
java.lang.Object
de.qytera.qtaf.core.log.model.collection.TestFeatureLogCollection
Collection that holds all log messages from a specific test case class.
-
Method Summary
Modifier and TypeMethodDescriptionaddScenarioLogCollection(TestScenarioLogCollection collection) Add a scenario log collection if it not already exists.voidRemove all elements from the collection.static voidRemove all scenario log collections.intCount the number of scenario log collections.static TestFeatureLogCollectioncreateFeatureLogCollectionIfNotExists(String featureId, TestFeature testFeatureAnnotation) Factory method.static TestFeatureLogCollectioncreateFeatureLogCollectionIfNotExists(String featureId, String featureName) Factory method.createScenarioIfNotExists(String featureId, String abstractScenarioId, String instanceId, String scenarioName) Add new Scenario Log Collection.booleanOverride equals to compare two TestFeatureLogCollection objects.static booleanCheck if feature log with given ID already exists.Get collection Description.Get collection ID.Get collection Name.static intCount the number of scenario log collections.Get test step collections.Group scenario logs by abstract scenario ID.Get testCaseAnnotation.inthashCode()Calculate hash code for this instance.setTestFeatureAnnotation(TestFeature testFeatureAnnotation) Set testCaseAnnotation.
-
Method Details
-
createFeatureLogCollectionIfNotExists
public static TestFeatureLogCollection createFeatureLogCollectionIfNotExists(String featureId, String featureName) Factory method.This method has to be synchronized so that only one thread at a time can execute this method.
- Parameters:
featureId- Collection IDfeatureName- Collection Name- Returns:
- the log collection
-
createFeatureLogCollectionIfNotExists
public static TestFeatureLogCollection createFeatureLogCollectionIfNotExists(String featureId, TestFeature testFeatureAnnotation) Factory method.This method has to be synchronized so that only one thread at a time can execute this method.
- Parameters:
featureId- Collection IDtestFeatureAnnotation- Test feature annotation- Returns:
- the log collection
-
equals
Override equals to compare two TestFeatureLogCollection objects. -
hashCode
public int hashCode()Calculate hash code for this instance. The contains() methods of the collections use the hash code to check if object is already stored. -
getFeatureId
Get collection ID.- Returns:
- Collection ID
-
getFeatureName
Get collection Name.- Returns:
- Collection Name
-
getFeatureDescription
Get collection Description.- Returns:
- Collection Description
-
getScenarioLogCollection
Get test step collections.- Returns:
- log collections
-
getScenariosGroupedByAbstractScenarioId
Group scenario logs by abstract scenario ID.- Returns:
- Map of grouped scenario logs
-
createScenarioIfNotExists
public TestScenarioLogCollection createScenarioIfNotExists(String featureId, String abstractScenarioId, String instanceId, String scenarioName) Add new Scenario Log Collection.- Parameters:
featureId- Unique test hash codeabstractScenarioId- the scenario IDinstanceId- Method ID / Scenario namescenarioName- Test ID / Feature name- Returns:
- this
-
addScenarioLogCollection
Add a scenario log collection if it not already exists.- Parameters:
collection- scenario log collection- Returns:
- scenario log collection
-
getTestFeatureAnnotation
Get testCaseAnnotation.- Returns:
- testCaseAnnotation
-
setTestFeatureAnnotation
Set testCaseAnnotation.- Parameters:
testFeatureAnnotation- TestCaseAnnotation- Returns:
- this
-
countScenarioLogs
public int countScenarioLogs()Count the number of scenario log collections.- Returns:
- number of scenario log collections
-
clearCollection
public void clearCollection()Remove all elements from the collection. -
exists
Check if feature log with given ID already exists.- Parameters:
featureId- Feature ID- Returns:
- true if exists, false otherwise
-
getIndexSize
public static int getIndexSize()Count the number of scenario log collections.- Returns:
- number of scenario log collections
-
clearIndex
public static void clearIndex()Remove all scenario log collections.
-