Coder Social home page Coder Social logo

tiagoms1 / perfectojavasample Goto Github PK

View Code? Open in Web Editor NEW

This project forked from perfectomobilesa/perfectojavasample

0.0 0.0 0.0 42.99 MB

A publicly available Mavenised, testng based Java example project that has sample codes to showcase local & perfecto cloud based Appium & selenium tests.

Home Page: https://developers.perfectomobile.com/display/PD/Appium

Java 100.00%

perfectojavasample's Introduction

Sample Java Project

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 dependencies you should install on your machine prior to starting to work with this project:

Eclipse users should also install:

  1. Maven Plugin

  2. TestNG Plugin

IntelliJ IDEA users should also install:

  1. Maven Plugin for IDEA

TestNG Plugin is built-in in the IntelliJ IDEA, from version 7 onwards.

Optional Installations

  • 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.

Downloading the Sample Project

  • 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


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 <<cloud name>> with your perfecto cloud name (e.g. testcloud is the cloudName of free trial users, Kindly reach out to Perfecto support in case of queries) or pass it as maven properties: -DcloudName=<<cloud name>>

          String cloudName = "<<cloud name>>";

  • Search for the below line and replace <<SECURITY TOKEN>> with your perfecto security token or pass it as maven properties: -DsecurityToken=<<SECURITY TOKEN>>

          String securityToken = "<<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
      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}
    

perfectojavasample's People

Contributors

dependabot[bot] avatar genesisthomas avatar jeannew-a avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.