Challenge Overview
Challenge Objectives
- Target environment: iOS Devices
- Basic Requirements: Add some additional features to iOS control in STF for enhancements
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.
In this challenge, we need to do some further enhancements to make the usage of OpenSTF easier and the remote control more smoothly.
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:
- Node-Media-Server: Submodule, linked to my fork repo https://github.com/billsedison/Node-Media-Server.git, switch to stf-video-support branch
- WebDriverAgent: Submodule, linked to my fork repo https://github.com/billsedison/WebDriverAgent.git, switch to video-stream-control branch
- stf: Submodule, linked to my fork repo https://github.com/billsedison/stf.git, switch to ios-support branch
- StreamUploader: A Broadcast Upload Extension with flv ouput and broadcast support
You can grant yourself access via Topcoder-X, the Topcoder-X link will be provided in the forum.
Concretely, the requirements are
1. Dynamic iOS device discovery
Currently, we have to configure the iOS device IP address in OpenSTF, that means OpenSTF can’t support to add new iOS devices at runtime. That’s not good. OpenSTF should be able to discovery iOS devices dynamically at runtime, no iOS device IP address is needed.Apple officially provides a service Bonjour to support the dynamic iOS devices discovery.
Actually, the 2nd placement submission has already implemented the dynamic discovery via Bonjour. The submission is attached in the forum. So all you need to do is just migrate this functionality into the existing code base.
2. Landscape Mode support
For Android devices, OpenSTF is able to detect if the screen is in Portrait or Landscape mode and adjust the screen of STF accordingly. See this video for reference.
However, currently, OpenSTF doesn't support the same for iOS devices. See this video for reference.
OpenSTF should support the same for iOS devices
- -Detect the Portrait and Landscape mode automatically
- -Adjust the screen of STF accordingly
- -Set the Portrait/Landscape mode icon accordingly.
3. Touch icon support
For Android devices, if you touch the screen in OpenSTF, you will see a circle touch icon to denote your touch point.
But for iOS devices, there is no such icon.
OpenSTF should support the same for iOS devices.
Actually, the 2nd placement submission has already implemented this feature. You can migrate the feature into the code base. The submission is attached in the forum.
4. Multitouch support
For Android devices, you can press `Option` button in OpenSTF, then you are able to mimic the multitouch (pinch zoom in/out). You will also see an extra circle touch icon to denote your touch point.OpenSTF should support the same for iOS devices.
5. Device switch support
On the iOS page, I can switch to the Android device
But on the Android page, I can't switch back to the iOS device.
You should fix this issue to make both devices can switch to each other.
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.