Tests

Buddybuild supports unit tests right out of the box, for iOS (and tvOS and watchOS) and Android. Here’s how to set them up:

  1. Log in to the buddybuild dashboard. The list of builds is displayed:

    The list of builds

  2. The gear button Click the gear button to the right of a build. The Build configuration screen is displayed:

    The build configuration screen

  3. The Test settings button In the left-hand navigation panel, click the Test settings button. The Test configuration screen is displayed:

    The Test configuration screen for Android apps

    The options available are:

    • Lint

      Click the toggle on to run a source code analysis with each build.

    • Run unit tests

      The configure button Click the Configure button to access the unit tests configuration. The Unit tests screen is displayed:

      The Unit tests configuration screen for Android apps

      All of the unit tests defined in your project are listed. You can toggle them all on or off with the Run unit tests toggle, or you can enable or disable individual tests with their respective toggles.

      The X button When you are done, click the X button, at the top right of the screen, to return to the Test configuration screen.

    • Run UI tests on physical devices

      Click the Configure button to access the UI tests on physical devices screen.

      The UI tests on physical devices screen for Android apps

      Buddybuild maintains a pool of mobile Android devices from various manufacturers, with a selection of Android versions. You can select which devices to use when running your UI tests, which gives you greater confidence that your app works correctly than using simulator tests.

      On this screen, you can:

      1. Enable or disable all UI testing on physical devices. To do so, click the UI tests on physical devices toggle.

      2. Select which variant should run the UI tests. The selection field lists all of the variants defined in your project.

      3. The device limit tooltip Select which devices to use for UI testing.

        Buddybuild plans have limits on the number of devices that can be used for each build. If you try to enable more devices than the number supported by your plan, a tooltip appears warning you of the limitation.

      The X button When you are done, click the X button, at the top right of the screen, to return to the Test configuration screen.

    • Run UI tests on virtual devices

      Click the Configure button to access the UI tests on virtual devices screen.

      The UI tests on virtual devices screen for Android apps

      Buddybuild maintains a pool of simulators of Android devices from various manufacturers, with a selection of Android versions. You can select which simulators to use when running your UI tests.

      On this screen, you can:

      1. Enable or disable all UI testing on virtual devices. To do so, click the UI tests on virtual devices toggle.

      2. Select which variant should run the UI tests. The selection field lists all of the variants defined in your project.

      3. The device limit tooltip Select which simulators to use for UI testing.

        Buddybuild plans have limits on the number of simulators that can be used for each build. If you try to enable more simulators than the number supported by your plan, a tooltip appears warning you of the limitation.

      The X button When you are done, click the X button, at the top right of the screen, to return to the Test configuration screen.

    • Treat Android UI tests as warnings

      Normally, when your UI tests fail, your build is also marked as failed. Failed builds cannot be deployed to testers. Use this setting to mark builds as successful and make them deployable, even when your UI tests fail.

      The X button When you are done, click the X button, at the top right of the screen, to return to the Test configuration screen.

Note

When you make changes to the test configuration, you need to kick off a new build before you can see the effect of the changes. Either click Build Now or push a new change to your app’s repository to start a new build.

Once your tests have run, click on a specific build to view the Build details screen. Alongside the Details and Logs tabs, there are one or more tabs for each kind of test run during the build:

The Build details screen with a tests tab selected

results matching ""

    No results matching ""