Skip to content
This repository has been archived by the owner on Feb 18, 2021. It is now read-only.

Heimdall 1 #22

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 32 additions & 20 deletions heimdall.application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.miqdigital.automation</groupId>
<artifactId>heimdall</artifactId>
<version>1.0.1</version>
</parent>
<groupId>com.miqdigital.automation</groupId>
<artifactId>heimdall.application</artifactId>
<version>1.0.2</version>
<modelVersion>4.0.0</modelVersion>

<artifactId>heimdall.application</artifactId>

<properties>
<gson.version>2.8.0</gson.version>
<lombok.version>1.18.6</lombok.version>
<httpmime.version>4.3.3</httpmime.version>
<javax-mail.version>1.5.0-b01</javax-mail.version>
<lombok.version>1.18.12</lombok.version>
<httpmime.version>4.5.12</httpmime.version>
<slf4j-api.version>1.7.21</slf4j-api.version>
<cucumber-reporting.version>3.10.0</cucumber-reporting.version>
<aws-java-sdk-core.version>1.11.368</aws-java-sdk-core.version>
<aws-java-sdk-s3.version>1.11.368</aws-java-sdk-s3.version>
<cucumber-java.version>4.2.0</cucumber-java.version>
<cucumber-reporting.version>5.3.0</cucumber-reporting.version>
<aws-java-sdk-core.version>1.11.729</aws-java-sdk-core.version>
<aws-java-sdk-s3.version>1.11.729</aws-java-sdk-s3.version>
<cucumber-java.version>6.0.0-RC2</cucumber-java.version>
<cucumber-junit.version>4.2.0</cucumber-junit.version>
<cucumber-core.version>4.2.0</cucumber-core.version>
<cucumber-core.version>6.0.0-RC2</cucumber-core.version>
<maven-surefire-plugin.version>3.0.0-M4</maven-surefire-plugin.version>
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
<jackson.version>2.11.1</jackson.version>
</properties>

<dependencies>
Expand All @@ -35,11 +35,6 @@
<artifactId>aws-java-sdk-s3</artifactId>
<version>${aws-java-sdk-s3.version}</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>${gson.version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
Expand All @@ -60,7 +55,11 @@
<artifactId>cucumber-reporting</artifactId>
<version>${cucumber-reporting.version}</version>
</dependency>

<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>${javax-mail.version}</version>
</dependency>

<dependency>
<groupId>io.cucumber</groupId>
Expand All @@ -77,12 +76,24 @@
<artifactId>cucumber-core</artifactId>
<version>${cucumber-core.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>

</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>8</source>
<target>8</target>
Expand All @@ -91,6 +102,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<systemPropertyVariables>
<buildNumber>${buildNumber}</buildNumber>
Expand Down
11 changes: 7 additions & 4 deletions heimdall.application/src/main/java/com/miqdigital/Heimdall.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

import java.io.IOException;

import com.miqdigital.reporting.HeimdallReporting;
import javax.mail.MessagingException;

import com.miqdigital.services.HeimdallReporting;

/**
* This class uses the instance of Heimdall Reporting.
Expand All @@ -19,11 +21,12 @@ public class Heimdall {
* @throws NoSuchFieldException noSuchFieldException
* @throws IllegalAccessException illegalAccessException
*/
public void updateStatusInS3AndNotifySlack(final String pathOfRunnerPropertiesFile,
public void updateStatusInS3AndNotify(final String pathOfRunnerPropertiesFile,
final String executionOutputPath)
throws InterruptedException, IOException, IllegalAccessException, NoSuchFieldException {
throws InterruptedException, IOException, IllegalAccessException, NoSuchFieldException,
MessagingException {
this.heimdallReporting = new HeimdallReporting(pathOfRunnerPropertiesFile, executionOutputPath);
heimdallReporting.updateStatusInS3AndNotifySlack();
heimdallReporting.updateStatusInS3AndNotify();
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.miqdigital.slack.dto;
package com.miqdigital.dto;

import lombok.Builder;

@Builder
public class SlackMessageInfo {
public class BuildResultDto {
public StringBuilder testExecutionInfo;
public StringBuilder failedTestDescription;
public long failedTestCount;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com.miqdigital.dto;

import lombok.Builder;
import lombok.Getter;

@Builder
@Getter
public class EmailDto {
private final boolean notifyEmail;
private final String emailTo;
private final String emailFrom;
private final String smtpHost;
private final String smtpPort;
private final String smtpUsername;
private final String smtpPassword;
private final String emailSubject;

}
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
package com.miqdigital.execution.dto;
package com.miqdigital.dto;

import java.util.Arrays;
import java.util.List;

import com.miqdigital.scenario.dto.ScenarioInfo;

import lombok.Builder;

@Builder
public class ExecutionInfo {
public class ExecutionInfoDto {
public String environment;
public String testType;
public String dateTime;
Expand All @@ -17,14 +15,14 @@ public class ExecutionInfo {
public long failTestCount;
public String BuildName;
public String BuildNumber;
public List<ScenarioInfo> scenarioInfoList;
public List<ScenarioInfoDto> scenarioInfoDtoList;

@Override
public String toString() {
return "ExecutionInfo{" + "environment='" + environment + '\'' + ", testType='" + testType
return "ExecutionInfoDto{" + "environment='" + environment + '\'' + ", testType='" + testType
+ '\'' + ", dateTime='" + dateTime + '\'' + ", totalTests=" + totalTests
+ ", passTestCount=" + passTestCount + ", failTestCount=" + failTestCount + ", BuildName='"
+ BuildName + '\'' + ", BuildNumber='" + BuildNumber + '\'' + ", scenarioInfoList=" + Arrays
.toString(scenarioInfoList.toArray()) + '}';
+ BuildName + '\'' + ", BuildNumber='" + BuildNumber + '\'' + ", scenarioInfoDtoList="
+ Arrays.toString(scenarioInfoDtoList.toArray()) + '}';
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.miqdigital.dto;

import lombok.Builder;
import lombok.Getter;

@Builder
@Getter
public class ScenarioInfoDto {
private final String scenarioTagId;
private final String scenarioName;
private final String scenarioStatus;
private final String scenarioTotalDuration;
private final int scenarioTotalSteps;
private final String featureDescription;
private final String featureFile;
private final ScenarioStepDto scenarioStepDto;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.miqdigital.dto;

import lombok.Builder;

@Builder
public class ScenarioStepDto {
private final String errMessage;
private final String stepDuration;
private final String scenarioLine;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.miqdigital.dto;

import lombok.Builder;
import lombok.Getter;

@Builder
@Getter
public class SlackDto {
private final String slackChannel;
private final String heimdallBotToken;
private final boolean notifySlack;
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.miqdigital.cucumber_runner;
package com.miqdigital.runner;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.miqdigital.cucumber_runner;
package com.miqdigital.runner;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.miqdigital.cucumber_runner;
package com.miqdigital.runner;

import java.lang.annotation.Annotation;
import java.lang.reflect.InvocationTargetException;
Expand Down
Loading