返回「计算机、信息技术与工程」

【自动化测试】Airtest&Poco架构与底层原理剖析

更多
Markdown 结构化数据
本文目录 11 个章节

【自动化测试】Airtest&Poco架构与底层原理剖析

创建时间:2021/5/28 18:32

  • 【自动化测试】Airtest&Poco架构与底层原理剖析
    • Airtest
      • Architecture View
    • Poco
      • Architecture View
      • Python In depth
        • Poco instance
        • UI proxy object
        • Poco SDK
          • SDK interfaces
          • SDK std
      • Unity3D SDK

Airtest

Architecture View

string s = String.Empty;

Poco

Architecture View

string s = String.Empty;

Python In depth

Poco instance

UI proxy object

Poco SDK

AbstractDumper - Dumper class is introduced to get the hierarchy information and convert it into serializable data.

AbstractNode - AbstractNode is a wrapper class that provides UI hierarchy and node info in game engine. This class uniformly specifies node-related methods such as retrieving the attributes or accessing the parent nodes or their children.

Attributor - This is a helper class to access the node attributes.

DefaultMatcher - for poco hierarchy traversing. Including logical query condition and predicate expression. When traversing through the hierarchy tree, matcher will apply the match method on each node of the tree.

Selector - Selector is used for selecting the specific UI element(s) by given query expression (formal definitions are in specific implementation classes).

class Selector - implements the standard Selector interface that uses DFS algorithm to travers through tree-like hierarchy structure.

Exceptions - provides several exceptions for poco-sdk

SDK interfaces

This package (poco.sdk.interfaces) defines the main standards for communication interfaces between poco and poco-sdk. If poco-sdk is integrated with an app running on another host or in different language, then poco-sdk is called remote runtime.

The implementation of these interfaces can be done either remotely or locally depending on your own choice. If it is done locally, refer to poco.freezeui for more information.

Poco needs to communicate with the app runtime under the convention of interfaces described below and these interfaces must be properly implemented. Any object implementing the same interface is replaceable and the communication protocol or transport layer has no limitation. Furthermore, in many cases the communication can be customized that one part of interfaces can use HTTP protocol and other can use TCP.

command - This interface defines command-level behaviours providing abilities to control remote runtime by sending self-defined command.

hierarchy - This interface defines hierarchy-related behaviour assembling from IDumper , Attributor and Selector.

input - This interface ensures the ability for simulated input on target device.

screen - ensures the ability for accessing the rendering the results presented on screen of target device.

SDK std

std.protocol module - https://poco.readthedocs.io/zh_CN/latest/source/poco.sdk.std.protocol.html

std.rpc package rpc.controller rpc.reactor

std.transport package

Unity3D SDK