Skip to content

Commit

Permalink
testdroid -> bitbar update
Browse files Browse the repository at this point in the history
  • Loading branch information
aknackiron committed Dec 20, 2017
1 parent 438806d commit 44a9c44
Show file tree
Hide file tree
Showing 16 changed files with 69 additions and 66 deletions.
9 changes: 4 additions & 5 deletions appium/sample-scripts/csharp/README.md
@@ -1,4 +1,4 @@
# Appium Testdroid Sample
# Bitbar Appium Sample


The capabilities has been set to run tests for Bitbar Sample Android
Expand All @@ -9,14 +9,14 @@ credentials. Set the SCREENSHOT_FOLDER to an existing directory on
your system.

**Note:** Instead of using *testdroid_username* and
*testdroid_password* desired capabilities to identify to Testdroid
*testdroid_password* desired capabilities to identify to Bitbar
Cloud you should rather use *testdroid_apiKey*. Your personal apiKey is
found in cloud.testdroid.com under 'My account'.
found in cloud.bitbar.com under 'My account'.


#### Windows

Launch the AppiumTest.sln on Visual Studio and make sure that NUnit Test Adapter is installed through the Extension Manager. Use Test Explorer to run the test.
Launch the AppiumTest.sln on Visual Studio and make sure that NUnit Test Adapter is installed through the Extension Manager. Use Test Explorer to run the test.

#### UNIX

Expand All @@ -30,4 +30,3 @@ Launch the AppiumTest.sln on Visual Studio and make sure that NUnit Test Adapter

### Run tests
`nunit-console Test123/bin/Debug/TestdroidAndroidSample.dll`

6 changes: 3 additions & 3 deletions appium/sample-scripts/csharp/Test123/Tests.cs
Expand Up @@ -39,12 +39,12 @@ public void BeforeAll()
capabilities.SetCapability("testdroid_project", "C# Appium");
capabilities.SetCapability("testdroid_testrun", "Android Run 1");

// See available devices at: https://cloud.testdroid.com/#public/devices
// See available devices at: https://cloud.bitbar.com/#public/devices
capabilities.SetCapability("testdroid_device", "Dell Venue 7 3730"); // Freemium device
capabilities.SetCapability("testdroid_app", "sample/BitbarSampleApp.apk"); //to use existing app using "latest" as fileUUID

Console.WriteLine ("WebDriver request initiated. Waiting for response, this typically takes 2-3 mins");
driver = new AndroidDriver<AndroidElement>(new Uri("http://appium.testdroid.com/wd/hub"), capabilities, TimeSpan.FromSeconds(300));
driver = new AndroidDriver<AndroidElement>(new Uri("http://appium.bitbar.com/wd/hub"), capabilities, TimeSpan.FromSeconds(300));
Console.WriteLine ("WebDriver response received.");


Expand All @@ -53,7 +53,7 @@ public void BeforeAll()
[TestFixtureTearDown]
public void AfterAll()
{
driver.Quit();
driver.Quit();
}


Expand Down
4 changes: 2 additions & 2 deletions appium/sample-scripts/java/README.md
@@ -1,7 +1,7 @@
Testdroid Appium Sample in Java
===========================

This folder includes sample Appium tests using Java for Android and iOS, which can be run in [Bitbar Cloud](https://cloud.testdroid.com/).
This folder includes sample Appium tests using Java for Android and iOS, which can be run in [Bitbar Cloud](https://cloud.bitbar.com/).

This example can be run either using client side execution or server side execution. To find more information about these possibilities, visit <http://docs.bitbar.com/testing/appium/>

Expand Down Expand Up @@ -39,7 +39,7 @@ mvn clean test \

in which

- \<your\_testdroid\_apiKey\> is your testdroid apiKey. The apiKey is available under 'My account' in [Testdroid Cloud](https://cloud.testdroid.com/).
- \<your\_testdroid\_apiKey\> is your apiKey to Bitbar cloud. The apiKey is available under 'My account' in [Bitbar cloud](https://cloud.bitbar.com/).
- \</path/to/BitbarSampleApp.apk\> is the path to the downloaded sample application


Expand Down
34 changes: 17 additions & 17 deletions appium/sample-scripts/python/README.md
Expand Up @@ -2,13 +2,13 @@

# Appium Python Samples

Testdroid can be used to run Appium tests against real devices to test
Bitbar can be used to run Appium tests against real devices to test
native Android or iOS applications, hybrid (Android & iOS) or for web
testing (Safari on iOS and Chrome on Android).

You'll find here all steps you need to start running your mobile tests
against real devices in Testdroid Cloud. Before continuing with running with
these scripts you should register with [Testdroid service](https://cloud.testdroid.com/).
against real devices in Bitbar cloud. Before continuing with running with
these scripts you should register with [Bitbar service](https://cloud.bitbar.com/).

For more detailed guides on Appium please refer to their
[documentation
Expand All @@ -18,7 +18,7 @@ online](http://appium.io/slate/en/master/?python#about-appium).

Uploading an app is easiest using the `upload.py` script and using
apiKey identification. The apiKey is found under "My Account" in
Testdroid Cloud. For the upload to be successful the full path to the
Bitbar cloud. For the upload to be successful the full path to the
app (apk or ipa) needs to be provided.

If no app is provided on command line, then the Bitbar Sample Android app is uploaded.
Expand All @@ -27,7 +27,7 @@ If no app is provided on command line, then the Bitbar Sample Android app is upl
$ python upload.py -h
usage: upload.py [-h] [-k APIKEY] [-a APP_PATH] [-u URL]

Upload a mobile app to Testdroid Cloud and get a handle to it
Upload a mobile app to Bitbar cloud and get a handle to it

optional arguments:
-h, --help show this help message and exit
Expand All @@ -38,16 +38,16 @@ optional arguments:
Path to app to upload or set environment variable
TESTDROID_APP_PATH. Current value is:
'../../../apps/builds/Testdroid.apk'
-u URL, --url URL Testdroid Cloud url to upload app or set environment
-u URL, --url URL Bitbar cloud url to upload app or set environment
variable TESTDROID_UPLOAD_URL. Current value is:
'http://appium.testdroid.com/upload'
'http://appium.bitbar.com/upload'
```
The below example shows how to upload a hybrid Android demo app to Testdroid Cloud.
The below example shows how to upload a hybrid Android demo app to Bitbar Cloud.
```bash
$ python upload.py -k xg8x...YXto -u ../../../apps/builds/Testdroid.apk
Filename to use in testdroid capabilities in your test: 719f52c4-43c2-4c25-b91b-08884f049d3a/Testdroid.apk
Filename to use in Bitbar capabilities in your test: 719f52c4-43c2-4c25-b91b-08884f049d3a/Testdroid.apk
```
The response message provides the application's cloud file name that
Expand All @@ -69,17 +69,16 @@ Common values used in tests:
* *screenshot_dir* - where should screenshots be stored on your local drive

* *testdroid_username* - your email that you registered with to
Testdroid Cloud. **Rather use testdroid_apiKey.**
Bitbar cloud. **Rather use testdroid_apiKey.**

* *testdroid_password* - your Testdroid Cloud password. **Rather use
* *testdroid_password* - your Bitbar cloud password. **Rather use
testdroid_apiKey.**

* *testdroid_apiKey* - a personal unique key allowing you to connect
to Testdroid Cloud without using username and passwords in
tests. Api key is found under "My account" in [Testdroid
Cloud](https://cloud.testdroid.com/) UI.
to Bitbar cloud without using username and passwords in
tests. Api key is found under "My account" in [Bitbar cloud](https://cloud.bitbar.com/) UI.

* *testdroid_project* - the project name in Testdroid Cloud. Each
* *testdroid_project* - the project name in Bitbar cloud. Each
project's name is unique. A project's name can be modified later on if needed.

* *testdroid_testrun* - name of this test run inside of
Expand Down Expand Up @@ -143,7 +142,8 @@ This parameter is not needed if running against the sample BitbarIOSSample.ipa a

Example script: `testdroid_android.py`

To run an Appium test against a native Android application Appium needs to the following additional information:
To run an Appium test against a native Android application Appium needs to the
following additional information:

* **app_package** - Java package of the Android app you want to run

Expand All @@ -170,7 +170,7 @@ Additional parameters needed to run a hybrid app:
The above parameters are already set into the test scripts, so they are not mandatory for the sample tests. For other apps they are.

```bash
python run-test.py -k xYY5...PeOA6 -s /tmp/screens/ -t testdroid_android_hybrid -p "Android Hybrid" -r `date +%R` --app b9608704-b55d-4b71-83d4-d8027c67b49a/Testdroid.apk
python run-test.py -k xYY5...PeOA6 -s /tmp/screens/ -t testdroid_android_hybrid -p "Android Hybrid" -r `date +%R` --app b9608704-b55d-4b71-83d4-d8027c67b49a/Testdroid.apk
```

## Safari Browser Testing
Expand Down
2 changes: 1 addition & 1 deletion appium/sample-scripts/python/device_finder.py
Expand Up @@ -9,7 +9,7 @@
class DeviceFinder:
""" Constructor
"""
def __init__(self, url="https://cloud.testdroid.com",
def __init__(self, url="https://cloud.bitbar.com",
download_buffer_size=65536):
self.cloud_url = os.environ.get('TESTDROID_URL') or url
self.download_buffer_size = download_buffer_size
Expand Down
4 changes: 2 additions & 2 deletions appium/sample-scripts/python/testdroid_android.py
Expand Up @@ -23,9 +23,9 @@ def setUp(self):
# If env var is not set the string after or is used.
#
testdroid_url = os.environ.get('TESTDROID_URL') or \
"https://cloud.testdroid.com"
"https://cloud.bitbar.com"
appium_url = os.environ.get('TESTDROID_APPIUM_URL') or \
'http://appium.testdroid.com/wd/hub'
'http://appium.bitbar.com/wd/hub'
testdroid_apiKey = os.environ.get('TESTDROID_APIKEY') or ""
testdroid_project_name = os.environ.get('TESTDROID_PROJECT') or \
"Android sample project"
Expand Down
4 changes: 2 additions & 2 deletions appium/sample-scripts/python/testdroid_android_hybrid.py
Expand Up @@ -23,9 +23,9 @@ def setUp(self):
#

testdroid_url = os.environ.get('TESTDROID_URL') or \
"https://cloud.testdroid.com"
"https://cloud.bitbar.com"
appium_url = os.environ.get('TESTDROID_APPIUM_URL') or \
'http://appium.testdroid.com/wd/hub'
'http://appium.bitbar.com/wd/hub'
testdroid_apiKey = os.environ.get('TESTDROID_APIKEY') or ""
testdroid_project = os.environ.get('TESTDROID_PROJECT') or \
'Android hybrid sample project'
Expand Down
4 changes: 2 additions & 2 deletions appium/sample-scripts/python/testdroid_chrome.py
Expand Up @@ -17,8 +17,8 @@ def setUp(self):
## You can set the parameters outside the script with environment variables.
## If env var is not set the string after 'or' is used.
##
testdroid_url = os.environ.get('TESTDROID_URL') or "https://cloud.testdroid.com"
appium_url = os.environ.get('TESTDROID_APPIUM_URL') or 'http://appium.testdroid.com/wd/hub'
testdroid_url = os.environ.get('TESTDROID_URL') or "https://cloud.bitbar.com"
appium_url = os.environ.get('TESTDROID_APPIUM_URL') or 'http://appium.bitbar.com/wd/hub'
testdroid_apiKey = os.environ.get('TESTDROID_APIKEY') or ""
testdroid_project_name = os.environ.get('TESTDROID_PROJECT') or 'Appium Chrome Demo'
testdroid_testrun_name = os.environ.get('TESTDROID_TESTRUN') or "My testrun"
Expand Down
4 changes: 2 additions & 2 deletions appium/sample-scripts/python/testdroid_ios.py
Expand Up @@ -34,8 +34,8 @@ def setUp(self):
##
## IMPORTANT: Set the following parameters.
##
testdroid_url = os.environ.get('TESTDROID_URL') or "https://cloud.testdroid.com"
appium_url = os.environ.get('TESTDROID_APPIUM_URL') or 'http://appium.testdroid.com/wd/hub'
testdroid_url = os.environ.get('TESTDROID_URL') or "https://cloud.bitbar.com"
appium_url = os.environ.get('TESTDROID_APPIUM_URL') or 'http://appium.bitbar.com/wd/hub'
testdroid_apiKey = os.environ.get('TESTDROID_APIKEY') or ""
testdroid_project_name = os.environ.get('TESTDROID_PROJECT') or "iOS sample project"
testdroid_testrun_name = os.environ.get('TESTDROID_TESTRUN') or "My testrun"
Expand Down
4 changes: 2 additions & 2 deletions appium/sample-scripts/python/testdroid_safari.py
Expand Up @@ -15,8 +15,8 @@ def setUp(self):
##
## IMPORTANT: Set the following parameters.
##
testdroid_url = os.environ.get('TESTDROID_URL') or "https://cloud.testdroid.com"
appium_url = os.environ.get('TESTDROID_APPIUM_URL') or 'http://appium.testdroid.com/wd/hub'
testdroid_url = os.environ.get('TESTDROID_URL') or "https://cloud.bitbar.com"
appium_url = os.environ.get('TESTDROID_APPIUM_URL') or 'http://appium.bitbar.com/wd/hub'
testdroid_apiKey = os.environ.get('TESTDROID_APIKEY') or ""
testdroid_project_name = os.environ.get('TESTDROID_PROJECT') or "Safari sample project"
testdroid_testrun_name = os.environ.get('TESTDROID_TESTRUN') or "My testrun"
Expand Down
2 changes: 1 addition & 1 deletion appium/sample-scripts/python/upload.py
Expand Up @@ -14,7 +14,7 @@ def __init__(self):
self.myfile = os.environ.get('TESTDROID_APP_PATH') or \
'../../../apps/builds/BitbarSampleApp.apk'
self.upload_url = os.environ.get('TESTDROID_UPLOAD_URL') or \
'http://appium.testdroid.com/upload'
'http://appium.bitbar.com/upload'
# Provide mandatory API key with this env var or with -k/--apikey flag
self.api_key = os.environ.get("TESTDROID_APIKEY") or ""

Expand Down
22 changes: 11 additions & 11 deletions appium/sample-scripts/ruby/README.md
@@ -1,13 +1,13 @@
# Appium Ruby Samples

Testdroid can be used to run Appium tests against real devices to test
Bitbar can be used to run Appium tests against real devices to test
native Android or iOS applications, hybrid (Android & iOS) or for web
testing (Safari on iOS and Chrome on Android).

You'll find here all steps you need to start running your mobile tests
against real devices in Testdroid Cloud. Before continuing with
running with these scripts you should register with [Testdroid
service](https://cloud.testdroid.com/).
against real devices in Bitbar cloud. Before continuing with
running with these scripts you should register with [Bitbar
service](https://cloud.bitbar.com/).

For more detailed guides on Appium please refer to the [documentation
online](http://appium.io/slate/en/master/?python#about-appium).
Expand Down Expand Up @@ -39,19 +39,19 @@ Here are all the values that you need to edit:
* *screen_shot_dir* - where should screenshots be stored on your local drive

* *testdroid_username* - your email that you registered with to
Testdroid Cloud. **Rather use testdroid_apiKey.**
Bitbar cloud. **Rather use testdroid_apiKey.**

* *testdroid_password* - your Testdroid Cloud password. **Rather use
* *testdroid_password* - your Bitbar cloud password. **Rather use
testdroid_apiKey.**

* *testdroid_apiKey* - a personal unique key that allows you to
connect to Testdroid Cloud without the need to use your username
connect to Bitbar cloud without the need to use your username
and passwords in your tests. You can find your api key under "My
account" in [Testdroid Cloud](https://cloud.testdroid.com/) UI.
account" in [Bitbar cloud](https://cloud.bitbar.com/) UI.

* *testdroid_project* - has a default value, but you might want to add
your own name to this. Project name is visible in your project view
in Testdroid Cloud. Each project must have a unique name
in Bitbar cloud. Each project must have a unique name

* *testdroid_testrun* - name or number of this test run. Test run
names can be modified even at every test run
Expand All @@ -60,7 +60,7 @@ Here are all the values that you need to edit:
cloud. Eg. if you uploaded your app using a script this would look
something like this:
'f4660af0-10f3-46e9-932b-0622f497b0d2/Testdroid.apk' If you uploaded
your app through the Testdroid Cloud web UI, you can use here the
your app through the Bitbar cloud web UI, you can use here the
value 'latest' that refers to the latest uploaded app file.

## Native iOS Specific Settings
Expand Down Expand Up @@ -102,7 +102,7 @@ look at Appium
your *testdroid_app* desired capability value to 'latest'


* To find available free devices in Testdroid cloud, you can use this Ruby [tool](https://github.com/bootstraponline/testdroid_device_finder)
* To find available free devices in Bitbar cloud, you can use this Ruby [tool](https://github.com/bootstraponline/testdroid_device_finder)

## License

Expand Down
8 changes: 4 additions & 4 deletions image-recognition/README.md
Expand Up @@ -38,7 +38,7 @@ All image recognition related methods are implemented in the TestdroidImageRecog

The A-KAZE C++ implementation can optionally be found and built from: [Bitbar Akaze fork](https://github.com/bitbar/akaze). This project already contains the *./lib/\<platform\>/akaze/* folder with pre-built binaries for Linux, OS X and Windows. Only the akaze_match binary is currently in use.


All other dependencies are fetched by Maven automatically.


Expand All @@ -59,7 +59,7 @@ For example, to run only the test `mainPageTest` from test class AndroidSample.j
To first clean all the previous test result files, add keyword `clean` to the command:

mvn -Dtest=AndroidSample#mainPageTest clean test

You can also use an IDE to launch the tests. Make sure the project is correctly imported as a Maven project and that the `pom.xml` file has been discovered for Maven's dependency management.

**Reports**
Expand All @@ -78,12 +78,12 @@ or

./createiOSZip.sh

Now that you have your test zip and the application file (this sample uses the Bitbar Sample Apps available at [apps/builds](https://github.com/bitbar/testdroid-samples/tree/master/apps/builds), you're ready to create a testrun in your project at the [test cloud](https://cloud.testdroid.com). Upload the app and test zip in the appropriate pages, choose the device group and finally make sure you have set high enough timeout for your tests in the Advanced options (default is 10 minutes).
Now that you have your test zip and the application file (this sample uses the Bitbar Sample Apps available at [apps/builds](https://github.com/bitbar/testdroid-samples/tree/master/apps/builds), you're ready to create a testrun in your project at the [test cloud](https://cloud.bitbar.com). Upload the app and test zip in the appropriate pages, choose the device group and finally make sure you have set high enough timeout for your tests in the Advanced options (default is 10 minutes).

If you change the name of your Android or iOS test class, you will need to update it to the run-tests_android.sh and run-tests_ios.sh TEST and TEST_CASE variables as appropriate:

# Name of the desired test class and optionally specific test case, eg: AndroidSample#mainPageTest
TEST=${TEST:="AndroidSample"}
# OPTIONAL: add the name of TestCases to be used with the `mvn test` command
# Leave blank to test the whole class!
TEST_CASE="#mainPageTest"
TEST_CASE="#mainPageTest"
10 changes: 5 additions & 5 deletions image-recognition/launch-tests.sh
@@ -1,7 +1,7 @@
#!/bin/bash

#
# Script for uploading the test project to Testdroid Cloud as a Server side Appium test
# Script for uploading the test project to Bitbar cloud as a Server side Appium test
#
# Requires the user's API key, device group name and test type (android or ios).
# Creates the test zip, uploads it to the set project and launches the test.
Expand All @@ -11,7 +11,7 @@

function help() {
echo
echo "$0 - create and upload test project to Testdroid Cloud and run it"
echo "$0 - create and upload test project to Bitbar cloud and run it"
echo
echo "Usage: $0 -a/i -g <DEVICE_GROUP_NAME> -k <API_KEY>"
echo " -a for Android test"
Expand Down Expand Up @@ -53,7 +53,7 @@ done

# Set the Public Cloud as API_ENDPOINT, if not set to something else already
if [ -z ${API_ENDPOINT} ]; then
API_ENDPOINT=https://cloud.testdroid.com
API_ENDPOINT=https://cloud.bitbar.com
fi

# Check that either -a or -i flag was given
Expand Down Expand Up @@ -170,7 +170,7 @@ else
exit
fi

# Upload zip to Testdroid Cloud.
# Upload zip to Bitbar cloud.
echo "Uploading ${OUT_ZIP} to Project with ID ${PROJECT_ID}"
curl -H "Accept: application/json" -u ${API_KEY}: -X POST -F "file=@${OUT_ZIP}" "${API_ENDPOINT}/api/v2/me/projects/${PROJECT_ID}/files/test"
echo
Expand All @@ -192,7 +192,7 @@ else
fi

echo
echo "Launching test in Testdroid!"
echo "Launching test in Bitbar!"
TESTRUN_ID="$(curl -s -H "Accept: application/json" -u ${API_KEY}: -X POST "${API_ENDPOINT}/api/v2/me/projects/${PROJECT_ID}/runs?usedDeviceGroupId=${DEVICE_GROUP_ID}" | python -m json.tool | sed -n -e '/"id":/ s/^.* \(.*\),.*/\1/p')"

if [ -z ${TESTRUN_ID} ] ; then
Expand Down
4 changes: 4 additions & 0 deletions testdroid-cloud/examples/ruby/README.md
@@ -0,0 +1,4 @@
# Ruby Test Run Launcher

This is a sample Ruby test run launcher in Ruby. You can use this to launch
tests in Bitbar cloud or creating new projects.

0 comments on commit 44a9c44

Please sign in to comment.