{"id":248,"date":"2018-04-24T15:43:08","date_gmt":"2018-04-24T15:43:08","guid":{"rendered":"http:\/\/loadfocus.com\/blog\/tech\/?p=248"},"modified":"2018-07-30T11:03:19","modified_gmt":"2018-07-30T11:03:19","slug":"building-your-in-house-device-farm-on-mac-os-using-openstf-for-android-testing","status":"publish","type":"post","link":"https:\/\/loadfocus.com\/blog\/tech\/2018\/04\/building-your-in-house-device-farm-on-mac-os-using-openstf-for-android-testing","title":{"rendered":"Building your in house Device Farm on Mac OS using OpenSTF for Android Testing"},"content":{"rendered":"<span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\"><\/span> <span class=\"rt-time\"> 2<\/span> <span class=\"rt-label rt-postfix\">minutes read<\/span><\/span><h2>What is OpenSTF ?<\/h2>\n<p class=\"lead\"><a href=\"https:\/\/openstf.io\/\" rel=\"nofollow\">OpenSTF<\/a> is an open source project that gives us the ability to create our own test farm with real devices.<\/p>\n<p>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.<\/p>\n<h2>Why is OpenSTF useful ?<\/h2>\n<p>The are quite a few advantages for using OpenSTF:<\/p>\n<ul>\n<li>it&#8217;s open source<\/li>\n<li>we do not need to physically move the devices\u00a0around<\/li>\n<li>we can easy install the application on the devices<\/li>\n<\/ul>\n<h2>How do we install OpenSTF on our server ?<\/h2>\n<ol>\n<li>First we need to install the dependencies for STF using home brew by running the following from the command line:\n<ul>\n<li>brew install rethinkdb graphicsmagick zeromq protobuf yasm pkg-config<\/li>\n<\/ul>\n<\/li>\n<li>If we want to run STF from source we need to:\n<ul>\n<li>Clone the repository from https:\/\/github.com\/openstf\/stf by running:<br \/>\n<em>git clone git@github.com:openstf\/stf.git<\/em><\/li>\n<li>build the application by running:<br \/>\n<em>npm install<\/em><\/li>\n<li>link the module so that you&#8217;ll be able to access the stf command directly from the command line<br \/>\n<em>npm link<\/em><\/li>\n<\/ul>\n<\/li>\n<li>If we just want to install STF without building the latest version we can simply run:<br \/>\n<em>npm install -g stf<\/em><\/li>\n<li>To start openstf we first need to start rethinkdb; for that we need to run the following command in the command line:<br \/>\n<em>rethinkdb<\/em><\/li>\n<li>Now we are ready to start STF; for that we run the following command in the command line:<br \/>\n<em>stf local<\/em><\/li>\n<li>Open your favourite browser and browse to:<br \/>\n<em>http:\/\/localhost:7100<\/em><\/li>\n<li>Enter a username and password (you can enter any username and password)<\/li>\n<li>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<br \/>\n<h2><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1349 alignnone\" src=\"https:\/\/loadfocus.com\/blog\/wp-content\/uploads\/Screen-Shot-2018-04-24-at-15.57.34.png\" alt=\"\" width=\"917\" height=\"233\" \/><\/h2>\n<\/li>\n<li>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<\/li>\n<li>Note: it does not support emulators or iOS devices<\/li>\n<\/ol>\n<h2>What do we need to buy to create our own device farm ?<\/h2>\n<ul>\n<li>a Mac Mini box<\/li>\n<li>a couple of Android devices (ex. 5 devices)<\/li>\n<li>a couple of USB hubs<\/li>\n<li>a couple of USB cables<\/li>\n<\/ul>\n<h2>Which are the features that OpenSTF supports ?<\/h2>\n<ul>\n<li>Android OS support: Android 2.3 ~ 8.0 including Wear 5.1, FireOS, CyanogenMod<\/li>\n<li>Keyboard &amp; Mouse Input with Multi-Touch, even in Safari iOS<\/li>\n<li>Copy &amp; Paste to and from the device<\/li>\n<li>Take Screenshots and resize them<\/li>\n<li>Drag &amp; Drop APK files<\/li>\n<li>Install and launch apps in 1 step<\/li>\n<li>Open URLs in any installed browser<\/li>\n<li>Display Logs with realtime filtering<\/li>\n<li>Run Shell Commands without leaving your browser<\/li>\n<li>Debug Remotely with Android Studio, Chrome Debug Tools, as if it was plugged into your computer<\/li>\n<li>Reverse Port Forwarding<\/li>\n<li>Device Rotation<\/li>\n<li>Play Store Automation<\/li>\n<\/ul>\n<p>For a complete description of OpenSTF and the features please visit the project page:\u00a0https:\/\/openstf.io\/<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/loadfocus.com\">LoadFocus<\/a> &#8211; is a easy to use <a href=\"https:\/\/loadfocus.com\/load-testing\">cloud testing tool<\/a>, and you don&#8217;t need any setup, it runs from the browser. It helps you understand better your Website&#8217;s and WebServices&#8217; performance and find potential bottleneck before your customers do. Run a <a href=\"https:\/\/loadfocus.com\/website-speed-testing\">free website speed test<\/a> today.<\/p>\n","protected":false},"excerpt":{"rendered":"<p><span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\"><\/span> <span class=\"rt-time\"> 2<\/span> <span class=\"rt-label rt-postfix\">minutes read<\/span><\/span>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. Why is&#8230;  <a href=\"https:\/\/loadfocus.com\/blog\/tech\/2018\/04\/building-your-in-house-device-farm-on-mac-os-using-openstf-for-android-testing\" class=\"more-link\" title=\"Read Building your in house Device Farm on Mac OS using OpenSTF for Android Testing\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18,44],"tags":[47,46,45],"class_list":["post-248","post","type-post","status-publish","format-standard","hentry","category-native-device-testing","category-ui-testing","tag-open-source","tag-real-devices","tag-test-farm"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/loadfocus.com\/blog\/tech\/wp-json\/wp\/v2\/posts\/248","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/loadfocus.com\/blog\/tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/loadfocus.com\/blog\/tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/loadfocus.com\/blog\/tech\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/loadfocus.com\/blog\/tech\/wp-json\/wp\/v2\/comments?post=248"}],"version-history":[{"count":2,"href":"https:\/\/loadfocus.com\/blog\/tech\/wp-json\/wp\/v2\/posts\/248\/revisions"}],"predecessor-version":[{"id":262,"href":"https:\/\/loadfocus.com\/blog\/tech\/wp-json\/wp\/v2\/posts\/248\/revisions\/262"}],"wp:attachment":[{"href":"https:\/\/loadfocus.com\/blog\/tech\/wp-json\/wp\/v2\/media?parent=248"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/loadfocus.com\/blog\/tech\/wp-json\/wp\/v2\/categories?post=248"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/loadfocus.com\/blog\/tech\/wp-json\/wp\/v2\/tags?post=248"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}