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

TestRunner property added and Error Handling #44

Open
wants to merge 3 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
50 changes: 43 additions & 7 deletions Java/EspressOrchProject/config.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,44 @@
pCloudyEndpoint = https://device.pcloudy.com
pCloudyUsername = [email protected]
pCloudyApiKey = 3m4t8ys47mmrz8zy7cmqbr3f
#/////////////////////////////////////////////////////////////////////////////////////
#//
#// pCloudy Espresso Configuration
#//
#/////////////////////////////////////////////////////////////////////////////////////
# URL of the cloud you want to run your test on
pCloudyEndpoint = https://android-lab.pcloudy.com

# Your pcloudy User name
pCloudyUsername = [email protected]

# Your API Key. Log in to pcloudy->Settings->Profile and copy your API key.
pCloudyApiKey = r68c2g2cm5mspyzyw7jh645g

# How long do you want to book the devices for Espresso
DurationInMinutes = 10
DeviceIds = 487
ApkFilePath = /home/radmin/Espress_OrchApk/app-debug.apk
TestApkPath = /home/radmin/Espress_OrchApk/app-debug-androidTest.apk
TestCycleName = Testcycletest

# IDs of the devices you want to run Espresso on
# You can get the device list using the API.
# https://content.pcloudy.com/apidocs/index.html#get-device-list
DeviceIds = 42

# Location of the Application you want to test in your local machine
ApkFilePath = /home/pCloudyVector.apk

# Location of the test APK in your local machine
TestApkPath = /home/pCloudyVectorTest.apk

# Location of the Orchestrator APK
OrchstratorApkPath = /home/orchestrator-1.1.0.apk

# Location of the service APK
ServiceApkPath = /home/test-services-1.1.0.apk

# Name of the test Session
TestCycleName = pcloudyUtility

#List of suites that you want to run (In Quotes and Comma Separated)
Suites = com.checkmytrip.integration.data.TestSuiteNre

#example:-
#androidx.test.runner.AndroidJUnitRunner
#android.support.test.runner.AndroidJUnitRunner
TestRunner = android.support.test.runner.AndroidJUnitRunner
50 changes: 43 additions & 7 deletions Java/EspressOrchProject/lib/config.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,44 @@
pCloudyEndpoint = https://device.pcloudy.com
pCloudyUsername = [email protected]
pCloudyApiKey = 3m4t8ys47mmrz8zy7cmqbr3f
#/////////////////////////////////////////////////////////////////////////////////////
#//
#// pCloudy Espresso Configuration
#//
#/////////////////////////////////////////////////////////////////////////////////////
# URL of the cloud you want to run your test on
pCloudyEndpoint = https://android-lab.pcloudy.com

# Your pcloudy User name
pCloudyUsername = [email protected]

# Your API Key. Log in to pcloudy->Settings->Profile and copy your API key.
pCloudyApiKey = r68c2g2cm5mspyzyw7jh645g

# How long do you want to book the devices for Espresso
DurationInMinutes = 10
DeviceIds = 487
ApkFilePath = /home/radmin/Espress_OrchApk/app-debug.apk
TestApkPath = /home/radmin/Espress_OrchApk/app-debug-androidTest.apk
TestCycleName = Testcycletest

# IDs of the devices you want to run Espresso on
# You can get the device list using the API.
# https://content.pcloudy.com/apidocs/index.html#get-device-list
DeviceIds = 42

# Location of the Application you want to test in your local machine
ApkFilePath = /home/pCloudyVector.apk

# Location of the test APK in your local machine
TestApkPath = /home/pCloudyVectorTest.apk

# Location of the Orchestrator APK
OrchstratorApkPath = /home/orchestrator-1.1.0.apk

# Location of the service APK
ServiceApkPath = /home/test-services-1.1.0.apk

# Name of the test Session
TestCycleName = pcloudyUtility

#List of suites that you want to run (In Quotes and Comma Separated)
Suites = com.checkmytrip.integration.data.TestSuiteNre

#example:-
#androidx.test.runner.AndroidJUnitRunner
#android.support.test.runner.AndroidJUnitRunner
TestRunner = android.support.test.runner.AndroidJUnitRunner
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
package com.pcloudy.espressorch;

import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.Properties;

public class ConfigFileLoad {

Properties prop = new Properties();

static ConfigFileLoad instance = new ConfigFileLoad();

public static ConfigFileLoad getInstance() {
return instance;
}

private ConfigFileLoad() {
InputStream input = null;
File file = new File("config.properties");
try {
input = new FileInputStream(file.getAbsolutePath());
prop.load(input);
input.close();
} catch (Exception ex) {

}
}

public String get_pCloudyEndpoint() {
return prop.getProperty("pCloudyEndpoint");
}

public String get_pCloudyUserName() {
return prop.getProperty("pCloudyUsername");
}

public String get_pCloudyApiKey() {
return prop.getProperty("pCloudyApiKey");
}

public int get_Duration(){
return Integer.parseInt(prop.getProperty("DurationInMinutes"));
}

public String get_DeviceIds() {
return prop.getProperty("DeviceIds");

}

public String get_ApplicationPath() {
return prop.getProperty("ApkFilePath");

}

public String get_TestApkPath() {
return prop.getProperty("TestApkPath");
}

public String get_OrchApkPath(){
return prop.getProperty("OrchstratorApkPath");
}

public String get_ServiceApkPath(){
return prop.getProperty("ServiceApkPath");
}

public String get_TestSuites(){
return prop.getProperty("Suites");
}

public String get_TestRunner(){
return prop.getProperty("TestRunner");
}

public String get_cycleName(){
return prop.getProperty("TestCycleName");
}

}
Loading