Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/perfectomobilesa/perfectojavasample
A publicly available Mavenised, testng based Java example project that has sample codes to showcase local & perfecto cloud based Appium & selenium tests.
https://github.com/perfectomobilesa/perfectojavasample
java maven perfecto testng
Last synced: about 3 hours ago
JSON representation
A publicly available Mavenised, testng based Java example project that has sample codes to showcase local & perfecto cloud based Appium & selenium tests.
- Host: GitHub
- URL: https://github.com/perfectomobilesa/perfectojavasample
- Owner: PerfectoMobileSA
- Created: 2019-09-27T12:45:12.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-07-22T11:57:39.000Z (4 months ago)
- Last Synced: 2024-07-22T14:13:54.648Z (4 months ago)
- Topics: java, maven, perfecto, testng
- Language: Java
- Homepage: https://developers.perfectomobile.com/display/PD/Appium
- Size: 41.9 MB
- Stars: 7
- Watchers: 9
- Forks: 39
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Sample Java Project
![CircleCI status](https://circleci.com/gh/PerfectoMobileSA/PerfectoJavaSample.svg?style=shield "CircleCI status")
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.
### Dependencies
There are several prerequisite de pendencies you should install on your machine prior to starting to work with this project:* Java 11
* An IDE to write your tests on - [Eclipse](http://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/marsr) or [IntelliJ](https://www.jetbrains.com/idea/download/#)
* [Maven](https://maven.apache.org/)
* Android studio
* Local Appium Server running at http://127.0.0.1 , port: 4723
Eclipse users should also install:
1. [Maven Plugin](http://marketplace.eclipse.org/content/m2e-connector-maven-dependency-plugin)
2. [TestNG Plugin](http://testng.org/doc/download.html)
IntelliJ IDEA users should also install:
1. [Maven Plugin for IDEA](https://plugins.jetbrains.com/plugin/1166)
TestNG Plugin is built-in in the IntelliJ IDEA, from version 7 onwards.
#### Optional Installations
* For source control management, you can install [git](https://git-scm.com/downloads).
* 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](https://www.perfectomobile.com/ni/resources/downloads/add-ins-plugins-and-extensions) for your IDE.## Downloading the Sample Project
* [Clone](https://github.com/PerfectoMobileSA/PerfectoJavaSample.git) the repository.
* After downloading and unzipping the project to your computer, open it from your IDE by choosing the folder containing the pom.xml
**********************
# Getting Started* Local Appium prerequisite: Local Appium Server should be running at http://127.0.0.1 , port: 4723
## Running sample as is
* Open PerfectoAppium.java and PerfectoSelenium.java
* Search for the below line and replace `<>` with your perfecto cloud name (e.g. testcloud is the cloudName of free trial users, Kindly reach out to [Perfecto support](https://www.perforce.com/support/request-support) in case of queries) or pass it as maven properties: `-DcloudName=<>`
String cloudName = `"<>"`;
* Search for the below line and replace `<>` with your perfecto [security token](https://developers.perfectomobile.com/display/PD/Generate+security+tokens) or pass it as maven properties: `-DsecurityToken=<>`
String securityToken = `"<>"`;
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
install
b. 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.xml` is passed as maven properties, if you want to run only perfecto scripts just pass this: `-DtestngXmlFile=testng_perfecto.xml` as 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}