Register
Submit a solution
The challenge is finished.

Challenge Overview

  • Target environment: iOS Devices

  • Basic Requirements: Setup the OpenSTF iOS testing automatically

Project Background

 

STF (or Smartphone Test Farm) is a web application for debugging smartphones, smartwatches, and other gadgets remotely, from the comfort of your browser.

 

OpenSTF is a popular open-sourced STF application, its source code is hosted on https://github.com/openstf/stf

 

Currently, OpenSTF only supports Android device testing, our client wants to extend it to support iOS Device.

Technology Stack

  • iOS

  • Swift

  • Objective-C

  • NodeJS

  • AngularJS

 

Individual requirements

 

In the previous challenge, we have integrated iOS remote control into OpenSTF and applied some further enhancements.

 

In this challenge, we need to change the cumbersome manual configurations steps to be automatic, to make the usage of OpenSTF easier in production.

 

I have set up a GitLab repo to aggregate all external open source projects (via submodules) and our own developed video stream uploader into a single project. So we can work here.

 

The code base is https://gitlab.com/ios-smartphone-test-farm/openstf-ios-extended

 

Where:

 

You can grant yourself access via Topcoder-X, the Topcoder-X link will be provided in the forum.

 

Concretely, the requirements are

1. Run WebDriverAgent without Xcode

Currently, we have to build and run WebDriverAgent under Xcode environment, that’s not acceptable in production.

 

We should investigate a way to run WebDriverAgent without Xcode.

 

Tips: maybe you can take Appium as a reference, WebDriverAgent is one of its dependencies but you don’t need Xcode to run Appium.

2. Remove the IP configuration at compile time

 

Currently, we have to configure the IP in SteamUploader, that’s also not acceptable in production. Because once we switch to another network environment, we have to configure the IP again.

 

We should remove the IP configuration at compile time. Instead, we have two options

  • Discover the IP of the Mac device automatically (ideal)

  • Configure the IP at runtime (need a UI to configure it).

 

You can choose any one of the options, but if the other submitter provided the ideal solution (discover the IP of the Mac device), but you only provided the second solution, you will be expected to lose a point in the minor requirement section (Q 1.1.2)

 

You can assume the iOS device and the Mac are under the same Wifi.

3. Write a shell script to set up the services on Mac at one shot.

 

Currently, we have to set up the following services on Mac manually and respectively. That’s very cumbersome

 
  • RTMP Server (Node-Media-Server)

  • STF

    • RethinkDB

    • STF local

 

We should use a shell script to set up these services automatically, including installing all dependencies.

 

Then we should config to make the service automatically start upon Mac boot.

 

4. The workflow of the iOS device testing

 

Finally, in production, the workflow of testing an iOS device should be

 

On the Mac side

  1. Starting all services (RTMP Server and STF) on Mac

  2. Open STF website http://localhost:7100

 

On the iOS device side

  1. Install StreamUploader to the iOS device

  2. Install WebDriverAgent to the iOS device

  1. Configure IP of the Mac in StreamUploader (this step is not required if we can configure the IP dynamically)

  2. Launch WebDriverAgent

  3. Start broadcasting with StreamUploader on the iOS device

 

Then as long as you use a cable to connect the iOS device to the Mac, then the STF should detect the iOS device automatically and then you can start to control and test it via STF.

 

Note this workflow is the main functionality of this challenge.

Notes

  • All existing functionality should not be broken.

  • Please ensure to update the existing Documentations.

  • If you have any doubts, please feel free to ask questions in the forum. Any assumption without clarification is not acceptable.



Final Submission Guidelines

Please zip all the following content in a zip archive.

1. The git patch against https://gitlab.com/ios-smartphone-test-farm/openstf-ios-extended.git master branch, the latest commit. For the submodules, you can provide separate patches.

2. A demo video to demonstrate the remote control worked on your side.

3. A README about how to apply your patches.

 

ELIGIBLE EVENTS:

Topcoder Open 2019

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30087809