Skip to main content

Building your in house Device Farm on Mac OS using OpenSTF for Android Testing

Building your in house Device Farm on Mac OS using OpenSTF for Android Testing

Key takeaways

  • OpenSTF gives you remote access to real Android devices, which emulators cannot fully replace.
  • The real cost is maintenance: USB stability, OS updates and device drift.
  • Worth it when device-specific bugs matter; otherwise a hosted farm is cheaper.

What is OpenSTF ?

OpenSTF is an open source project that gives us the ability to create our own test farm with real devices.

Using OpenSTF we can create a device farm that gives us the possibility to share devices between team members without actually physically moving the device from the device farm.

Update, November 2026: the original openstf/stf project is no longer developed. Its README says it is provided as is, without active development, and that active development moved to DeviceFarmer; 3.4.1 was the last OpenSTF release on npm. The steps below use the maintained DeviceFarmer fork, which installs as @devicefarmer/stf and keeps the same stf command (github.com/DeviceFarmer/stf, November 2026).

Why is OpenSTF useful ?

The are quite a few advantages for using OpenSTF:

  • it’s open source
  • we do not need to physically move the devices around
  • we can easy install the application on the devices

How do we install OpenSTF on our server ?

  1. First we need to install the dependencies for STF using home brew by running the following from the command line:

    • brew install rethinkdb graphicsmagick zeromq protobuf yasm pkg-config
  2. If we want to run STF from source we need to:

    • Clone the repository from https://github.com/DeviceFarmer/stf by running:
      git clone git@github.com:DeviceFarmer/stf.git
    • build the application by running:
      npm install
    • link the module so that you’ll be able to access the stf command directly from the command line
      npm link
  3. If we just want to install STF without building the latest version we can simply run:
    npm install -g @devicefarmer/stf

  4. To start openstf we first need to start rethinkdb; for that we need to run the following command in the command line:
    rethinkdb

  5. Now we are ready to start STF; for that we run the following command in the command line:
    stf local

  6. Open your favourite browser and browse to:
    http://localhost:7100

  7. Enter a username and password (you can enter any username and password)

  8. You should now be able to see in the OpenSTF UI the devices that you have connected to your machine as in the picture below

    OpenSTF Devices page showing one usable device, an Android SDK emulator built for x86

  9. Double clicking the device will take you to the device and you will be able to interact with the device exactly like you would do on the real device

  10. Note: OpenSTF supported Android only. DeviceFarmer STF adds experimental iOS support on a Linux USB host.

What do we need to buy to create our own device farm ?

  • a Mac Mini box
  • a couple of Android devices (ex. 5 devices)
  • a couple of USB hubs
  • a couple of USB cables

Which are the features that OpenSTF supports ?

  • Android OS support: Android 2.3.3 to 15 (SDK level 35) in DeviceFarmer STF, including Wear 5.1, Fire OS and CyanogenMod (OpenSTF stopped at Android 8.0)
  • Keyboard & Mouse Input with Multi-Touch, even in Safari iOS
  • Copy & Paste to and from the device
  • Take Screenshots and resize them
  • Drag & Drop APK files
  • Install and launch apps in 1 step
  • Open URLs in any installed browser
  • Display Logs with realtime filtering
  • Run Shell Commands without leaving your browser
  • Debug Remotely with Android Studio, Chrome Debug Tools, as if it was plugged into your computer
  • Reverse Port Forwarding
  • Device Rotation
  • Play Store Automation

For a complete description of STF and its features, see the DeviceFarmer project page: https://github.com/DeviceFarmer/stf

LoadFocus is an easy to use cloud testing tool: you don’t need any setup, it runs from the browser. It helps you understand your website’s and web services’ performance and find potential bottlenecks before your customers do. Run a free website speed test today.

Frequently Asked Questions

What is OpenSTF used for?

It is an open source project for running your own farm of real Android devices, with remote access from the browser. The team shares the same physical devices without anyone having to carry a handset to their desk.

Is a device farm better than emulators?

For anything hardware dependent, yes. Emulators cannot reproduce vendor skins, real GPUs, flaky radios or battery behaviour. For plain layout and flow checks, emulators are faster and cheaper.

What does it cost to run in house?

The devices and a machine to host them, plus ongoing maintenance. USB stability, OS updates and device drift are the real expense, and they are why a hosted farm often works out cheaper unless device specific bugs matter to you.

Bogdan

Founder at LoadFocus

Bogdan builds and runs the tools this blog is about. He writes from what the products actually do in production, including the parts that break.

Weekly tips right in your inbox.

Don’t miss out on the latest testing tips and tricks, tools and news related to software testing.

Already +20,000 members in the list.

The Load Testing Platform with AI That Explains Your Results

Load test websites and APIs from 25 cloud regions, monitor page speed and uptime, and get AI analysis that explains your results in plain English.

Cloud load testing, website speed and API monitoring in one place.

Hi there! Can I share a cool thing I'm working on with you?

A software testing newsletter that sparks joy.

Our goal is to create helpful content for software developers and testers.

If you're not into it, you can unsubscribe instantly.