Skip to content

Commit

Permalink
Merge pull request #8 from osandadeshan/1.1.0
Browse files Browse the repository at this point in the history
Updated smtp and mailapi to support new TLS version | Updated Gauge J…
  • Loading branch information
osandadeshan authored Feb 16, 2022
2 parents fef7a0d + 14a5fbe commit 99a782e
Show file tree
Hide file tree
Showing 8 changed files with 206 additions and 232 deletions.
66 changes: 32 additions & 34 deletions ReadMe.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# MaxSoft GReporter
<br />

## Introduction
In testing perspective, the test execution report is a vital document where the stakeholders can get an idea of the project health.
Expand All @@ -9,7 +8,6 @@ Gauge is proving a detailed test execution report with all the error messages an
But anyhow, QA should manually send the test execution report to the stakeholders by mentioning the number of scenarios executed, passed count, failed count and skipped count. Also in a regression cycle, QA has to send those counts as module wise figures. Further, QA needs to embed pie charts and bar charts to that report to represents the test execution data in a high readable manner.

MaxSoft GReporter is an automated solution for this issue. It acts as a Java plugin for gauge to send the test execution summary to a defined audience.
<br /><br />

## Technologies/Frameworks used
- Java
Expand All @@ -22,65 +20,72 @@ MaxSoft GReporter is an automated solution for this issue. It acts as a Java plu
- MailAPI
- TestNG
- Apache Maven
<br />

## Supported Platforms
- Windows
- Linux
- Mac OS
<br />

## Supported Languages
- Java
<br />

## Advantages
- Automated emails for test execution summary with graphical representations.
<br />

## Pre Requisites
1. Java
2. Maven
<br />

## How to Install Gauge Core

**On Windows**
1. Install Chocolatey by executing the following command. \
1. Install Chocolatey by executing the following command.

` @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString(‘https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"`

2. Install Gauge by executing the following command. \
2. Install Gauge by executing the following command.

`choco install gauge`

**On MacOS**
1. Update Homebrew. \
1. Update Homebrew.

`brew update`

2. Install Gauge using Homebrew. \
2. Install Gauge using Homebrew.

`brew install gauge`

**On Linux**
1. First, add Gauge’s GPG key with this command. \
1. First, add Gauge’s GPG key with this command.

`sudo apt-key adv --keyserver hkp://pool.sks-keyservers.net --recv-keys 023EDB0B`

2. Then add Gauge to the repository list using this command. \
2. Then add Gauge to the repository list using this command.

`echo deb https://dl.bintray.com/gauge/gauge-deb nightly main | sudo tee -a /etc/apt/sources.list`

3. Finally, install Gauge using these commands. \
`sudo apt-get update` \
3. Finally, install Gauge using these commands.

`sudo apt-get update`
`sudo apt-get install gauge`
<br />

## How to Install Gauge Plugins
1. Open Command Prompt and execute following commands. \
`gauge install java` \
`gauge install html-report` \
`gauge install json-report` \
`gauge install xml-report` \
`gauge install spectacle` \
1. Open Command Prompt and execute following commands.

`gauge install java`

`gauge install html-report`

`gauge install json-report`

`gauge install xml-report`

`gauge install spectacle`

`gauge install flash`

2. You can check the installation using the following command. \
2. You can check the installation using the following command.

`gauge -v`

If the installation is success, it will output like this:
Expand All @@ -96,12 +101,9 @@ MaxSoft GReporter is an automated solution for this issue. It acts as a Java plu
spectacle (<version number>)
xml-report (<version number>)
```
<br />

## MaxSoft GReporter Tutorials
- Medium - [MaxSoft GReporter](https://medium.com/greporter/maxsoft-email-client-for-gauge-8ae8af8ad32f)
- YouTube - [How to use MaxSoft GReporter for email reporting in Gauge framework](https://youtu.be/nZGMtcQPzxY)
<br />
- [MaxSoft GReporter](https://medium.com/greporter/maxsoft-email-client-for-gauge-8ae8af8ad32f)

## How to use MaxSoft GReporter?
1. Clone this gauge project into your computer
Expand All @@ -112,22 +114,18 @@ MaxSoft GReporter is an automated solution for this issue. It acts as a Java plu
6. Change the properties and Save it
7. Open **"barchart.properties"** file (`<rootDir>\env\chart\barchart.properties`) from notepad
8. Change the properties and Save it
9. Double click on **"TestRunner.bat"** which is in the root directory
9. Double-click on **"TestRunner.bat"** which is in the root directory
10. After the execution is completed, GReporter will push an email to the given audience including the test execution summary
![GReporter v1.0.3](https://i.imgur.com/xEovMLC.png)
<br />

## How to build MaxSoft GReporter JAR File?
1. Open the command prompt
2. Navigate to the directory of the project (`cd <project dir>`)
3. Execute this command
`mvn clean install -DskipTests`
<br />

## License
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/0/0b/License_icon-mit-2.svg/2000px-License_icon-mit-2.svg.png" alt="MIT License" width="100" height="100"/> [MaxSoft GReporter](https://medium.com/greporter) is released under [MIT License](https://opensource.org/licenses/MIT)

<br />

## Copyright
Copyright 2021 MaxSoft.
Copyright 2022 MaxSoft.
100 changes: 50 additions & 50 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,57 @@

<groupId>com.maxsoft.greporter</groupId>
<artifactId>maxsoft-greporter</artifactId>
<version>1.0.7</version>
<version>1.1.0</version>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>com.maxsoft.greporter.email.EmailSender</mainClass>
</configuration>
</plugin>
<plugin>
<groupId>com.thoughtworks.gauge.maven</groupId>
<artifactId>gauge-maven-plugin</artifactId>
<version>1.4.3</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>com.thoughtworks.gauge</groupId>
<artifactId>gauge-java</artifactId>
<version>0.7.13</version>
<version>0.7.15</version>
</dependency>
<dependency>
<groupId>org.knowm.xchart</groupId>
Expand All @@ -27,12 +71,12 @@
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>smtp</artifactId>
<version>1.4.4</version>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>mailapi</artifactId>
<version>1.4.4</version>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
Expand All @@ -51,54 +95,10 @@
<version>1.1.1</version>
</dependency>
</dependencies>
<properties>

<properties>
<src.dir>src/main/java</src.dir>
<emailConfigEnv>dev</emailConfigEnv>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>com.maxsoft.greporter.email.EmailSender</mainClass>
</configuration>
</plugin>
<plugin>
<groupId>com.thoughtworks.gauge.maven</groupId>
<artifactId>gauge-maven-plugin</artifactId>
<version>1.4.3</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
</plugins>
</build>

</project>
3 changes: 3 additions & 0 deletions src/main/java/com/maxsoft/greporter/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

public class Constants {

// Directory and File Path Constants
public static final String CURRENT_DIRECTORY = System.getProperty("user.dir");
public static final String FILE_SEPARATOR = File.separator;
public static final String PIE_CHART_PROPERTY_FILE_PATH = CURRENT_DIRECTORY + FILE_SEPARATOR + "env"
Expand All @@ -23,6 +24,8 @@ public class Constants {
+ FILE_SEPARATOR + "email" + FILE_SEPARATOR + "email.properties";
public static final String JSON_FILE_PATH = System.getProperty("user.dir") + FILE_SEPARATOR + "reports"
+ FILE_SEPARATOR + "json-report" + FILE_SEPARATOR + "result.json";

// Color Code Constants
public static final String GREEN = "green";
public static final String RED = "red";
public static final String GRAY = "#43433D";
Expand Down
Loading

0 comments on commit 99a782e

Please sign in to comment.