BitBar and AltTester Test Automation
BitBar is a cloud-based platform for testing mobile and web applications. BitBar supports:
- Live and automated testing on physical iOS and Android devices, as well as desktop browsers
- Client-side and server-side test execution
BitBar's server-side testing is required to use AltTester. AltTester is an open-source UI driven test automation tool that locates and interacts with Unity objects with tests written in C#, Python, or Java.
Before using BitBar and/or AltTester, ensure you have:
- A Big Fish email address and access to BitBar in Okta. If you are unable to access BitBar ↗️, contact your Big Fish producer.
- An instrumented build, either an
.apk
file (Android) or an.ipa
file (iOS) with the AltTester Unity SDK. - A
.zip
file containing your tests and the script that defines how those tests will be run. For more information, see Running Server Side Appium Tests ↗️ in BitBar's documentation. - Access to the #bfg-test-automation channel in the Slack workspace for Big Fish Games.
- A new repository for test cases. This test repository will contain your test cases along with the
.apk
or.ipa
file.
Manual Testing with BitBar
To begin manual testing with BitBar:
-
Add the following files to the game's test repository:
create-bitbar-package.sh
which creates the.zip
containing all the required test and necessary files.run-tests.sh
which contains the steps to run the test.
-
Run the
create-bitbar-package.sh <ios|android>
script, where<ios|android>
is replaced with your desired OS as a parameter. This will create a.zip
file containing all the files required to execute the tests. -
Login to BitBar.
-
From the Projects tab in the main navigation menu, click Create New Project.
-
From the new Create New Project window, select the appropriate project file to create the new project.
-
In the newly created project, click Create your first test run and provide a name for the test.
-
In the Select a target OS type section, select the target OS (iOS or Android).
-
In the Select a framework section, select one of the available frameworks.
-
In the Choose Files section, upload the application file (
.apk
or.ipa
) and the.zip
file. Ensure both files are selected, then click the Use Selected button. -
Choose an action to perform for each of the uploaded files. For the
.zip
file, choose Use to run the test and BitBar will unpack the.zip
file onto the test device. For the application file (.apk
or.ipa
), choose Install on the device so that BitBar will upload the selected package to the device and install it there. -
In the Choose Devices section, select the device group and/or devices to run your tests. For more information, see Creating Device Groups ↗️ in BitBar's documentation.
-
Click Create and run automated test to start the testing process.
Once the tests are executed, click Go to results to view the detailed test results in BitBar.
To monitor your test progress and see the overall status of your completed tests, go back to the Projects tab in BitBar. Selecting an individual device will show you specific results for that device and provide a video recording of your test run.
Using Specific Devices in BitBar
If you require any specific devices that are not in the existing list, reach out to the build automation team through the #bfg-test-automation Slack channel. Once the new device has been added, select it from the predefined device list.
To use a BFG device for test automation in BitBar:
- Login to BitBar.
- From the main navigation menu, click Devices.
- Click Create new group to create a new device group.
- Select BFG-Android-Device or BFG-IOS-Devices to set the predefined device.
Onboarding Test Automation
Big Fish Games has two methods to integrate your game into our Universal Jenkins Pipeline (UJP) for test automation. Select from one of the following:
- The Big Fish Games build automation team will set up and handle the build instrumentation for your game and enable test automation; or
- You can instrument the build locally. With this option, your studio assumes full responsibility for build instrumentation. Following the setup, contact the Big Fish Games build automation team to complete the test automation implementation.
Build Automation Instrumentation
If you choose to let the Big Fish build automation team onboard your test automation, provide the following information:
altTesterVersion
: Version of the AltTester; the default version is2.2.1
altTesterUnityBuildFileAmazon
: File path to instrument Amazon AppaltTesterBuildMethodAmazon
: Build method to instrument for AmazonaltTesterUnityBuildFileApple
: File path to instrument iOS App, such asAssets/Editor/Build/ProjectBuilderIos.cs
altTesterBuildMethodApple
: Build method to instrument for ApplealtTesterUnityBuildFileGoogle
: File path to instrument Android App, such asAssets/Editor/Build/ProjectBuilderAndroid.cs
altTesterBuildMethodGoogle
: Build method to instrument for GooglealtTesterHostName
: The game's host name for instrumentation, for exampleclient-eng-dev.bigfishgames.com
Game Team Instrumentation
If you choose to instrument the build locally, provide the build automation team with the Test Case Repository URL. You are responsible for all other setup for the build instrumentation.
Test Execution and Reporting
To execute tests, see:
- Running Server-Side Appium Tests ↗️
- Running Tests Using Device Cloud Services ↗️
- Using AltTester 2.0 and Above ↗️
BitBar sends e-mail notifications containing the test results to the game team at the end of each test run. Additionally, BitBar's dashboard provides detailed reporting and information on each test run which includes:
- CPU and memory usage
- Logging
- Screenshots and videos of any test failures
If you wish be included in the e-mailed notification of test results, contact your Big Fish producer to have your e-mail added to BitBar's list of recipients.
Additional Information and Resources
For examples of how to use BitBar and/or AltTester, reach out to the build automation team to access the following internal repositories: