This article refers to the following articles to organize:
Setting up and running the environment under the MAC STF
First, preface
STF, full name is the smartphone Test farm,web-end batch mobile device management control tool, that is, you can use the browser to batch control your mobile device, currently only support Android devices.
Second, the environment construction 1. Installing the Xcode and Xcode command-line tools
(Installation Macport required)
- Xcode: Install directly on
App Store
download
- Xcode command line Tools: Enter the following command in terminal and then click the next step to install it automatically in the installation step that pops up.
2. Install the Macport and use the port later
Reference: http://www.ccvita.com/434.html
1.1 directly to the official website to download the installation package for installation
http://www.macports.org/install.php
1.2 Adding environment variables
/opt/local/bin
and /opt/local/sbin
add to the $PATH
search path:
In the file, add:
1 2
|
Export path=/opt/local/bin:$PATH Export path=/opt/local/sbin:$PATH
|
Update Environment variables:
1.3 Update ports tree and MacPorts versions
It is strongly recommended to use the-v parameter for the first run to display the detailed update process.
3. Basic Package installation for Linux
Mac has a similar environment before ignoring.
4. SDK Environment Installation
There's no detailed explanation here, there are estimates.
- Java
- Android Note Configure environment variables after installation is complete
5. Nodejs Installation
- https://nodejs.org/en/
- Verify:
6. Installing Bower
Verify:
7. Installing RETHINKDB
(It is recommended to install via PGK)
- https://www.rethinkdb.com/docs/install/
- Verify:
8. Installing GraphicsMagick
1
|
sudo port install GraphicsMagick
|
9. Installing Libsodium
(Dependence of ZEROMQ)
1
|
sudo port install Libsodium
|
10. Installing Zeromp
11. Installing PROTOBUF
1
|
sudo port install Protobuf-cpp
|
- Ignore environment variables
12. Installing Pkg-config
1
|
sudo port install Pkgconfig
|
13. Install STF
- Time should be to see the speed, the original note will be very long, but my side soon installation is complete.
Third, run 1. Run stf1.1 start RETHINKDB
Enter the following command in the terminal, then visit the browser to see the RETHINKDB management interface: http://localhost:8080/
1.2 Starting the STF
(new terminal required)
1
|
Local--PUBLIC-IP native IP--allow-remote
|
Such as:
1
|
--public-ip 192. 168. 1--allow-remote
|
Which --allow-remote
means remote access is allowed.
Note: The examples given in the official documentation are not accessible from the actual test:stf local
2. Running the client
- Browser input
http://localhost:7100/
, just fill in the login information that matches the rule:
- Successful, remote operation can be achieved!
V. Other systems 1. Linux class System
Linux-class operating systems, such as Ubuntu, can refer to the Web-side bulk mobile device management control tool to build and run the environment of the STF.
2. Windows
Direct installation under Windows is said to be quite troublesome, there are many pits, it is more common practice to use virtual machines (such as Docker) to virtual a Linux system, and then refer to the previous step of the building method to build.
Vi. use of 1. Remote control
After setting up the environment, this is a server connected to the N Android phone (this server may be placed in a mysterious place in your company, commonly referred to as the Wireless laboratory), the mobile phone control interface can be seen:
At this time, on your own computer (client), through the command line input adb connect 192.168.1.102:7401
, you can connect your computer to the remote server on the phone real computer, as if the phone is connected to their own computer, you can in Android studio Android Device Monitor to see the phone hardware, you can directly interrupt the point of Debug.
Environment construction and operation of STF under Mac system