只介绍unity的环境准备,cocos的可以参考官方文档 https://poco-chinese.readthedocs.io/zh_CN/latest/source/doc/integration.html
一、pocoSDK
官方pocoSDK地址 https://github.com/AirtestProject/Poco-SDK
1.clone pocoSDK项目到本地
2.解压后将Unity3D文件夹复制到你unity工程的scripts文件夹下
3.如果你是用的ngui,就把scripts/Unity3D文件夹里的fairygui和ugui文件夹删掉,反之也是将另外两个gui文件夹删掉(问开发用的是哪个gui)

4.这个时候打开这个unity项目,会发现有报错
(1)报错Assets/Plugins/UnityMemoryProfiler/Editor/PackedMemorySnapshotUtility.cs(170,75): error CS0433: The imported type `Newtonsoft.Json.Serialization.ITraceWriter‘ is defined multiple times
解决方法:找到Assets/Plugins/UnityMemoryProfiler/Editor/目录,把下面的Newtonsoft.Json全部删掉
(2)报错Assets/WGame/Scripts/Unity3D/PocoManager.cs(155,15): error CS1644: Feature `null propagating operator‘ cannot be used because it is not part of the C# 4.0 language specification
解决方法:
5.如果不是Android环境,想在unity上打apk包,需要切环境
(1)file-build settings-选Android,先点open download page下载Android支持,一直点下一步就行。安装好了之后点switch platform,切环境一般需要一个多小时。
airtest前期准备(pocoSDK+unity打apk包)
原文:https://www.cnblogs.com/lucio1128/p/12975449.html