Skip to content

Commit

Permalink
moved configs and caps to repo root level
Browse files Browse the repository at this point in the history
  • Loading branch information
anandbagmar committed Sep 12, 2022
1 parent 664da7e commit 1d78892
Show file tree
Hide file tree
Showing 36 changed files with 283 additions and 302 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ task run(type: JavaExec) {
// def isRunInCI = Boolean.parseBoolean(System.getenv("RUN_IN_CI"))
// println "isRunningInCI: $isRunInCI"
// def configFile = isRunInCI
// ? "./src/test/resources/configs/pcloudy_config.properties"
// : "./src/test/resources/configs/calculator_config.properties"
// ? "./configs/theapp_pcloudy_config.properties"
// : "./configs/theapp_local_config.properties"
// configFile = System.getenv("CONFIG") ? System.getenv("CONFIG") : configFile

systemProperties = System.properties
Expand Down
17 changes: 15 additions & 2 deletions build.gradle.sample
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,21 @@ task run(type: JavaExec) {
def isRunInCI = Boolean.parseBoolean(System.getenv("RUN_IN_CI"))
println "isRunningInCI: $isRunInCI"

def configFile = isRunInCI ? "./configs/pcloudy_config.properties" : "./configs/config.properties"
configFile = System.getenv("CONFIG") ? System.getenv("CONFIG") : configFile
def configFile = System.getenv("CONFIG")
if(null == configFile || !file(configFile).exists()) {
println("CONFIG file not provided, or does not exist")
println("Run the test by providing the CONFIG file not provided, or does not exist")
assert file(configFile).exists()
}

// You can also specify which config file to use based on the value of RUN_IN_CI as shown below
//
// def isRunInCI = Boolean.parseBoolean(System.getenv("RUN_IN_CI"))
// println "isRunningInCI: $isRunInCI"
// def configFile = isRunInCI
// ? "./configs/theapp_pcloudy_config.properties"
// : "./configs/theapp_local_config.properties"
// configFile = System.getenv("CONFIG") ? System.getenv("CONFIG") : configFile

systemProperties = System.properties
def runnerArgs = [
Expand Down
File renamed without changes.
File renamed without changes.
35 changes: 35 additions & 0 deletions caps/calculator_pcloudy_capabilities.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"android": {
"automationName": "UiAutomator2",
"appPackage": "com.android2.calculator3",
"appActivity": "com.android2.calculator3.Calculator",
"autoGrantPermissions": true,
"launchTimeout": 90000,
"newCommandTimeout": 600,
"pCloudy_DurationInMinutes": 10,
"pCloudy_DeviceVersion": "10.0.0",
"pCloudy_WildNet": "false",
"pCloudy_EnableVideo": "true",
"pCloudy_EnablePerformanceData": "true",
"pCloudy_EnableDeviceLogs": "true",
"platformVersion": "10.0.0",
"platformName": "Android",
"unicodeKeyboard": true,
"resetKeyboard": true,
"noReset": false,
"app": {
"local": "./src/test/resources/sampleApps/AndroidCalculator.apk"
}
},
"cloud": {
"android": [
]
},
"hostMachines": [
{
"machineIP": "device.pcloudy.com/appiumcloud",
"isCloud": true,
"cloudName": "pCloudy"
}
]
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{
"android": {
"adbExecTimeout": 45000,
"app": {
"local": "./src/test/resources/sampleApps/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",
"appPackage": "com.appiumpro.the_app",
"appActivity": "com.appiumpro.the_app.MainActivity",
"platformVersion": "10",
"platformName": "Android",
"device": "Samsung",
Expand All @@ -11,19 +15,16 @@
"launchTimeout": 90000,
"unicodeKeyboard": true,
"resetKeyboard": true,
"noReset": true,
"noReset": false,
"autoAcceptAlerts": true,
"browserstack.enableCameraImageInjection": true,
"browserstack.geoLocation": "IN",
"browserstack.timezone": "Kolkata",
"browserstack.debug": "false",
"browserstack.networkLogs": "true",
"browserstack.gpsLocation": "22,75",
"browserstack.acceptInsecureCerts": "true",
"browserstack.locale": "IN",
"project": "teswiz",
"app": {
"local": "./src/test/resources/sampleApps/TheApp-release.apk"
}
"project": "teswiz"
},
"cloud": {
"android": [
Expand Down
35 changes: 35 additions & 0 deletions caps/jiomeet_local_capabilities.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"android": {
"adbExecTimeout": 45000,
"app": {
"local": "./src/test/resources/sampleApps/com.jio.rilconferences_v4.21.6.7-421607_Android-5.0.apk"
},
"appActivity": "org.jio.meet.introduction.views.SplashActivity",
"appPackage": "com.jio.rilconferences",
"appWaitDuration": 45000,
"automationName": "UiAutomator2",
"autoGrantPermissions": true,
"deviceName": "android",
"dontStopAppOnReset": true,
"enablePerformanceLogging": true,
"eventTimings": true,
"newCommandTimeout": 12000,
"noSign": true,
"platformName": "android",
"platformVersion": "11.0",
"printPageSourceOnFindFailure": true,
"skipUnlock": true,
"noReset": false
},
"hostMachines": [
{
"machineIP": "127.0.0.1",
"simulators": [
{
"deviceName": "iPhone 11",
"OS": "13.5"
}
]
}
]
}
35 changes: 35 additions & 0 deletions caps/jiomeetlatest_capabilities.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"android": {
"adbExecTimeout": 45000,
"app": {
"local": "./src/test/resources/sampleApps/com.jio.rilconferences_v4.21.6.7-421607_Android-5.0.apk"
},
"appActivity": "org.jio.meet.introduction.views.SplashActivity",
"appPackage": "com.jio.rilconferences",
"appWaitDuration": 45000,
"automationName": "UiAutomator2",
"autoGrantPermissions": true,
"deviceName": "android",
"dontStopAppOnReset": true,
"enablePerformanceLogging": true,
"eventTimings": true,
"newCommandTimeout": 12000,
"noSign": true,
"platformName": "android",
"platformVersion": "11.0",
"printPageSourceOnFindFailure": true,
"skipUnlock": true,
"noReset": false
},
"hostMachines": [
{
"machineIP": "127.0.0.1",
"simulators": [
{
"deviceName": "iPhone 11",
"OS": "13.5"
}
]
}
]
}
35 changes: 35 additions & 0 deletions caps/jiomeetoldversion_capabilities.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"android": {
"adbExecTimeout": 45000,
"app": {
"local": "./src/test/resources/sampleApps/com.jio.rilconferences_v4.21.4.5-421405_Android-5.0.apk"
},
"appActivity": "org.jio.meet.introduction.views.SplashActivity",
"appPackage": "com.jio.rilconferences",
"appWaitDuration": 45000,
"automationName": "UiAutomator2",
"autoGrantPermissions": true,
"deviceName": "android",
"dontStopAppOnReset": true,
"enablePerformanceLogging": true,
"eventTimings": true,
"newCommandTimeout": 12000,
"noSign": true,
"platformName": "android",
"platformVersion": "11.0",
"printPageSourceOnFindFailure": true,
"skipUnlock": true,
"noReset": false
},
"hostMachines": [
{
"machineIP": "127.0.0.1",
"simulators": [
{
"deviceName": "iPhone 11",
"OS": "13.5"
}
]
}
]
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@
"viewportSize": "1280x900",
"useUFG": true,
"testConcurrency": 10,
"showLogs": true,
"disableBrowserFetching": false
"showLogs": true
}
File renamed without changes.
28 changes: 28 additions & 0 deletions configs/calculator2_local_config.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
RUNNER=distribute
FRAMEWORK=cucumber
RUNNER_LEVEL=methods
CAPS=./caps/calculator2_local_capabilities.json
APP_NAME=teswiz
APP_PACKAGE_NAME=com.android2.calculator3
APPLITOOLS_CONFIGURATION=./src/test/resources/configs/applitools_config.json
BASE_URL_FOR_WEB=BASE_URL
BROWSER=chrome
ENVIRONMENT_CONFIG_FILE=./src/test/resources/environments.json
CLEANUP_DEVICE_BEFORE_STARTING_EXECUTION=false
IS_VISUAL=false
LOG_DIR=target
LOG_PROPERTIES_FILE=./src/test/resources/log4j.properties
PARALLEL=1
PLATFORM=android
PROXY_KEY=HTTP_PROXY
BUILD_ID=BUILDID
WEBDRIVER_MANAGER_PROXY_KEY=HTTP_PROXY
REPORT_PORTAL_FILE=./src/test/resources/reportportal.properties
REMOTE_WEBDRIVER_GRID_PORT=TESWIZ_GRID_PORT
RUN_IN_CI=false
TARGET_ENVIRONMENT=prod
TEST_DATA_FILE=./src/test/resources/testData.json
MAX_NUMBER_OF_APPIUM_DRIVERS=5
MAX_NUMBER_OF_WEB_DRIVERS=5
BROWSER_CONFIG_FILE=./src/test/resources/configs/browser_config.json
BRANCH_NAME=BUILD_SOURCEBRANCH
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
RUNNER=distribute
FRAMEWORK=cucumber
RUNNER_LEVEL=methods
CAPS=./src/test/resources/caps/calculator_capabilities.json
CAPS=./caps/calculator_local_capabilities.json
APP_NAME=teswiz
APP_PACKAGE_NAME=com.android2.calculator3
APPLITOOLS_CONFIGURATION=./src/test/resources/configs/applitools_config.json
Expand All @@ -17,11 +17,12 @@ PLATFORM=android
PROXY_KEY=HTTP_PROXY
BUILD_ID=BUILDID
WEBDRIVER_MANAGER_PROXY_KEY=HTTP_PROXY
REPORT_PORTAL_FILE=src/test/resources/reportportal.properties
REMOTE_WEBDRIVER_GRID_PORT=GRID_PORT
REPORT_PORTAL_FILE=./src/test/resources/reportportal.properties
REMOTE_WEBDRIVER_GRID_PORT=TESWIZ_GRID_PORT
RUN_IN_CI=false
TARGET_ENVIRONMENT=prod
TEST_DATA_FILE=./src/test/resources/testData.json
MAX_NUMBER_OF_APPIUM_DRIVERS=5
MAX_NUMBER_OF_WEB_DRIVERS=5
BROWSER_CONFIG_FILE=./src/test/resources/configs/browser_config.json
BROWSER_CONFIG_FILE=./src/test/resources/configs/browser_config.json
BRANCH_NAME=BUILD_SOURCEBRANCH
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
RUNNER=distribute
FRAMEWORK=cucumber
RUNNER_LEVEL=methods
CAPS=./src/test/resources/caps/pcloudy_capabilities.json
CAPS=./caps/calculator_pcloudy_capabilities.json
APP_NAME=teswiz
APP_PACKAGE_NAME=com.android2.calculator3
APPLITOOLS_CONFIGURATION=./src/test/resources/configs/applitools_config.json
BASE_URL_FOR_WEB=BASE_URL
BROWSER=chrome
BUILD_ID=BUILDID
CLEANUP_DEVICE_BEFORE_STARTING_EXECUTION=false
CLOUD_USER=[email protected]
CLOUD_KEY=abc123
CLOUD_USER=pcloudy_username
CLOUD_KEY=pcloudy_accesskey
CLOUD_UPLOAD_APP=false
CLOUD_NAME=pCloudy
DEVICE_LAB_URL=https://device.pcloudy.com
Expand All @@ -22,8 +22,8 @@ PARALLEL=1
PLATFORM=android
PROXY_KEY=HTTP_PROXY
WEBDRIVER_MANAGER_PROXY_KEY=HTTP_PROXY
REMOTE_WEBDRIVER_GRID_PORT=GRID_PORT
REPORT_PORTAL_FILE=src/test/resources/reportportal.properties
REMOTE_WEBDRIVER_GRID_PORT=TESWIZ_GRID_PORT
REPORT_PORTAL_FILE=./src/test/resources/reportportal.properties
RUN_IN_CI=true
TARGET_ENVIRONMENT=prod
TEST_DATA_FILE=./src/test/resources/testData.json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
RUNNER=distribute
FRAMEWORK=cucumber
RUNNER_LEVEL=methods
CAPS=./src/test/resources/caps/theapp_browserstack_capabilities.json
CAPS=./caps/theapp_browserstack_capabilities.json
APP_NAME=teswiz
APP_PACKAGE_NAME=com.appiumpro.the_app
APPLITOOLS_CONFIGURATION=./src/test/resources/configs/applitools_config.json
Expand All @@ -21,7 +21,7 @@ PARALLEL=1
PLATFORM=android
PROXY_KEY=HTTP_PROXY
WEBDRIVER_MANAGER_PROXY_KEY=HTTP_PROXY
REPORT_PORTAL_FILE=src/test/resources/reportportal.properties
REPORT_PORTAL_FILE=./src/test/resources/reportportal.properties
REMOTE_WEBDRIVER_GRID_PORT=GRID_PORT
RUN_IN_CI=true
TARGET_ENVIRONMENT=prod
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
RUNNER=distribute
FRAMEWORK=cucumber
RUNNER_LEVEL=methods
CAPS=./src/test/resources/caps/headspin_capabilities.json
CAPS=./caps/theapp_headspin_capabilities.json
APP_NAME=teswiz
APP_PACKAGE_NAME=com.appiumpro.the_app
APPLITOOLS_CONFIGURATION=./src/test/resources/configs/applitools_config.json
BASE_URL_FOR_WEB=BASE_URL
BROWSER=chrome
BUILD_ID=BUILDID
CLEANUP_DEVICE_BEFORE_STARTING_EXECUTION=false
CLOUD_USER[email protected]
CLOUD_KEY=aab4ce94a604413ca0779eb41dfd5583
CLOUD_UPLOAD_APP=false
CLOUD_USER=headspin_username
CLOUD_KEY=headspin_accesskeyCLOUD_UPLOAD_APP=false
CLOUD_NAME=headspin
DEVICE_LAB_URL=api-dev.headspin.io
ENVIRONMENT_CONFIG_FILE=./src/test/resources/environments.json
Expand All @@ -22,8 +21,8 @@ PARALLEL=1
PLATFORM=android
PROXY_KEY=HTTP_PROXY
WEBDRIVER_MANAGER_PROXY_KEY=HTTP_PROXY
REMOTE_WEBDRIVER_GRID_PORT=GRID_PORT
REPORT_PORTAL_FILE=src/test/resources/reportportal.properties
REMOTE_WEBDRIVER_GRID_PORT=TESWIZ_GRID_PORT
REPORT_PORTAL_FILE=./src/test/resources/reportportal.properties
RUN_IN_CI=true
TARGET_ENVIRONMENT=prod
TEST_DATA_FILE=./src/test/resources/testData.json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
RUNNER=distribute
FRAMEWORK=cucumber
RUNNER_LEVEL=methods
CAPS=./src/test/resources/caps/theapp_capabilities.json
CAPS=./caps/theapp_local_capabilities.json
APP_NAME=teswiz
APP_PACKAGE_NAME=com.appiumpro.the_app
APPLITOOLS_CONFIGURATION=./src/test/resources/configs/applitools_config.json
Expand All @@ -17,8 +17,8 @@ PLATFORM=android
PROXY_KEY=HTTP_PROXY
BUILD_ID=BUILDID
WEBDRIVER_MANAGER_PROXY_KEY=HTTP_PROXY
REPORT_PORTAL_FILE=src/test/resources/reportportal.properties
REMOTE_WEBDRIVER_GRID_PORT=GRID_PORT
REPORT_PORTAL_FILE=./src/test/resources/reportportal.properties
REMOTE_WEBDRIVER_GRID_PORT=TESWIZ_GRID_PORT
RUN_IN_CI=false
TARGET_ENVIRONMENT=prod
TEST_DATA_FILE=./src/test/resources/testData.json
Expand Down
Loading

0 comments on commit 1d78892

Please sign in to comment.