Class AbstractTestManagementSystem

java.lang.Object
io.github.mov2day.unifiedtest.reporting.testmanagement.AbstractTestManagementSystem
All Implemented Interfaces:
TestManagementSystem
Direct Known Subclasses:
TestRailManagementSystem, ZephyrTestManagementSystem

public abstract class AbstractTestManagementSystem extends Object implements TestManagementSystem
Abstract base implementation of TestManagementSystem. Provides common functionality and helper methods for test management system implementations.
  • Field Details

  • Constructor Details

    • AbstractTestManagementSystem

      protected AbstractTestManagementSystem()
  • Method Details

    • initialize

      public void initialize(Object config)
      Description copied from interface: TestManagementSystem
      Initialize the test management system with configuration.
      Specified by:
      initialize in interface TestManagementSystem
      Parameters:
      config - Configuration object specific to the test management system
    • isConfigured

      public boolean isConfigured()
      Description copied from interface: TestManagementSystem
      Check if the test management system is properly configured.
      Specified by:
      isConfigured in interface TestManagementSystem
      Returns:
      true if the system is configured and ready to use
    • getLastStatus

      public OperationStatus getLastStatus()
      Description copied from interface: TestManagementSystem
      Get the status of the last operation.
      Specified by:
      getLastStatus in interface TestManagementSystem
      Returns:
      Status object containing success/failure information and any error messages
    • queueTestResult

      public void queueTestResult(UnifiedTestResult result)
      Description copied from interface: TestManagementSystem
      Queue a test result for later batch processing.
      Specified by:
      queueTestResult in interface TestManagementSystem
      Parameters:
      result - Test result to queue
    • pushResults

      public Map<String,String> pushResults(List<UnifiedTestResult> results)
      Description copied from interface: TestManagementSystem
      Push test results to the test management system. If results parameter is null, only queued results will be pushed.
      Specified by:
      pushResults in interface TestManagementSystem
      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: TestManagementSystem
      Flush any queued results to the test management system.
      Specified by:
      flushResults in interface TestManagementSystem
    • 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

      protected abstract String convertStatus(String status)
      Convert UnifiedTestResult status to test management system specific status.
      Parameters:
      status - UnifiedTestResult status
      Returns:
      Test management system specific status
    • convertFromStatus

      protected abstract String convertFromStatus(String status)
      Convert test management system specific status to UnifiedTestResult status.
      Parameters:
      status - Test management system specific status
      Returns:
      UnifiedTestResult status