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 existsvoidRemove all elements from the collection.static voidRemove all scenario log collectionsintCount the number of scenario log collectionsstatic TestFeatureLogCollectioncreateFeatureLogCollectionIfNotExists(int featureId, TestFeature testFeatureAnnotation) Factory method This method has to be synchronized so that only one thread at a time can execute this methodstatic TestFeatureLogCollectioncreateFeatureLogCollectionIfNotExists(int featureId, String featureName) Factory method This method has to be synchronized so that only one thread at a time can execute this methodcreateScenarioIfNotExists(int featureId, String scenarioId, String scenarioName) Add new TestMethodLogCollectioncreateScenarioIfNotExists(String featureId, String scenarioId, String scenarioName) Add new TestMethodLogCollectionbooleanOverride equals to compare two TestFeatureLogCollection objectsstatic booleanexists(int featureId) Check if feature log with given ID already existsGet collection DescriptionintGet collection IDGet collection Namestatic intCount the number of scenario log collectionsGet test step collectionsGet testCaseAnnotationinthashCode()Calculate hash code for this instance The contains() methods of the collections use the hash code to check if object is already stored.setTestCaseAnnotation(TestFeature testFeatureAnnotation) Set testCaseAnnotation
-
Method Details
-
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. -
createFeatureLogCollectionIfNotExists
public static TestFeatureLogCollection createFeatureLogCollectionIfNotExists(int 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
-
createFeatureLogCollectionIfNotExists
public static TestFeatureLogCollection createFeatureLogCollectionIfNotExists(int 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
-
getFeatureId
public int 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
-
createScenarioIfNotExists
public TestScenarioLogCollection createScenarioIfNotExists(String featureId, String scenarioId, String scenarioName) Add new TestMethodLogCollection- Parameters:
featureId- Unique test hash codescenarioId- Method ID / Scenario namescenarioName- Test ID / Feature name- Returns:
- this
-
createScenarioIfNotExists
public TestScenarioLogCollection createScenarioIfNotExists(int featureId, String scenarioId, String scenarioName) Add new TestMethodLogCollection- Parameters:
featureId- Unique test hash codescenarioId- 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
-
getTestCaseAnnotation
Get testCaseAnnotation- Returns:
- testCaseAnnotation
-
setTestCaseAnnotation
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
public static boolean exists(int featureId) 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
-