POCO软件测试工程师,Poco: 跨平台的UI自动化测试框架,适用于游戏和App

Poco是一个跨引擎的UI自动化测试框架,支持Unity3D、cocos2dx以及Android原生应用等。它允许快速集成到游戏或应用中,提供强大的API,并支持多触摸操作。通过连接设备并启用ADB调试模式,可以使用Python脚本控制游戏或应用的UI元素,例如点击、滑动等。此外,Poco还提供了AirtestIDE和PocoHierarchyViewer辅助编写测试脚本。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

ba6f695ec3d93dd54b58acb42ef0d87a.png

Poco ポコ

A cross-engine UI automation framework. Unity3D/cocos2dx-*/Android native APP/(Other engines SDK)/...

Example

First you should connect your Android phone, for example, via usb cable and enable the ADB DEBUG MODE.

overview.gif

# coding=utf-8

import time

from poco.drivers.unity3d import UnityPoco

poco = UnityPoco()

poco('btn_start').click()

time.sleep(1.5)

shell = poco('shell').focus('center')

for star in poco('star'):

star.drag_to(shell)

time.sleep(1)

assert poco('scoreVal').get_text() == "100", "score correct."

poco('btn_back', type='Button').click()

Tools for writing test scripts

To retrieve the UI hierarchy of the game, please use our AirtestIDE (an IDE for writing test scripts) or

standalone PocoHierarchyViewer (to view the hierarchy and attributes only but lightweight) !

c1c98f8038f044fce6d27168947fc1f2.png

Installation

In order to use Poco, you must install Poco python library on your host and also install the poco-sdk in

your game/app.

Poco can be installed straightforward with pip command

pip install pocoui

SDK Integration

For poco-sdk integration please refer to Integration Guide

Features

supports mainstream game engines, including: Unity3D, cocos2dx-js, cocos2dx-lua and Android native apps

retrieves UI Elements Hierarchy in game's runtime

is super fast and impact-free to the game

allows straightforward SDK integration to the game (within in 5 minutes)

provides powerful APIs that are engine independent

supports multi-touch e.g. fling/pinch/... (and more is coming soon)

support gps, accelerometer and gyro sensors, rotation (landscape/portrait) and other sensors as input (coming soon)

is extensible to other private engines by implementing poco-sdk .

is compatible with Python 2.7 and Python 3.3+.

Documentation

Tutorials and examples

How to use Poco

Poco supports different types of engines by different drivers. For different engines please initialize poco instance

by corresponding driver. Remember to connect an Android device to your PC/mac with a running game or launch and keep

the game/app active on PC/mac.

Following example shows how to initialize popo instance for

Unity3D.

from poco.drivers.unity3d import UnityPoco

poco = UnityPoco()

# for windows

# poco = UnityPoco(('localhost', 5001), unity_ed

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值