Metadata-Version: 2.1
Name: solox
Version: 2.4.8
Summary: SoloX - Real-time collection tool for Android/iOS performance data.
Home-page: https://github.com/smart-test-ti/SoloX
Author: Rafa Chen
Author-email: rafacheninc@gamil.com
License: MIT
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: flask (>=2.0.1)
Requires-Dist: requests
Requires-Dist: logzero
Requires-Dist: Flask-SocketIO (==4.3.1)
Requires-Dist: fire
Requires-Dist: python-engineio (==3.13.2)
Requires-Dist: python-socketio (==4.6.0)
Requires-Dist: Werkzeug (==2.0.3)
Requires-Dist: Jinja2 (==3.0.1)
Requires-Dist: tidevice (==0.9.7)
Requires-Dist: tqdm
Requires-Dist: xlwt

<p align="center">
  <a>English</a> | <a href="./README.zh.md">中文</a> | <a href="./DocForAndroid.md">DocForAndroid</a>
</p>

<p align="center">
<a href="#">
<img src="https://cdn.nlark.com/yuque/0/2022/png/153412/1643364757640-b4529458-ec8d-42cc-a2d8-c0ce60fdf50f.png" alt="SoloX" width="150">
</a>
<br>
<br>

</p>
<p align="center">
<a href="https://pypi.org/project/solox/" target="__blank"><img src="https://img.shields.io/pypi/v/solox" alt="solox preview"></a>
<a href="https://pypistats.org/packages/solox" target="__blank"><img src="https://img.shields.io/pypi/dm/solox"></a>

<br>
</p>

## Preview

SoloX - Real-time collection tool for Android/iOS performance data.

We are committed to solving inefficient, cumbersome test execution, and our goal is Simple Test In SoloX!

<img src="https://cdn.nlark.com/yuque/0/2022/png/153412/1662348054846-b0164165-e83a-443e-9a05-8c1f9ddb355f.png?x-oss-process=image%2Fresize%2Cw_1500%2Climit_0"  width="100%" >

## Installation
```
1.Python:3.6+ 
2.pip install -U solox
3.pip install -i  https://mirrors.ustc.edu.cn/pypi/web/simple -U solox (Recommend)

notice: If Windows users need to test ios, install and start Itunes
```

## Startup SoloX
### default
```shell
python -m solox
```
### customize

```shell
python -m solox --host={ip} --port=50003
```

## Collect in python 
```python
from solox.public.apm import APM
# solox version >= 2.1.2

apm = APM(pkgName='com.bilibili.app.in',deviceId='ca6bd5a5',platform='Android', surfaceview='true') # surfaceview： false = gpxinfo
# apm = APM(pkgName='com.bilibili.app.in', platform='iOS') only supports one device
cpu = apm.collectCpu() # %
memory = apm.collectMemory() # MB
flow = apm.collectFlow() # KB
fps = apm.collectFps() # HZ
battery = apm.collectBattery() # level:% temperature:°C
```

## Collect in API 
### Start the service in the background

```
# solox version >= 2.1.5

macOS/Linux: nohup python3 -m solox &
Windows: start /min python3 -m solox &
```

### Request apm data from api
```
http://{ip}:50003/apm/collect?platform=Android&deviceid=ca6bd5a5&pkgname=com.bilibili.app.in&apm_type=cpu

apm_type in ['cpu','memory','network','fps','battery']
```

## PK Model
- 2-devices: test the same app on two different phones
- 2-apps: test two different apps on two phones with the same configuration

<img src="https://cdn.nlark.com/yuque/0/2022/png/153412/1662348055024-96e38b5e-d6b4-4a06-8070-0707e2fbcd99.png?x-oss-process=image%2Fresize%2Cw_1500%2Climit_0"  width="100%">

## Browser

<img src="https://cdn.nlark.com/yuque/0/2023/png/153412/1677553244198-96ce5709-f33f-4038-888f-f330d1f74450.png" alt="Chrome" width="50px" height="50px" />

## Terminal

- windows: PowerShell
- macOS：iTerm2 (https://iterm2.com/) 

## Thanks

- https://github.com/alibaba/taobao-iphone-device

## Communicate
- Email: laoqi1988_f1@126.com

