Skip to content

Latest commit

 

History

History
208 lines (127 loc) · 8.99 KB

README_eng.md

File metadata and controls

208 lines (127 loc) · 8.99 KB

SoloPi

GitHub stars GitHub license GitHub release API TesterHome

SoloPi is a wireless, non-invasive testing tool for automatic Android software testing. The Beta version has 3 main features: record and replay, performance testing, multi-device compatibility testing(OneToMany).

Features

1. Record and replay

SoloPi captures all actions performed during tesing sessions so that issues can be identified and resolved more quickly. The recording can be played on any devices. All these actions can be done on just one single phone.

Recording playback

The video tutorial:

Record the testing on a mobile game.

Record the testing on a native phone app.

2. Performance testing

  • SoloPi is able to record and show the app's performance data such as CPU, memory, internet speed while do the testing. The performance window with selected testing metrics will float on top. After testing, you can check each testing parameter with generated data graphs.

  • Besides, SoloPi can change testing environment to simulate certain situations. For instance, slow down the internet speed to simulate a situation when the internet is bad while using the app.

  • SoloPi also add a function to calculate app launch time. This tool to the most extent, shows the actual launch time. This calculator function can be incorporated with UI automatic tests by sending broadcast messages.

Performance analysis

The video tutorial:

Use the performance analysis function

Use the launch time calculator

3. Multi-device compatibility testing

SoloPi supports simultaneous multi-device compatibility testing which is controlled by one device. So it enormously improves the efficiency of testing on different devices.

Multi-device testing

The video tutorial:

Simultaneous multi-device testing

Getting started

Open source SoloPi excludes the multi-device compatibility testing feature since it's still unstable.

1. Establishing a build environment

  • macOS 10.14.3
  • Android Studio 3.2
  • Gradle 4.4(Upgrading is not recommended.)
  • CMake 3.6.4111459(Upgrading is not recommended.)
  • Ndk 15.2.4203819
  • TargetApi 25
  • MinimumApi 18
  • Note: Turn off instant run function in Android Studio. Otherwise the app does not work.

2. Downloading and setting Android SDK path

  • Download SDK Platform here.

  • Unzip it and add the path to the system environment variable ANDROID_SDK=${sdk path} . You can also refer to articles such as how to set adb system environment variable.

NOTE: For system above Windows 10, it takes effect immediately in a new command line window, while for older versions of system, you need to restart the computer. For Linux and MacOS, you can test if it works with echo $ANDROID_SDK.

3. Turning on on-device developer mode

  • Open the Settings app.
  • (Only on Android 8.0 or higher) Select System.
  • Scroll to the bottom and select About phone.
  • Scroll to the bottom and tap Build number 7 times. The system will show ‘You are now a developer.’ (messages may vary.)
  • Return to the previous screen to find Developer options near the bottom. Toggle the options on and enable USB debugging

4. Known issues

  • For VIVO devices, if there’s an option like ‘USB security access’ under developer options, it needs to be toggled on, otherwise recording and multi-device testing function may not work.

  • For Xiaomi devices, under developer options, USB installation and USB debugging also need to be toggled on. Besides, you also need to turn on ‘后台弹出界面’ permission of SoloPi (System Settings -> App Management -> SoloPi -> Permissions).

  • For MEIZU devices, if the application to be tested contains highly secured functions like payment function, the secure payment function in the system needs to be turned off.

  • For HUAWEI devices, under developer options, you need to turn on ‘USB debugging’ and ‘allow ADB debugging in charge only mode’ option. Otherwise, when the USB cable is unplugged, the ADB debugging is also shut down.

  • For OPPO devices, system would ‘unchecking’ the ‘USB debugging’ every 10 minutes, leading to the unavailability of SoloPi. To solve it, keep connecting the phone to the computer.

  • It's highy recommandded to turn off safety input method in system language settings (if it has), otherwise text input may not work when input password or something else.

5. Debugging apps over Wi-Fi

5.1 Connect the device to PC via USB and make sure debugging is working.

When the device is connected to the PC, the device should pop up 'Allow USB debugging?' or similar messages. Click 'Yes'.

Check if the connection is successful in command line:

Windows:

   %ANDROID_SDK%\platform-tools\adb.exe devices

MacOS/Linux:

   $ANDROID_SDK/platform-tools/adb devices

If it returns with the device number, then the connection is successful.

5.2 Make the connection

Note: Windows system may need Android device driver to make a successful connection. Devices driver can be downloaded on device's official website. You can also download the phone manager which includes device driver.

Note: If the command line dosen't return device, make sure the device driver is installed successfully and the USB debugging is turned on. For some device, the connection mode needs to be Media Transfer Protocal(MTP).

For single device,

Windows:

   %ANDROID_SDK%\platform-tools\adb.exe tcpip 5555

macOS/Linux:

   $ANDROID_SDK/platform-tools/adb tcpip 5555

The device may show restarting in TCP mode port: 5555 to remind you the wi-fi ADB debugging mode is on.

For multiple devices,

Find the device number which is the serial number before device and save it.

Windows:

   %ANDROID_SDK%\platform-tools\adb.exe -s ${serial number} tcpip 5555

macOS/Linux:

   $ANDROID_SDK/platform-tools/adb -s ${serial number} tcpip 5555

5.3 Downloading SoloPi

You can either download SoloPi.apk or clone the repository.

Folders and description

In the folder src,

  • app: The business logic of the application.
  • shared: The core function of the application.
  • common: The application architecture.
  • mdlibrary: Proxy generation of ExportService.
  • permission: Permission management.
  • AdbLib: ADB connection.
  • androidWebscoket: Android WebSocket.

Contributing

This project is mainly open to developers who want to do software testing. If you have any suggestions or questions, you can open an issue, send a PR, or leave a message at our page at TesterHome.

If you like our project, please fork/⭐Star this project!

Attributions

We want to thank those third party libraries used in this project without which this project couldn't be completed.

License

This project is under the Apache 2.0 License. See the LICENSE file for the full license text.

Copyright (C) 2015-present, Ant Financial Services Group

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Disclaimer

Disclaimer