Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump cucumber.version from 6.10.0 to 6.10.2 #10

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
82d87d3
Rename docker-compose_native.yml to docker-compose_native4.0.yml
MohabMohie Jan 25, 2021
21ab575
Create docker-compose_native.yml (#243)
MohabMohie Jan 25, 2021
96a82a4
Enable the maximum performance mode with and without the headless exe…
MahmoudElSharkawy Jan 25, 2021
3a14344
Hot Fix for Custom Browser Options (#244) (#245)
MahmoudElSharkawy Jan 31, 2021
9daded5
Bump mssql-jdbc from 9.1.1.jre15-preview to 9.2.0.jre15 (#246)
dependabot[bot] Feb 1, 2021
a9943d0
Update README.md
MohabMohie Feb 4, 2021
baa4f32
Update test.yml
MohabMohie Feb 5, 2021
4da9f81
Update README.md
MohabMohie Feb 5, 2021
cf99662
Create codeql-analysis.yml
MohabMohie Feb 5, 2021
fe94823
Update codeql-analysis.yml
MohabMohie Feb 5, 2021
51099b3
Update test.yml
MohabMohie Feb 5, 2021
a501a46
Update README.md
MohabMohie Feb 5, 2021
16ed49e
Bug fix#249 (#250)
magdyheiba Feb 5, 2021
5c09a67
version bump - preparing for new release
MohabMohie Feb 6, 2021
fdd3168
minor performance enhancements
MohabMohie Feb 11, 2021
bd3df8e
Extent reports integration(#248) (#252)
MahmoudElSharkawy Feb 12, 2021
c1dad38
Extent Report Extras (#253)
MohabMohie Feb 13, 2021
4ac085a
Bump cucumber.version from 6.9.1 to 6.10.0 (#254)
dependabot[bot] Feb 15, 2021
0d1e7fd
Fixed #255 (#258)
MohabMohie Feb 16, 2021
c3a5827
Bug fixes (#260)
MohabMohie Feb 17, 2021
c520c2f
hotfix 1 (#261)
MohabMohie Feb 17, 2021
64396d6
Update path.properties
MohabMohie Feb 18, 2021
78942b3
Bump cucumber.version from 6.10.0 to 6.10.2
dependabot[bot] Mar 16, 2021
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
41 changes: 41 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "CodeQL"

on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '20 9 * * 2'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
language: [ 'java' ]

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}

- name: Set up JDK 15
uses: actions/[email protected]
with:
java-version: 15

- name: Build SHAFT_Engine
run: mvn clean install -DskipTests

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
13 changes: 10 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: Ubuntu - Test

on: [pull_request]
on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '00 1 * * *'

jobs:
build:
Expand All @@ -22,7 +29,7 @@ jobs:
run: docker ps
- name: Run all tests
continue-on-error: true
run: mvn test -DexecutionAddress="localhost:4444" -DtargetOperatingSystem="Linux-64" -DmaximumPerformanceMode="true" -DtargetBrowserName="GoogleChrome" -Dtest="!%regex[.*checksum.*], !%regex[.*cucumber.*], !%regex[.*sikulix.*], !%regex[.*imageComparison.*], !%regex[.*FileActions.*], !%regex[.*TerminalActions.*], !%regex[.*localShell.*], !%regex[.*fullPageScreenshotWithHeader.*], !%regex[.*dbConnection.*], !%regex[.*Appium.*]"
run: mvn test -DexecutionAddress="localhost:4444" -DtargetOperatingSystem="Linux-64" -DmaximumPerformanceMode="2" -DtargetBrowserName="GoogleChrome" -Dtest="!%regex[.*checksum.*], !%regex[.*cucumber.*], !%regex[.*sikulix.*], !%regex[.*imageComparison.*], !%regex[.*FileActions.*], !%regex[.*TerminalActions.*], !%regex[.*localShell.*], !%regex[.*fullPageScreenshotWithHeader.*], !%regex[.*dbConnection.*], !%regex[.*Appium.*]"
- name: Generate Allure Report with history
uses: simple-elf/[email protected]
with:
Expand All @@ -39,7 +46,7 @@ jobs:
- name: Deploy report to Github Pages
uses: peaceiris/[email protected]
with:
personal_token: ${{ secrets.PERSONAL_TOKEN }}
personal_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: allure-history/allure
destination_dir: allure
publish_branch: gh-pages
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@
/.git/*
*.iml
ajcore*.txt
debug.log
debug.log
/extent-reports/
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
[![Maven Central](https://img.shields.io/maven-central/v/io.github.mohabmohie/SHAFT_ENGINE?style=for-the-badge)](https://search.maven.org/search?q=g:%22io.github.mohabmohie%22%20AND%20a:%22SHAFT_ENGINE%22)

[![Codacy grade](https://img.shields.io/codacy/grade/3579cfd02a2c4f67bd1dce5dad0b1562?style=for-the-badge)](https://www.codacy.com/manual/mohab.mohieeldeen/SHAFT_ENGINE?utm_source=github.com&utm_medium=referral&utm_content=MohabMohie/SHAFT_ENGINE&utm_campaign=Badge_Grade)
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/MohabMohie/SHAFT_ENGINE/CodeQL%20-%20Security%20Analysis?label=CodeQL%20-%20Security%20Analysis&style=for-the-badge)](https://github.com/MohabMohie/SHAFT_ENGINE/actions?query=workflow%3A%22CodeQL+-+Security+Analysis%22)
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/MohabMohie/SHAFT_ENGINE/Ubuntu%20-%20Test?label=Ubuntu%20-%20Test&style=for-the-badge)](https://github.com/MohabMohie/SHAFT_ENGINE/actions?query=workflow%3A%22Ubuntu+-+Test%22)
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/MohabMohie/SHAFT_Engine/CodeQL?label=CodeQL&style=for-the-badge)](https://github.com/MohabMohie/SHAFT_ENGINE/actions?query=workflow%3ACodeQL)
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/MohabMohie/SHAFT_Engine/Ubuntu%20-%20Test?label=Ubuntu%20-%20Test&style=for-the-badge)](https://github.com/MohabMohie/SHAFT_ENGINE/actions?query=workflow%3A%22Ubuntu+-+Test%22)

#### If you want to contribute to this project, or you need any help/support getting started feel free to join our online Facebook group Automatest:
[![Automatest](https://facebookbrand.com/wp-content/uploads/2019/04/f_logo_RGB-Hex-Blue_512.png?w=50&h=50)](https://www.facebook.com/groups/Automatest)
#### To contribute to SHAFT_Engine join our Slack Channel, for support using SHAFT_Engine join our Facebook group:
<a href="https://join.slack.com/t/automatest-workspace/shared_invite/zt-lcmb3o9h-xqVEgswOtbx2~hQXX2ND4Q" target="_blank"><img src="https://a.slack-edge.com/80588/marketing/img/icons/icon_slack_hash_colored.png" alt="automatest-workspace" width="50" height="50"/></a> <a href="https://www.facebook.com/groups/Automatest" target="_blank"><img src="https://facebookbrand.com/wp-content/uploads/2019/04/f_logo_RGB-Hex-Blue_512.png" alt="Automatest" width="50" height="50"/></a>

### Getting Started:
- How to do cross-browser test automation in 10 minutes using SHAFT_Engine ▶️:
Expand Down
76 changes: 58 additions & 18 deletions docker-compose_native.yml
Original file line number Diff line number Diff line change
@@ -1,55 +1,95 @@
# This file can be used to quickly setup a selenium grid with one hub and two nodes

# https://github.com/SeleniumHQ/docker-selenium

# docker-compose -f docker-compose_native.yml up --scale chrome=4 --remove-orphans -d

# add '-d' option for detached execution

# docker-compose -f docker-compose_native.yml down --remove-orphans

# http://localhost:4444/grid/console
version: '3'

version: '3.7'

services:

selenium-hub:
#image: selenium/hub:3.141.59-20200515
image: selenium/hub:4.0.0

image: selenium/hub:3.141.59-20200515

ports:
- "4442:4442"
- "4443:4443"
- "4444:4444"

- 4444:4444

environment:

GRID_MAX_SESSION: 5

GRID_BROWSER_TIMEOUT: 300

GRID_TIMEOUT: 300

chrome:
#image: selenium/node-chrome:3.141.59-20200515
image: selenium/node-chrome:4.0.0

image: selenium/node-chrome:3.141.59-20200515

depends_on:
- selenium-hub

- selenium-hub

shm_size: 2gb

volumes:

- /dev/shm:/dev/shm

environment:
SE_EVENT_BUS_HOST: selenium-hub
SE_EVENT_BUS_PUBLISH_PORT: 4442
SE_EVENT_BUS_SUBSCRIBE_PORT: 4443

HUB_HOST: selenium-hub

HUB_PORT: 4444

SCREEN_WIDTH: 1920

SCREEN_HEIGHT: 1080

# set false for headless execution

START_XVFB: "false"

NODE_MAX_SESSION: 1

NODE_MAX_INSTANCES: 1

# firefox:

# image: selenium/node-firefox:3.141.59-20200515
# image: selenium/node-firefox:4.0.0

# depends_on:
# - selenium-hub

# - selenium-hub

# shm_size: 2gb

# volumes:

# - /dev/shm:/dev/shm

# environment:
# SE_EVENT_BUS_HOST: selenium-hub
# SE_EVENT_BUS_PUBLISH_PORT: 4442
# SE_EVENT_BUS_SUBSCRIBE_PORT: 4443

# HUB_HOST: selenium-hub

# HUB_PORT: 4444

# SCREEN_WIDTH: 1920

# SCREEN_HEIGHT: 1080

## set false for headless execution

# START_XVFB: "false"

# NODE_MAX_SESSION: 1
# NODE_MAX_INSTANCES: 1

# NODE_MAX_INSTANCES: 1
55 changes: 55 additions & 0 deletions docker-compose_native4.0.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# This file can be used to quickly setup a selenium grid with one hub and two nodes
# https://github.com/SeleniumHQ/docker-selenium
# docker-compose -f docker-compose_native.yml up --scale chrome=4 --remove-orphans -d
# add '-d' option for detached execution
# docker-compose -f docker-compose_native.yml down --remove-orphans
# http://localhost:4444/grid/console
version: '3'
services:
selenium-hub:
#image: selenium/hub:3.141.59-20200515
image: selenium/hub:4.0.0
ports:
- "4442:4442"
- "4443:4443"
- "4444:4444"
environment:
GRID_MAX_SESSION: 5
GRID_BROWSER_TIMEOUT: 300
GRID_TIMEOUT: 300
chrome:
#image: selenium/node-chrome:3.141.59-20200515
image: selenium/node-chrome:4.0.0
depends_on:
- selenium-hub
shm_size: 2gb
volumes:
- /dev/shm:/dev/shm
environment:
SE_EVENT_BUS_HOST: selenium-hub
SE_EVENT_BUS_PUBLISH_PORT: 4442
SE_EVENT_BUS_SUBSCRIBE_PORT: 4443
SCREEN_WIDTH: 1920
SCREEN_HEIGHT: 1080
# set false for headless execution
START_XVFB: "false"
NODE_MAX_SESSION: 1
NODE_MAX_INSTANCES: 1
# firefox:
# image: selenium/node-firefox:3.141.59-20200515
# image: selenium/node-firefox:4.0.0
# depends_on:
# - selenium-hub
# shm_size: 2gb
# volumes:
# - /dev/shm:/dev/shm
# environment:
# SE_EVENT_BUS_HOST: selenium-hub
# SE_EVENT_BUS_PUBLISH_PORT: 4442
# SE_EVENT_BUS_SUBSCRIBE_PORT: 4443
# SCREEN_WIDTH: 1920
# SCREEN_HEIGHT: 1080
## set false for headless execution
# START_XVFB: "false"
# NODE_MAX_SESSION: 1
# NODE_MAX_INSTANCES: 1
20 changes: 16 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.github.mohabmohie</groupId>
<artifactId>SHAFT_ENGINE</artifactId>
<version>4.4.20201208</version>
<version>5.1.20210217</version>
<name>${project.groupId}:${project.artifactId}</name>
<description>Selenium Hybrid Automation Framework for Testing [SHAFT]</description>
<url>https://github.com/MohabMohie/SHAFT_ENGINE</url>
Expand All @@ -30,12 +30,13 @@

<properties>
<!-- Dependencies and Plug-ins Version Numbers Parameters -->
<selenium.version>4.0.0-alpha-6</selenium.version>
<selenium.version>4.0.0-alpha-7</selenium.version>
<appium-selenium.version>3.141.59</appium-selenium.version>
<appium-java-client.version>7.4.1</appium-java-client.version>

<webdrivermanager.version>4.3.1</webdrivermanager.version>
<allure-testng.version>2.13.8</allure-testng.version> <!-- UPDATE internal.properties -->
<extentreports.version>5.0.6</extentreports.version>
<aspectj.version>1.9.6</aspectj.version> <!-- 1.9.5 DO NOT UPDATE (Search and replace) -->

<rest-assured.version>4.3.3</rest-assured.version>
Expand All @@ -46,7 +47,7 @@
<testng.version>7.3.0</testng.version>

<mysql-connector-java.version>8.0.23</mysql-connector-java.version>
<mssql-jdbc.version>9.1.1.jre15-preview</mssql-jdbc.version>
<mssql-jdbc.version>9.2.0.jre15</mssql-jdbc.version>
<postgresql.version>9.1-901-1.jdbc4</postgresql.version>
<!-- <ojdbc8.version>19.3.0.0</ojdbc8.version> -->

Expand All @@ -64,7 +65,7 @@

<jcraft-jsch.version>0.1.55</jcraft-jsch.version>

<cucumber.version>6.9.1</cucumber.version>
<cucumber.version>6.10.2</cucumber.version>
<cverges-expect4j.version>1.9</cverges-expect4j.version>

<openpnp-opencv.version>4.3.0-3</openpnp-opencv.version>
Expand All @@ -77,6 +78,10 @@
<!-- Build Commands-->
<installToLocalRepository>mvn clean install -DskipTests</installToLocalRepository>
<publishJavaDocs>mvn resources:resources javadoc:javadoc scm-publish:publish-scm</publishJavaDocs>

<!-- Deploy Commands -->
<deploymentHost>https://automatest.jfrog.io/</deploymentHost>
<deploymentPath>io/github/mohabmohie/SHAFT_ENGINE/${project.version}</deploymentPath>
</properties>

<dependencies>
Expand Down Expand Up @@ -224,6 +229,13 @@
<version>${aspectj.version}</version>
</dependency>

<!-- EXTENT REPORTS -->
<dependency>
<groupId>com.aventstack</groupId>
<artifactId>extentreports</artifactId>
<version>${extentreports.version}</version>
</dependency>

<!-- REST ASSURED -->
<dependency>
<groupId>io.rest-assured</groupId>
Expand Down
13 changes: 3 additions & 10 deletions src/main/java/com/shaft/cli/FileActions.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.apache.commons.io.IOUtils;
import org.apache.commons.io.filefilter.TrueFileFilter;
import org.apache.commons.lang3.SystemUtils;
import org.sikuli.basics.FileManager;
import org.testng.Assert;

import java.io.*;
Expand Down Expand Up @@ -295,17 +296,9 @@ public static byte[] readFromImageFile(String pathToTargetImage) {
}

public static String readFromFile(String pathToTargetFile) {
String text = "";
String absoluteFilePath = getAbsolutePath(pathToTargetFile);
Path filePath = Paths.get(absoluteFilePath);

try {
text = String.join(System.lineSeparator(), Files.readAllLines(filePath));
passAction("File Path: \"" + filePath + "\"", text);
} catch (IOException e) {
ReportManager.log(e);
failAction(e);
}
String text = FileManager.readFileToString(new File(absoluteFilePath));
passAction("File Path: \"" + absoluteFilePath + "\"", text);
return text;
}

Expand Down
115 changes: 55 additions & 60 deletions src/main/java/com/shaft/gui/browser/BrowserFactory.java

Large diffs are not rendered by default.

Loading