Integrate Perfecto Connect with Jenkins
You can use Perfecto Connect as part of the CI process by integrating it with a Jenkins CI job on Windows or Linux.
To integrate Perfecto Connect with Jenkins on Windows:
-
Create a new Jenkins Job.
-
Add the Git repository URL. We use this repository.
-
Download and extract the Perfecto Connect client. The perfecto connect binary should reside in a fixed folder, such as
C:\Perfecto\
, only the Windows Jenkins instance.Download URL: http://downloads.connect.perfectomobile.com/clients/Perfecto-Connect-windows.zip
Make sure you extract perfectoconnect.exe from the archive.
-
Activate the Perfecto Connect client.
Start the client providing the URL of the Perfecto Lab and your personal security token, assigning the output to a local variable. Save the client's output to a properties file as TUNNEL_ID=<value>.
To start the client, we execute:
CopyC:\Perfecto\perfectoconnect.exe start -c <cloudURL> -s <security-token>
where:
-
cloudURL
is the URL of the Perfecto Lab to connect to, but without the.app
notation. For example: mobilecloud.perfectomobile.com (but not mobilecloud.app.perfectomobile.com) -
securityToken
is the tester's personal security token for the Perfecto Lab. See also Generate security tokens.
For more information about how to use the client, see Download the Perfecto Connect client.
-
-
Inject the environment variable from the properties file.
This injects the value of the TUNNEL_ID from the properties file to the build job.
-
Run tests. In this sample, we use Gradle to run tests. We pass the Perfecto Lab URL, the security token, and the TUNNEL_ID that we got from the client.
- Stop the Perfecto Connect client as a post-build action.
To integrate Perfecto Connect with Jenkins on Linux:
-
Create a new Jenkins Job.
-
Add the Git repository URL. We use this repository.
-
Download and extract the Perfecto Connect client and extract the binary.
For more information about how to download the client, see Download the Perfecto Connect client.
-
Activate the Perfecto Connect client.
Start the client providing the URL of the Perfecto Lab and your personal security token, assigning the output to a local variable. Save the client's output to a properties file as TUNNEL_ID=<value>.
To start the client, we execute:
Copy./perfectoconnect start -c <cloudURL> -s <security-token>
-
Inject the environment variable from the properties file. This will inject the value of the TUNNEL_ID from the properties file to the build job.
-
Run tests. In this sample, we use Gradle to run tests. We pass the Perfecto Lab URL, the security token, and the TUNNEL_ID that we got from the client.
-
Stop the Perfecto Connect client as a post-build action.