Class AbstractTestManagementSystem
java.lang.Object
io.github.mov2day.unifiedtest.reporting.testmanagement.AbstractTestManagementSystem
- All Implemented Interfaces:
TestManagementSystem
- Direct Known Subclasses:
TestRailManagementSystem,ZephyrTestManagementSystem
Abstract base implementation of TestManagementSystem.
Provides common functionality and helper methods for test management system implementations.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Objectprotected booleanprotected OperationStatusprotected static final intprotected final List<UnifiedTestResult> protected static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract StringconvertFromStatus(String status) Convert test management system specific status to UnifiedTestResult status.protected abstract StringconvertStatus(String status) Convert UnifiedTestResult status to test management system specific status.doPushResults(List<UnifiedTestResult> results) Implementation-specific method to push test results.voidFlush any queued results to the test management system.Get the status of the last operation.voidinitialize(Object config) Initialize the test management system with configuration.booleanCheck if the test management system is properly configured.pushResults(List<UnifiedTestResult> results) Push test results to the test management system.voidqueueTestResult(UnifiedTestResult result) Queue a test result for later batch processing.protected abstract booleanValidate the configuration for this test management system.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.mov2day.unifiedtest.reporting.testmanagement.TestManagementSystem
getName
-
Field Details
-
config
-
lastStatus
-
configured
protected boolean configured -
MAX_RETRIES
protected static final int MAX_RETRIES- See Also:
-
RETRY_DELAY_MS
protected static final long RETRY_DELAY_MS- See Also:
-
pendingResults
-
-
Constructor Details
-
AbstractTestManagementSystem
protected AbstractTestManagementSystem()
-
-
Method Details
-
initialize
Description copied from interface:TestManagementSystemInitialize the test management system with configuration.- Specified by:
initializein interfaceTestManagementSystem- Parameters:
config- Configuration object specific to the test management system
-
isConfigured
public boolean isConfigured()Description copied from interface:TestManagementSystemCheck if the test management system is properly configured.- Specified by:
isConfiguredin interfaceTestManagementSystem- Returns:
- true if the system is configured and ready to use
-
getLastStatus
Description copied from interface:TestManagementSystemGet the status of the last operation.- Specified by:
getLastStatusin interfaceTestManagementSystem- Returns:
- Status object containing success/failure information and any error messages
-
queueTestResult
Description copied from interface:TestManagementSystemQueue a test result for later batch processing.- Specified by:
queueTestResultin interfaceTestManagementSystem- Parameters:
result- Test result to queue
-
pushResults
Description copied from interface:TestManagementSystemPush test results to the test management system. If results parameter is null, only queued results will be pushed.- Specified by:
pushResultsin interfaceTestManagementSystem- Parameters:
results- List of test results to push (can be null)- Returns:
- Map of test names to their corresponding IDs in the test management system
-
flushResults
public void flushResults()Description copied from interface:TestManagementSystemFlush any queued results to the test management system.- Specified by:
flushResultsin interfaceTestManagementSystem
-
validateConfig
protected abstract boolean validateConfig()Validate the configuration for this test management system.- Returns:
- true if the configuration is valid
-
doPushResults
protected abstract Map<String,String> doPushResults(List<UnifiedTestResult> results) throws Exception Implementation-specific method to push test results.- Parameters:
results- List of test results to push- Returns:
- Map of test names to their corresponding IDs in the test management system
- Throws:
Exception- if the operation fails
-
convertStatus
Convert UnifiedTestResult status to test management system specific status.- Parameters:
status- UnifiedTestResult status- Returns:
- Test management system specific status
-
convertFromStatus
Convert test management system specific status to UnifiedTestResult status.- Parameters:
status- Test management system specific status- Returns:
- UnifiedTestResult status
-