Skip to content

Commit

Permalink
Add support for Selenium4, Appium2.0 and Applitools v5 SDK (#178)
Browse files Browse the repository at this point in the history
* updated to latest ATD (from main branch)

* fix io.netty compile error (#149)

* merge from main, and updated based on new ATD

* fixed attaching device logs to reportportal

* use the latest ATD (from fixesForTeswiz branch)

* updated the CI workflow branches

* updated dependencies

* updated multiuser-multi-app scenario

* downgraded com.epam.reportportal:agent-java-cucumber6 to 5.1.2

* removed unnecessary dependencies and use them from atd. (atd uses the latest reportportal's agent-java-cucumber6 - 5.1.3

* updated ATD which uses agent-java-cucumber6 v5.1.0

* Updated ATD: reverted to agent-java-cucumber6 v5.1.3. Added debug trace to see what launchId is returned by rq.getLaunchUuid();

* updated teswiz version

* updated ATD and teswiz to create the correct reportportal URL is launchID is not available as a system property

* use ATD which has all dependencies updated. No need to retrieve launchID from ScenarioReporter - was behaving same as getting it from system property - rp.launch.id

* Created files for VodQA application testing and implemented scroll() method (#179)

* Created config and capabilities file for VodQA App testing

* Created feature, steps, BL, abstract screen and android screen files for VodQA scroll testing

* VodQA config file path set in CONFIG variable

* Implementation of scroll(fromPoint, toPoint) method according to appium 2.0 changes

* removed config path

* added command to execute feature, changed scenario name

* changed function and arguement names

* merged "When" "And" in feature and its related code in other files

* replaced 700 millisec with 1 second wait

* Removed string passed from feature, no longer needed

* modified steps according to feature

* changed method names and removed arguments

* changed method names, removed arguments, added visual validations and moved locators to top

* changed "Given"

* changed steps according to feature

---------

Co-authored-by: Mukund1 Gupta <Mukund1.Gupta@ril.com>

* Tap in the middle of the screen (#180)

* Tap in the middle of the screen

* Changed return type in business layer and android screen

* removing unused locators

* Resolved comments

* Tap in the middle of the screen

* removing unused locators

* removing existing files

* Revert "removing existing files"

This reverts commit 44259e6.

* Updated according to the comments

* Changing function names and variable names

* Update vodqa.feature

* Appium2.0 (#183)

* updated driver method scrollDownByScreenSize for appium 2.0 implementation

* added test steps for scrollDownByScreenSize method

* added test step implementation for scenario to test scrollDownByScreenSize

* added visually for scrolled screen

* added a wait for an element to remove flakiness due to screen load

* removed unused imports

* Updated scroll down by screen size scenario name

* removed duplicate step

* resolved issue due to conflict

* AppiumDriver.closeApp() replaced by AndroidDriver.terminateApp() (#187)

* Created config and capabilities file for VodQA App testing

* Created feature, steps, BL, abstract screen and android screen files for VodQA scroll testing

* VodQA config file path set in CONFIG variable

* Implementation of scroll(fromPoint, toPoint) method according to appium 2.0 changes

* removed config path

* added command to execute feature, changed scenario name

* changed function and arguement names

* merged "When" "And" in feature and its related code in other files

* replaced 700 millisec with 1 second wait

* Removed string passed from feature, no longer needed

* modified steps according to feature

* changed method names and removed arguments

* changed method names, removed arguments, added visual validations and moved locators to top

* changed "Given"

* changed steps according to feature

* replaced closeApp() with terminateApp(appPackageName) and called it using AndroidDriver instead of AppiumDriver

* optimized imports

---------

Co-authored-by: Mukund1 Gupta <Mukund1.Gupta@ril.com>

* replace closeApp() with terminateApp(), updated todo to test this change (#188)

* Created config and capabilities file for VodQA App testing

* Created feature, steps, BL, abstract screen and android screen files for VodQA scroll testing

* VodQA config file path set in CONFIG variable

* Implementation of scroll(fromPoint, toPoint) method according to appium 2.0 changes

* removed config path

* added command to execute feature, changed scenario name

* changed function and arguement names

* merged "When" "And" in feature and its related code in other files

* replaced 700 millisec with 1 second wait

* Removed string passed from feature, no longer needed

* modified steps according to feature

* changed method names and removed arguments

* changed method names, removed arguments, added visual validations and moved locators to top

* changed "Given"

* changed steps according to feature

* replaced closeApp() with terminateApp(appPackageName) and called it using AndroidDriver instead of AppiumDriver

* optimized imports

* replaced closeApp() with terminateApp() using AndroidDriver for closeWindowsAppOnMachine method, updated TODO to test on windows app in windows OS

---------

Co-authored-by: Mukund1 Gupta <Mukund1.Gupta@ril.com>

* select Notification From Notification Drawer (#182)

* Added implementation for selectNotificationFromNotificationDrawer() and scenario to test test the feature in JioMeet

* Removed commented Code

* Code formating

* Renamed sequenced object

* Updated the scenario name

* updated the apk name for jio meet

---------

Co-authored-by: Darshan <darshan3.s@ril.com>

* Appium2.0: Swipe Gesture implementation and addition of 3 test scenarios (#186)

* implemented swipe for android and added a new method swipeByPassingPercentageAttributes in Driver.java

* updated swipe left and swipe right methods in Driver.java

* Added 3 Test scenarios for validating swipe gestures

* using duration as seconds instead of milli seconds in the swipe gesture method

* updated steps and screen names

* added visual validation for swipe gesture test

* resolved review comments

* taken pull from origin branch

* throwing exception in checkPercentagesAreValid() method in Driver.java

* minor changes

* minor changes

* Hybrid App Compatibility of Context Switching utility for Appium 2.0 (#184)

* added feature for context switching

* Latest pull

* Implementation of test scenario

* took latest pull

* Added visual checks to the screens

* Updated step file

* Modified feature file and removed commented code

* Updated step file

* updated feature file and added visual checks

* Backmerging from appium:2.0 (#191)

* cleaned up build.gradle

* updated fasterxmlJackson and applitools dependency version

* set next teswiz version to v0.0.80

* revert to Applitools library 5.54.0

* Appium2.0 : Added test scenario for ScrollVertically by percentage (#193)

* removed unused imports

* Added scroll vertically by percentage scenario

* Added step implementation for scroll vertically by percentage scenario

* Appium2.0: Scroll in dynamic layer implementation and addition of a test scenario (#194)

* implemented swipe for android and added a new method swipeByPassingPercentageAttributes in Driver.java

* updated swipe left and swipe right methods in Driver.java

* Added 3 Test scenarios for validating swipe gestures

* using duration as seconds instead of milli seconds in the swipe gesture method

* updated steps and screen names

* added visual validation for swipe gesture test

* resolved review comments

* taken pull from origin branch

* throwing exception in checkPercentagesAreValid() method in Driver.java

* minor changes

* minor changes

* implemented scroll in dynamic layer in Driver.java

* updated scroll function points in Driver.java

* added test scenario to validate scrollInDynamicLayer() functionality

* replaced from and to screen height in scrollDownByScreenSize()

* replaced from and to elements in test scenario

* added a direction enum

* passing direction enum to scrollInDynamicLayer()

* passing direction from feature file

* added tags for few scenarios in vodqa.feature

* changed Direction into enum

* removed direction validation in scrollInDynamicLayer()

* passing direction onj instead of string

* minor changes

* Changed appiumDriver.queryAppState() to androidDriver.queryAppState() (#195)

* queryAppState

* Throw exception for other platform

* Update AppiumDriverManager.java

* Added gradle command to execute the scenario

* Throw exception for other platform

* Update AppiumDriverManager.java

* reverting feature file changes

* removing extra else condition

* Removed redundant methods from vodQa scenarios (#197)

* updated Applitools version to v5.55.0

* updated to ATD 13.1.0

* removed appium2.0 branch from CI workflow

* updated app path for calculator and jiomeet caps (#198)

* fix apk path in capabilities file

* added missing serverConfig to capabilities file

* use remote path for VodQA.apk

---------

Co-authored-by: Sai Krishna <saikrishna321@yahoo.com>
Co-authored-by: Mukund Gupta <mukundgpt2025@gmail.com>
Co-authored-by: Mukund1 Gupta <Mukund1.Gupta@ril.com>
Co-authored-by: MedhaGupta-Ril <122343539+MedhaGupta-Ril@users.noreply.github.com>
Co-authored-by: aamisharora1 <107185850+aamisharora1@users.noreply.github.com>
Co-authored-by: Darshan S <57480993+DarshanS4444@users.noreply.github.com>
Co-authored-by: Darshan <darshan3.s@ril.com>
Co-authored-by: Tammewar snehit <31981138+snehith07@users.noreply.github.com>
Co-authored-by: ngourkar <117643274+ngourkar@users.noreply.github.com>
Co-authored-by: Raghav Garg <117148030+raghavgarg1996@users.noreply.github.com>
  • Loading branch information
11 people authored Jun 21, 2023
1 parent 8e25b0f commit 770fd6c
Show file tree
Hide file tree
Showing 51 changed files with 1,367 additions and 392 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ name: Java CI with Gradle

on:
push:
branches: [ main, newSamples ]
branches: [ main ]
pull_request:
branches: [ main, newSamples ]
branches: [ main ]

jobs:
build:
Expand All @@ -26,6 +26,6 @@ jobs:
java-version: '11'
distribution: 'temurin'
- name: Build with Gradle
uses: gradle/gradle-build-action@6095a76664413da4c8c134ee32e8a8ae900f0f1f
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629
with:
arguments: build --refresh-dependencies
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ upload
libs
*.plantuml
reportportal.lock
reportportal.sync
reportportal.sync
.vscode/*
51 changes: 19 additions & 32 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,21 @@ buildscript {
ext {
gradleVersion = '7.3.3'
assertJVersion = '3.24.2'
atdVersion = 'dbef9be'
applitoolsSeleniumVersion = '3.213.0'
applitoolsAppiumVersion = '3.213.0'
atdVersion = '13.1.0'
applitoolsSeleniumVersion = '5.55.0'
applitoolsAppiumVersion = '5.55.0'
applitoolsUniversalCoreVersion = '5.55.0'
commonsLang3Version = '3.12.0'
unirestVersion = '3.14.2'
jadbVersion = '1.2.1'
webDriverManagerVersion = '5.3.2'
googleCodeJsonSimpleVersion = '1.1.1'
junitVersion = '5.9.2'
webDriverManagerVersion = '5.3.3'
junitVersion = '5.9.3'
slf4jVersion = '2.0.7'
reportportalAgentCucumberVersion = '5.0.6'
reportportalAgentTestNGVersion = '5.0.11'
fasterxmlJacksonVersion = '2.14.2'
jsonPathVersion = '2.8.0'
everitSchemaValidatorVersion = '1.5.1'
jodaTimeVersion = '2.12.4'
fasterxmlJacksonVersion = '2.15.2'
jodaTimeVersion = '2.12.5'
masterThoughtVersion = '5.7.5'
browserStackLocalVersion = '1.0.7'
jetbrainsAnnotationsVersion = '24.0.0'
}
}

Expand All @@ -34,7 +31,7 @@ plugins {
}

group = 'com.github.znsio'
version '0.0.74'
version '0.0.80'

repositories {
mavenLocal()
Expand All @@ -57,6 +54,7 @@ compileJava {
options.encoding = "UTF-8"
}


idea {
module {
downloadJavadoc = true
Expand All @@ -68,35 +66,21 @@ dependencies {
implementation fileTree(dir: "$project.projectDir/libs", include: ['*.jar'])
implementation files("$buildDir/classes/main")
implementation files("$buildDir/classes/test")
implementation "com.googlecode.json-simple:json-simple:$project.googleCodeJsonSimpleVersion"
implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:$project.fasterxmlJacksonVersion"
implementation "com.konghq:unirest-java:$project.unirestVersion"
implementation "org.assertj:assertj-core:$project.assertJVersion"
implementation "com.github.AppiumTestDistribution:AppiumTestDistribution:$project.atdVersion"
implementation "org.apache.commons:commons-lang3:$project.commonsLang3Version"
implementation "io.github.bonigarcia:webdrivermanager:$project.webDriverManagerVersion"
implementation "com.jayway.jsonpath:json-path:$project.jsonPathVersion"
implementation "com.github.vidstige:jadb:$project.jadbVersion"
implementation "org.jetbrains:annotations:$project.jetbrainsAnnotationsVersion"
implementation "org.junit.jupiter:junit-jupiter:$project.junitVersion"
implementation "com.epam.reportportal:agent-java-cucumber6:$project.reportportalAgentCucumberVersion"
implementation "org.slf4j:slf4j-api:$project.slf4jVersion"
implementation "joda-time:joda-time:$project.jodaTimeVersion"
implementation "com.browserstack:browserstack-local-java:$project.browserStackLocalVersion"
implementation("com.epam.reportportal:agent-java-testng:$project.reportportalAgentTestNGVersion") {
exclude group: 'com.fasterxml.jackson.core'
}
implementation("com.applitools:eyes-appium-java3:$project.applitoolsAppiumVersion") {
exclude group: 'java-client'
exclude group: 'selenium-java'
exclude group: 'eyes-connectivity-java5-jersey2x'
}
implementation("com.applitools:eyes-selenium-java3:$project.applitoolsSeleniumVersion") {
exclude group: 'java-client'
exclude group: 'selenium-java'
exclude group: 'eyes-connectivity-java5-jersey2x'
}
implementation "com.applitools:eyes-connectivity-java3-jersey1x:$project.applitoolsSeleniumVersion"
implementation "org.everit.json:org.everit.json.schema:$project.everitSchemaValidatorVersion"
implementation "com.applitools:eyes-appium-java5:$project.applitoolsAppiumVersion"
implementation "com.applitools:eyes-selenium-java5:$project.applitoolsSeleniumVersion"
implementation "com.applitools:eyes-universal-core-mac:$project.applitoolsUniversalCoreVersion"
implementation "net.masterthought:cucumber-reporting:$masterThoughtVersion"
}

Expand Down Expand Up @@ -177,9 +161,12 @@ task run(type: JavaExec) {
]
args = runnerArgs

println("Debug mode: " + System.getProperty('debug', 'false'))
// attach debugger
if (System.getProperty('debug', 'false') == 'true') {
jvmArgs '-Xdebug', '-agentlib:jdwp=transport=dt_socket,server=n,address=192.168.29.248:9009,suspend=y'
println("In debug mode")
jvmArgs '-Xdebug', '-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,' +
'address=*:5005'
}
}
mainClass = "com.znsio.teswiz.runner.Runner"
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.sample
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import java.text.SimpleDateFormat
buildscript {
ext {
gradleVersion = '7.3.3'
teswizVersion = '0.0.74'
teswizVersion = '0.0.80'
}
repositories {
mavenLocal()
Expand Down
16 changes: 13 additions & 3 deletions caps/ajio_local_capabilities.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"android": {
"adbExecTimeout": 45000,
"app": {
"local": "https://github.com/anandbagmar/sampleAppsForNativeMobileAutomation/raw/main/ajio-8-3-4.apk"
},
"app": "https://github.com/anandbagmar/sampleAppsForNativeMobileAutomation/raw/main/ajio-8-3-4.apk",
"appActivity": "com.ril.ajio.launch.activity.SplashScreenActivity",
"appPackage": "com.ril.ajio",
"appWaitDuration": 45000,
Expand All @@ -21,6 +19,18 @@
"skipUnlock": true,
"noReset": false
},
"serverConfig" : {
"server": {
"port": 31337,
"use-plugins": ["device-farm", "appium-dashboard"],
"plugin": {
"device-farm": {
"platform": "android",
"skipChromeDownload": true
}
}
}
},
"hostMachines": [
{
"machineIP": "127.0.0.1",
Expand Down
17 changes: 13 additions & 4 deletions caps/calculator2_local_capabilities.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"android": {
"adbExecTimeout": 45000,
"app": {
"local": "https://github.com/anandbagmar/sampleAppsForNativeMobileAutomation/raw/main/AndroidCalculator.apk"
},
"app": "https://github.com/anandbagmar/sampleAppsForNativeMobileAutomation/raw/main/AndroidCalculator.apk",
"appPackage": "com.android2.calculator3",
"appActivity": "com.android2.calculator3.Calculator",
"appWaitDuration": 45000,
Expand All @@ -16,10 +14,21 @@
"newCommandTimeout": 12000,
"noSign": true,
"platformName": "android",
"platformVersion": "11.0",
"printPageSourceOnFindFailure": true,
"skipUnlock": true
},
"serverConfig" : {
"server": {
"port": 31337,
"use-plugins": ["device-farm", "appium-dashboard"],
"plugin": {
"device-farm": {
"platform": "android",
"skipChromeDownload": true
}
}
}
},
"hostMachines": [
{
"machineIP": "127.0.0.1"
Expand Down
16 changes: 12 additions & 4 deletions caps/calculator_local_capabilities.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"android": {
"adbExecTimeout": 45000,
"app": {
"local": "https://github.com/anandbagmar/sampleAppsForNativeMobileAutomation/raw/main/AndroidCalculator.apk"
},
"app": "https://github.com/anandbagmar/sampleAppsForNativeMobileAutomation/raw/main/AndroidCalculator.apk",
"appPackage": "com.android2.calculator3",
"appActivity": "com.android2.calculator3.Calculator",
"appWaitDuration": 45000,
Expand All @@ -16,10 +14,20 @@
"newCommandTimeout": 12000,
"noSign": true,
"platformName": "android",
"platformVersion": "11.0",
"printPageSourceOnFindFailure": true,
"skipUnlock": true
},
"serverConfig" : {
"server": {
"use-plugins": ["device-farm", "appium-dashboard"],
"plugin": {
"device-farm": {
"platform": "android",
"skipChromeDownload": true
}
}
}
},
"hostMachines": [
{
"machineIP": "127.0.0.1"
Expand Down
14 changes: 12 additions & 2 deletions caps/calculator_pcloudy_capabilities.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,18 @@
"unicodeKeyboard": true,
"resetKeyboard": true,
"noReset": false,
"app": {
"local": "https://github.com/anandbagmar/sampleAppsForNativeMobileAutomation/raw/main/AndroidCalculator.apk"
"app": "https://github.com/anandbagmar/sampleAppsForNativeMobileAutomation/raw/main/AndroidCalculator.apk"
},
"serverConfig" : {
"server": {
"port": 31337,
"use-plugins": ["device-farm", "appium-dashboard"],
"plugin": {
"device-farm": {
"platform": "android",
"skipChromeDownload": true
}
}
}
},
"cloud": {
Expand Down
16 changes: 13 additions & 3 deletions caps/confengine_local_capabilities.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"android": {
"adbExecTimeout": 45000,
"app": {
"local": "./src/test/resources/sampleApps/confEngine-devApi-debug.apk"
},
"app": "./src/test/resources/sampleApps/confEngine-devApi-debug.apk",
"appActivity": "com.confengine.confengine.activity.Html5Activity",
"appPackage": "com.confengine.confengine",
"appWaitDuration": 45000,
Expand All @@ -21,6 +19,18 @@
"skipUnlock": true,
"noReset": false
},
"serverConfig" : {
"server": {
"port": 31337,
"use-plugins": ["device-farm", "appium-dashboard"],
"plugin": {
"device-farm": {
"platform": "android",
"skipChromeDownload": true
}
}
}
},
"hostMachines": [
{
"machineIP": "127.0.0.1",
Expand Down
16 changes: 13 additions & 3 deletions caps/dineout_local_capabilities.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"android": {
"adbExecTimeout": 45000,
"app": {
"local": "https://github.com/anandbagmar/sampleAppsForNativeMobileAutomation/raw/main/dineout.book_2022-10-18.apk"
},
"app": "https://github.com/anandbagmar/sampleAppsForNativeMobileAutomation/raw/main/dineout.book_2022-10-18.apk",
"appActivity": "com.dineout.book.splash.presentation.view.NewSplashActivity",
"appPackage": "com.dineout.book",
"appWaitDuration": 45000,
Expand All @@ -21,6 +19,18 @@
"skipUnlock": true,
"noReset": false
},
"serverConfig" : {
"server": {
"port": 31337,
"use-plugins": ["device-farm", "appium-dashboard"],
"plugin": {
"device-farm": {
"platform": "android",
"skipChromeDownload": true
}
}
}
},
"hostMachines": [
{
"machineIP": "127.0.0.1",
Expand Down
16 changes: 13 additions & 3 deletions caps/indigo_local_capabilities.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"android": {
"adbExecTimeout": 45000,
"app": {
"local": "https://github.com/anandbagmar/sampleAppsForNativeMobileAutomation/raw/main/IndiGoFlight-App_5.0.85.apk"
},
"app": "https://github.com/anandbagmar/sampleAppsForNativeMobileAutomation/raw/main/IndiGoFlight-App_5.0.85.apk",
"appActivity": "in.goindigo.android.ui.modules.splash.SplashActivity",
"appPackage": "in.goindigo.android",
"appWaitDuration": 45000,
Expand All @@ -21,6 +19,18 @@
"skipUnlock": true,
"noReset": false
},
"serverConfig" : {
"server": {
"port": 31337,
"use-plugins": ["device-farm", "appium-dashboard"],
"plugin": {
"device-farm": {
"platform": "android",
"skipChromeDownload": true
}
}
}
},
"hostMachines": [
{
"machineIP": "127.0.0.1",
Expand Down
16 changes: 13 additions & 3 deletions caps/jiomeet_browserStack_capabilities.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"android": {
"adbExecTimeout": 45000,
"app": {
"local": "https://github.com/anandbagmar/sampleAppsForNativeMobileAutomation/raw/main/com.jio.rilconferences_v4.21.6.7-421607_Android-5.0.apk"
},
"app": "https://github.com/anandbagmar/sampleAppsForNativeMobileAutomation/raw/main/com.jio.rilconferences_v4.21.6.7-421607_Android-5.0.apk",
"appActivity": "org.jio.meet.introduction.views.SplashActivity",
"appPackage": "com.jio.rilconferences",
"automationName": "UiAutomator2",
Expand All @@ -26,6 +24,18 @@
"browserstack.locale": "IN",
"project": "teswiz"
},
"serverConfig" : {
"server": {
"port": 31337,
"use-plugins": ["device-farm", "appium-dashboard"],
"plugin": {
"device-farm": {
"platform": "android",
"skipChromeDownload": true
}
}
}
},
"cloud": {
"android": [
]
Expand Down
Loading

0 comments on commit 770fd6c

Please sign in to comment.