This sample project is designed to get you up and running within few simple steps.
Begin with installing the dependencies below, and continue with the Getting Started procedure below.
There are several prerequisite dependencies you should install on your machine prior to starting to work with this project:
-
Android studio
-
Local Appium Server running at http://127.0.0.1 , port: 4723
-
Download the OS specific chromedriver into libs folder of the project and update the webdriver.chrome.driver as applicable
Eclipse users should also install:
IntelliJ IDEA users should also install:
TestNG Plugin is built-in in the IntelliJ IDEA, from version 7 onwards.
- For source control management, you can install git.
- To be able to interact with a real device from Perfecto cloud directly from your IDE, and use Perfecto Reporting, install Perfecto CQ Lab Plugin for your IDE.
-
Clone the repository.
-
After downloading and unzipping the project to your computer, open it from your IDE by choosing the folder containing the pom.xml
-
Download the OS specific chromedriver into libs folder of the project and update the webdriver.chrome.driver system path where ever applicable
-
Local Appium Server should be running at http://127.0.0.1 , port: 4723
-
Open PerfectoAppium.java and PerfectoSelenium.java
-
Search for the below line and replace
<<cloud name>>with your perfecto cloud name (e.g. demo) or pass it as maven properties:-DcloudName=<<cloud name>>
String cloudName ="<<cloud name>>";
-
Search for the below line and replace
String securityToken =<<SECURITY TOKEN>>with your perfecto security token or pass it as maven properties:-DsecurityToken=<<SECURITY TOKEN>>"<<SECURITY TOKEN>>";
Note: Refer to official documentation on how to execute from eclipse / IntelliJ.
-
Run pom.xml with the below maven goals & properties when:
a. If credentials are hardcoded:clean installb. If credentials are passed as parameters:
clean install -DcloudName=${cloudName} -DsecurityToken=${securityToken} -DtestngXmlFile=testng_perfecto.xml
-
Maven will automatically kick start the parallel execution of different examples inside perfecto package in parallel if
-DtestngXmlFile=testng.xmlis passed as maven properties, if you want to run only perfecto scripts just pass this:-DtestngXmlFile=testng_perfecto.xmlas maven properties. (this is the default behaviour) -
CI dashboard integration can be performed by supplying the below properties to top-level Maven Targets:
clean install -DcloudName=${cloudName} -DtestngXmlFile=testng_perfecto.xml -DsecurityToken=${securityToken} -Dreportium-job-name=${JOB_NAME} -Dreportium-job-number=${BUILD_NUMBER} -Dreportium-job-branch=${GIT_BRANCH} -Dreportium-tags=${myTag}