Exemplo n.º 1
0
 @AfterMethod(alwaysRun = true)
 public void saveTcStep() throws Throwable {
   testCaseAction.addTestCaseStep(
       "step " + counter,
       String.valueOf(startTime.getMillis()),
       String.valueOf(DateTime.now().getMillis()),
       0);
 }
Exemplo n.º 2
0
 /**
  * Initialize the image folders, warning time and critical time for the current testcase with the
  * assigned initParameter.
  *
  * @param initParameter a initialized object of {@link TestCaseInitParameter}.
  */
 protected void initTestCaseAction(TestCaseInitParameter initParameter) {
   List<Path> imagePaths = initParameter.getImagePaths();
   testCaseAction.initWithPaths(
       this.initParameter.getTestCaseId(),
       this.initParameter.getWarningTime(),
       this.initParameter.getCriticalTime(),
       imagePaths.toArray(new Path[imagePaths.size()]));
 }
Exemplo n.º 3
0
 @AfterClass(alwaysRun = true)
 public void stopTC() throws Exception {
   if (executorService != null) {
     executorService.awaitTermination(1, TimeUnit.MILLISECONDS);
   }
   String testCaseName = this.getClass().getSimpleName();
   LOGGER.info(
       "............................ SAVE RESULTS OF TEST-CASE '{}' - {}",
       initParameter.getTestCaseId(),
       testCaseName);
   testCaseAction.saveResult(
       initParameter.getTestCaseId(),
       String.valueOf(startTimeCase.getMillis()),
       String.valueOf(DateTime.now().getMillis()),
       null,
       null);
   if (browser != null) {
     browser.close();
   }
 }