Git Product home page Git Product logo

samplecreateinstrument's Introduction

Dependencies

There are several prerequisite dependencies you should install on your machine prior to starting to work:

  • Java 8

  • An IDE to write your tests on - Eclipse or IntelliJ

  • Maven (Optional - Needed only for command line executions as IDEs have Maven in-built.)

  • Download the necessary app files from here, upload it to your Perfecto Media Repository and configure that locator path to driver.capabilities.app capability in your testng xml file.

Eclipse users should also install:

  1. Eclipse has in-built Maven plugin

  2. TestNG Plugin

  3. QAF BDD Plugin - Or go to install new software option in eclipse, and download from this url https://qmetry.github.io/qaf/editor/bdd/eclipse/ In case, of network constraints, one can follow the instruction mentioned in QAF BDD Offline

IntelliJ IDEA users should also install:

  1. Cucumber Plugin (Community version only)
    • In case after installing the above plugin you are still not able to navigate to the step definition code then install this plugin - Cucumber for Groovy Plugin

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

Optional Installations

  • For source control management, you can install git.

Object Repository creation guidelines

  1. Copy-Paste your test to the .loc file.
  2. Remove lines unrelated to objects.
  3. From each object related line, create a line formatted as
    objectname = locatortype=objectlocator
    For example
    edit.start = xpath=//*[@label="Start location"]

Testng guidelines

  1. Under the config/ folder, open the testng_appium.xml or testng_web.xml file, depending on your app type.
  2. Copy the first test suite, and verify it's the only one with a true enabled property, to prevent the other test suites from running in parallel.
  3. Copy your feature/scenario tag to the name property in the include clause. Use a space-separated tags' list to include more scenarios and features.
  4. Add a parameter specifying the type of device, or naming a specific one, to be used for your test execution, for example,
    <parameter name="driver.capabilities.model" value="iPhone.*"></parameter>

Parallel execution

To run all samples in parallel, you need to configure the TestNG.xml file, which is located under the src/test/resources/config/ folder.

  1. For each of the test suites (enclosed within ...), set the enabled property value to true.
  2. Run your test as before.

This results in running 2 additional samples, both searching terms in Perfecto Community; one uses hard coded search terms, and the other retrieves them from an external input file.

Diversifying test execution

You can set each of the test suites to run on a different type of device, and to include different scenarios. For that, you need to manipulate the contents of the various test suites in the TestNG.xml file. Modify only the test suites not related to the Google sample we started with.

  1. Replace the current tag in the community samples, so that in the CommunityExample.feature sample all tags are @sampletag, and in the CommunityDataDrivenExample.feature sample - @sampletagdd.
    You may of course use other values, or leave the tags as is, but use these tag values for demonstration's sake.
  2. In the TestNG.xml file, set the tag parameter value in one suite to @sampletag, and in the other - to @sampletagdd.
    That means, that the first test suite runs the CommunityExample sample, and the second - the CommunityDataDrivenExample sample.
  3. To vary the devices used for each of the test suites, replace the capability parameter ("driver.capabilities.someCapability") in both suites with
    <parameter name="driver.capabilities.platformName" value="Android"/>.
    Set the value to "iOS" in the second test suite.
    By that, you specify that the CommunityExample sample will run on an Android device (randomly allocated), and the CommunityDataDrivenExample sample - on an iOS device.
    Note: Generally, you can use any of the numerous device selection capabilities.
  4. Run your test in the same manner as before.
    You can follow your test execution on Perfecto Dashboard and see the three samples running on the specified device types.

Viewing test execution results in dashboard.htm

All the previous executions were recorded, and may be viewed in dashboard.htm

samplecreateinstrument's People

Contributors

dineshbalajibingo avatar

Watchers

James Cloos avatar  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.