Skip to main content

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.

Pre-Requisite

Before using BitBar and/or AltTester, ensure you have:

  1. A Big Fish email address and access to BitBar in Okta. If you are unable to access BitBar ↗️, contact your Big Fish producer.
  2. An instrumented build, either an .apk file (Android) or an .ipa file (iOS) with the AltTester Unity SDK.
  3. 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.
  4. Access to the #bfg-test-automation channel in the Slack workspace for Big Fish Games.
  5. 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:

  1. 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.
  2. 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.

  3. Login to BitBar.

  4. From the Projects tab in the main navigation menu, click Create New Project.

  5. From the new Create New Project window, select the appropriate project file to create the new project.

  6. In the newly created project, click Create your first test run and provide a name for the test.

  7. In the Select a target OS type section, select the target OS (iOS or Android).

  8. In the Select a framework section, select one of the available frameworks.

  9. 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.

  10. 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.

  11. 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.

  12. 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

info

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:

  1. Login to BitBar.
  2. From the main navigation menu, click Devices.
  3. Click Create new group to create a new device group.
  4. 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 is 2.2.1
  • altTesterUnityBuildFileAmazon: File path to instrument Amazon App
  • altTesterBuildMethodAmazon: Build method to instrument for Amazon
  • altTesterUnityBuildFileApple: File path to instrument iOS App, such as Assets/Editor/Build/ProjectBuilderIos.cs
  • altTesterBuildMethodApple: Build method to instrument for Apple
  • altTesterUnityBuildFileGoogle: File path to instrument Android App, such as Assets/Editor/Build/ProjectBuilderAndroid.cs
  • altTesterBuildMethodGoogle: Build method to instrument for Google
  • altTesterHostName: The game's host name for instrumentation, for example client-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:

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
info

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: