Package com.polarion.alm.tracker
Class AbstractTestsFileProcessor
java.lang.Object
com.polarion.alm.tracker.AbstractTestsFileProcessor
- All Implemented Interfaces:
ITestsFileProcessor
Extend this class to implement your custom
ITestsFileProcessor,
it will allow your implementation to work even when new methods are added to the ITestsFileProcessor- Since:
- 3.6.1
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.polarion.alm.tracker.ITestsFileProcessor
ITestsFileProcessor.FileReaderSource, ITestsFileProcessor.ReaderSource, ITestsFileProcessor.ResultsSummary, ITestsFileProcessor.StringReaderSource -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidaddContent(String content) Adds content to be processed as String, can be called more times.final voidaddSources(List<ITestsFileProcessor.ReaderSource> sources) Adds sources to be processed, can be called more times.Return the names of the sources separated by comma.voidsetDefectTemplate(IWorkItem workItem) Sets template Work Item for creating defect work items.final voidsetMaxCreatedDefects(Integer value) Sets limit for how many defects per source should be created, summary defect is created instead of individual defect when this limit is reached.final voidSets limit for percent of failed tests for which defects should be created, summary defect is created instead of individual defect when this limit is reached.voidsetProperties(Map<String, String> properties) Sets custom properties for this processor.voidsetTestCaseTemplate(IWorkItem workItem) Sets template Work Item for creating test case work items.booleanshouldCreateSummaryDefect(int totalTests, int totalFailures, int totalErrors) Checks if the failures and errors counts exceeded maximal values configured bysetMaxCreatedDefects(Integer)orsetMaxCreatedDefectsPercent(Integer)orTestsConfiguration.getMaxCreatedDefects()orTestsConfiguration.getMaxCreatedDefectsPercent()Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.polarion.alm.tracker.ITestsFileProcessor
process, setTestRun
-
Constructor Details
-
AbstractTestsFileProcessor
- Parameters:
configuration- - can be null
-
-
Method Details
-
addContent
Description copied from interface:ITestsFileProcessorAdds content to be processed as String, can be called more times.- Specified by:
addContentin interfaceITestsFileProcessor
-
addSources
Description copied from interface:ITestsFileProcessorAdds sources to be processed, can be called more times.- Specified by:
addSourcesin interfaceITestsFileProcessor
-
getSourceNames
Return the names of the sources separated by comma. It is useful to be used forITestRun.updateSummaryDefect(String, int, int, int, IWorkItem); -
setMaxCreatedDefects
Description copied from interface:ITestsFileProcessorSets limit for how many defects per source should be created, summary defect is created instead of individual defect when this limit is reached. Value from configuration will be used when null, zero or negative- Specified by:
setMaxCreatedDefectsin interfaceITestsFileProcessor
-
setMaxCreatedDefectsPercent
Description copied from interface:ITestsFileProcessorSets limit for percent of failed tests for which defects should be created, summary defect is created instead of individual defect when this limit is reached. Value from configuration will be used when null, zero or negative.- Specified by:
setMaxCreatedDefectsPercentin interfaceITestsFileProcessor
-
setTestCaseTemplate
Description copied from interface:ITestsFileProcessorSets template Work Item for creating test case work items. Value from configuration will be used when null.- Specified by:
setTestCaseTemplatein interfaceITestsFileProcessor
-
setDefectTemplate
Description copied from interface:ITestsFileProcessorSets template Work Item for creating defect work items. Value from configuration will be used when null.- Specified by:
setDefectTemplatein interfaceITestsFileProcessor
-
setProperties
Description copied from interface:ITestsFileProcessorSets custom properties for this processor.- Specified by:
setPropertiesin interfaceITestsFileProcessor
-
shouldCreateSummaryDefect
public boolean shouldCreateSummaryDefect(int totalTests, int totalFailures, int totalErrors) Checks if the failures and errors counts exceeded maximal values configured bysetMaxCreatedDefects(Integer)orsetMaxCreatedDefectsPercent(Integer)orTestsConfiguration.getMaxCreatedDefects()orTestsConfiguration.getMaxCreatedDefectsPercent()- Parameters:
totalTests- total count of teststotalFailures- count of failed testtotalErrors- count of tests with error- Since:
- 3.6.1
-