Class TestCaseService

java.lang.Object
ch.admin.bit.jeap.testorchestrator.services.TestCaseService

@Service public class TestCaseService extends Object
  • Constructor Details

    • TestCaseService

      public TestCaseService(List<TestCaseBaseInterface> testCases, TestReportService testReportService, TestRunService testRunService, TestCaseJpaRepository testCaseJpaRepository, @Value("${orchestrator.callbackUrl}") String callbackUrl, @Value("${orchestrator.zephyr.zephyrEnvironment}") String zephyrEnvironment, @Value("${orchestrator.testRunTimeout:30000}") long testRunTimeout)
      This Service injects the specific TestCase-Implementation by naming Convention. It starts the TestRun, and act's as EventListener (Spring Application Events)
  • Method Details

    • startTestRun

      public String startTestRun(String testCaseName)
      1. Creates a new TestRun and if there is no TestCase, a new one will be created. 2. Call 'prepare' on the specific TestCase Implementation 3. Call 'execute' on the specific TestCase Implementation
      Parameters:
      testCaseName - The testCaseName must be the same as the Name of specific class, which implements the TestCaseBaseInterface.
    • onApplicationEvent

      @EventListener public void onApplicationEvent(ExecuteDoneEvent event)
      Listen to the ExecuteDoneEvent and go on with the TestRun - Call 'verify' on the specific TestCase Implementation and store the Report - Call 'cleanUp' on the specific TestCase Implementation
      Parameters:
      event - ExecuteDoneEvent
    • onApplicationTestRunFinished

      @EventListener public void onApplicationTestRunFinished(TestRunFinishedEvent event)
      Listen to the TestRunFinishedEvent and ends the TestRun
      Parameters:
      event - TestRunFinishedEvent