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

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_editor=

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值