Page tree
Skip to end of metadata
Go to start of metadata

Last updated: Nov 12, 2019 10:16

Let's have a quick look at the executable usage. Running ./perfectoconnect without any command outputs the version number and information on the available commands and parameters.

 Click to view code snippet
usage: ./perfectoconnect [<flags>] <command> [<args> ...]

Perfecto Connect, Version 19.15.1

Flags:
  --help     Show context-sensitive help (also try --help-long and --help-man).
  --version  Show application version.

Commands:
  help [<command>...]
    Show help.

  start --cloudurl=<cloud> --securitytoken=<securitytoken> [<flags>]
    Start Perfecto Connect session

  stop
    Terminates existing Perfecto Connect sessions

  doctor --cloudurl=<cloud> --securitytoken=<securitytoken> [<flags>]
    Run connectivity tests

Create a Perfecto Connect tunnel

You create a Perfecto Connect tunnel by running the start command, including the mandatory parameters cloudurl and securitytoken.

The following table lists all available parameters.

On this page:

ParameterDescription
--helpShows context-sensitive help (also try --help-long and --help-man)
--versionShows the Perfecto Connect version
-c, --cloudurl=<cloud> 

The Perfecto Lab that you are registered on, for example demo.perfectomobile.com. Make sure to remove the following from the URL:

  • Protocol identifier (such as http:// or https://)
  • .app (if part of the URL)
-s, --securitytoken=<securitytoken>

The security token required to use with Perfecto Connect. For more information, see Generate security tokens.

-f, --foregroundRuns Perfecto Connect in foreground mode. In foreground mode, all logs are displayed in your console. This is helpful for troubleshooting sessions with Perfecto Support. Backgroud mode is the default. It only outputs the tunnel ID.
-l, --proxylog

Enables bundled proxy logging. See also Work behind a proxy.

-v, --verboseEnables verbose logging.
-t, --skiptestsSkips connectivity tests usually performed by the executable before initiating the session.
--logfile=<full path> The full path to the location of the log file, for example /tmp/log.out.
-d, --disable-proxy-detect

Disables the auto-detection proxy. This is sometimes required for troubleshooting.

--brideporxyip=<ip>The IP address of bridging proxy (optional).
--bridgeproxyport=<port>

The port of the bridging proxy (optional).

--outgoingproxyip=<ip>The IP address of the outgoing proxy (optional).
--outgoingproxyport=<port>The port of the outgoing proxy (optional).
--outgoingproxyuser=<username>The username used to connect to the outgoing proxy (optional)
--outgoingproxypass=<password>The password used to connect to the outgoing proxy (optional)


To create a Perfecto Connect tunnel:

  1. In the command line, navigate to the directory of the Perfecto Connect client.
  2. Run the following command to launch a tunnel:

    $ ./perfectoconnect start -c <cloudURL> -s <security-token>

    For example:

    macosx:/usr/local/etc/perfecto$ ./perfectoconnect start -c demo.perfectomobile.com -s eyJhbGciOiJSUz...DxAkAuw82Hao7qrA
    

    The reply from the application is the tunnel identifier (Tunnel ID) that you insert into your Appium/Selenium scripts to associate devices with this tunnel.

    Note: Running the perfectoconnect application in the foreground causes the execution to send additional log information to the console. You may need to look for the Tunnel ID.

  3. Save the Tunnel ID.

Close a Perfecto Connect tunnel

When the Perfecto Connect client runs in background mode and you are done using a tunnel, you can terminate any existing Perfecto Connect sessions by using the stop command.

To close a tunnel:

  • Run the stop command as follows:

    $ ./perfectoconnect stop

    For example:

    macosx:/usr/local/etc/perfecto$ ./perfectoconnect stop
    13:29:14.109 run ▶ INFO 001 Perfecto Connect session terminated!

    This will terminate any existing tunnels on your machine and disconnect all existing connections.

Diagnose connection issues

You can use the doctor command to troubleshoot connection issues with Perfecto Connect. The command checks if the client can connect to Perfecto services and servers. You run it with the cloud and security token parameters. This section explains how to use the command and lists the errors it might return, along with how to resolve them.

The following table lists all available parameters.

ParameterDescription
--helpShows context-sensitive help (also try --help-long and --help-man)
--versionShows the Perfecto Connect version
-c, --cloudurl=<cloud> 

The Perfecto Lab that you are registered on, for example demo.perfectomobile.com. Make sure to remove the following from the URL:

  • Protocol identifier (such as http:// or https://)
  • .app (if part of the URL)
-s, --securitytoken=<securitytoken>

The security token required to use with Perfecto Connect. For more information, see Generate security tokens.

-d, --disable-proxy-detect

Disables the auto-detection proxy. This is sometimes required for troubleshooting.

--outgoingproxyip=<ip>The IP address of the outgoing proxy (optional).
--outgoingproxyport=<port>The port of the outgoing proxy (optional).
--outgoingproxyuser=<username>The username used to connect to the outgoing proxy (optional)
--outgoingproxypass=<password>The password used to connect to the outgoing proxy (optional)
-v, --verboseEnables verbose logging.


To diagnose connection issues:

  • Run the doctor command as follows:

    $ ./perfectoconnect doctor -c <cloud> -s <security-token>” 

    For example:

    $ ./perfectoconnect doctor -c demo.perfectomobile.com -s eyJhbGciOiJSUz...DxAkAuw82Hao7qrA
    

    A successful execution returns the following output:

    10:53:31.800 INFO 001 > Perfecto Connect MacOS Client - v19.15.1
    10:53:31.814 INFO 002 > Running connectivity tests
    10:53:31.814 INFO 003 > Trying to reach Perfecto services...
    10:53:52.261 NOTICE 004 > Perfecto services reached successfully
    10:53:52.261 INFO 005 > Trying to reach Perfecto servers...
    10:53:56.789 NOTICE 006 > Perfecto servers reached successfully

The following table lists possible errors and their resolution.

ErrorResolution

wrong offline token, please make sure that the provided token is valid

Invalid security token. Generate a new token and try again. For instructions, see Generate security tokens.
Post https://demo.connect.perfectomobile.com/v2/client/session/start: ForbiddenFailed to connect to services. Check the parameter values provided and try again. If the issue persists, contact your IT department to whitelist the following: *.connect.perfectomobile.com:443
Forbidden response on <server-name>:443Failed to connect to servers. Check the parameter values provided and try again. If the issue persists, contact your IT department to whitelist the following: vpn.*.perfectomobile.com:443

For more help with resolving issues, see Troubleshoot Perfecto Connect.

  • No labels