Skip to content

How to set up test environment

Yevhen edited this page Feb 24, 2019 · 9 revisions

Puppeteer

Client lib of the framework

Install nuget package of Puppetry.Puppeteer (it is shared nuget pages that located on nuget.org) to your test solution or add reference to Puppeteer.dll (that can be builded by yourself).

PuppetryDriver

Proxy server that joins Puppeteer and UnityPlugin/Puppet

Run up published src of PuppetryDriver by dotnet. Example:

dotnet //pathToPublishedSolution/PuppetryDriver.dll or build it by yourself and run it PuppetryDriver supports commandline arguments on the start:

  • --puppeteerurl "http:\\your.custom.url.or.ip" - set custom base url for REST Server that responsible for communication with Puppeteer;
  • --puppeteerport 7777 - set custom port url for REST Server that responsible for communication with Puppeteer;
  • --puppetport 6111 - set custom port for Tcp Socket Server that responsible for communication with Puppet;

UnityPlugin/Puppet

Plugin for Unity to communicate with PuppetDriver and emulate interaction with a Game

Copy Puppet folder from UnityPlugin and add it to Game's code base inside Asset folder. Note: Game should be launched after PuppetDriver is started as Puppet is connecting to PuppetDriver

Additional: you can use UnityPlugin/Puppet in Editor and Native Game. To use Puppet in Game, you should add GameObject with component "InGameApiClientLoader" to your scene. InGameApiClientLoader will set up communication between the Game and PuppetDriver