GithubHelp home page GithubHelp logo

lambdatest / hyperexecute-appium-python-pytest Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 1.0 30 KB

Demonstration of pytest appium test cases on HyperExecute

Home Page: https://hyperexecute.lambdatest.com/

Python 100.00%
appium hyperexecute mobile mobile-app hyperexecute-mobile

hyperexecute-appium-python-pytest's Introduction

HyperExecute Pytest Appium pw

HyperExecute is a smart test orchestration platform to run end-to-end Selenium tests at the fastest speed possible. HyperExecute lets you achieve an accelerated time to market by providing a test infrastructure that offers optimal speed, test orchestration, and detailed execution logs.

The overall experience helps teams test code and fix issues at a much faster pace. HyperExecute is configured using a YAML file. Instead of moving the Hub close to you, HyperExecute brings the test scripts close to the Hub!

To know more about how HyperExecute does intelligent Test Orchestration, do check out HyperExecute Getting Started Guide

Gitpod

Follow the below steps to run Gitpod button:

  1. Click 'Open in Gitpod' button (You will be redirected to Login/Signup page).
  2. Login with Lambdatest credentials and it will be redirected to Gitpod editor in new tab and current tab will show hyperexecute dashboard.

How to run mobile appium automation tests on HyperExecute (using Python pytest)

Pre-requisites

Before using HyperExecute, you have to download HyperExecute CLI corresponding to the host OS. Along with it, you also need to export the environment variables LT_USERNAME and LT_ACCESS_KEY that are available in the LambdaTest Profile page.

Download HyperExecute CLI

HyperExecute CLI is the CLI for interacting and running the tests on the HyperExecute Grid. The CLI provides a host of other useful features that accelerate test execution. In order to trigger tests using the CLI, you need to download the HyperExecute CLI binary corresponding to the platform (or OS) from where the tests are triggered:

Also, it is recommended to download the binary in the project's parent directory. Shown below is the location from where you can download the HyperExecute CLI binary:

Configure Environment Variables

Before the tests are run, please set the environment variables LT_USERNAME & LT_ACCESS_KEY from the terminal. The account details are available on your LambdaTest Profile page.

For macOS:

export LT_USERNAME=LT_USERNAME
export LT_ACCESS_KEY=LT_ACCESS_KEY

For Linux:

export LT_USERNAME=LT_USERNAME
export LT_ACCESS_KEY=LT_ACCESS_KEY

For Windows:

set LT_USERNAME=LT_USERNAME
set LT_ACCESS_KEY=LT_ACCESS_KEY

Auto-Split Execution with Pytest

Auto-split execution mechanism lets you run tests at predefined concurrency and distribute the tests over the available infrastructure. Concurrency can be achieved at different levels - file, module, test suite, test, scenario, etc.

For more information about auto-split execution, check out the Auto-Split Getting Started Guide

Core

Auto-split YAML file in the repo contains the following configuration:

globalTimeout: 150
testSuiteTimeout: 150
testSuiteStep: 150

Global timeout, testSuite timeout, and testSuite timeout are set to 150 minutes.   The runson key determines the platform (or operating system) on which the tests are executed. Here we have set the target OS as Windows.

runson: linux

Auto-split is set to true in the YAML file.

 autosplit: true

retryOnFailure is set to true, instructing HyperExecute to retry failed command(s). The retry operation is carried out till the number of retries mentioned in maxRetries are exhausted or the command execution results in a Pass. In addition, the concurrency (i.e. number of parallel sessions) is set to 4.

retryOnFailure: true
maxRetries: 2
concurrency: 2

Steps (or commands) that must run before the test execution are listed in the pre run step.

pre:
  - pip3 install -r requirements.txt

The testDiscovery directive contains the command that gives details of the mode of execution, along with detailing the command that is used for test execution. Here, we are fetching the list of class names that would be further passed in the testRunnerCommand

testDiscovery:
  type: raw
  mode: static
  command: grep -nri 'class' tests -ir --include=\*.py | sed 's/:.*//'

The testRunnerCommand contains the command that is used for triggering the test. The output fetched from the testDiscoverer command acts as an input to the testRunner command.

testRunnerCommand: python3 -m pytest

Test Execution

The CLI option --config is used for providing the custom HyperExecute YAML file (i.e. --config hyperExecute_autosplit.yaml

Execute tests using Autosplit mechanism.

Run the following command on the terminal to trigger Pyetst tests on the mobile devices.

./hyperexecute --config hyperExecute_autosplit.yaml

Visit HyperExecute Automation Dashboard to check the status of execution

LambdaTest Community 👥

The LambdaTest Community allows people to interact with tech enthusiasts. Connect, ask questions, and learn from tech-savvy people. Discuss best practises in web development, testing, and DevOps with professionals from across the globe 🌎

What's New At LambdaTest ❓

To stay updated with the latest features and product add-ons, visit Changelog

About LambdaTest

LambdaTest is a leading test execution and orchestration platform that is fast, reliable, scalable, and secure. It allows users to run both manual and automated testing of web and mobile apps across 3000+ different browsers, operating systems, and real device combinations. Using LambdaTest, businesses can ensure quicker developer feedback and hence achieve faster go to market. Over 500 enterprises and 1 Million + users across 130+ countries rely on LambdaTest for their testing needs.

Features

  • Run Selenium, Cypress, Puppeteer, Playwright, and Appium automation tests across 3000+ real desktop and mobile environments.
  • Real-time cross browser testing on 3000+ environments.
  • Test on Real device cloud
  • Blazing fast test automation with HyperExecute
  • Accelerate testing, shorten job times and get faster feedback on code changes with Test At Scale.
  • Smart Visual Regression Testing on cloud
  • 120+ third-party integrations with your favorite tool for CI/CD, Project Management, Codeless Automation, and more.
  • Automated Screenshot testing across multiple browsers in a single click.
  • Local testing of web and mobile apps.
  • Online Accessibility Testing across 3000+ desktop and mobile browsers, browser versions, and operating systems.
  • Geolocation testing of web and mobile apps across 53+ countries.
  • LT Browser - for responsive testing across 50+ pre-installed mobile, tablets, desktop, and laptop viewports

We are here to help you 🎧

hyperexecute-appium-python-pytest's People

Contributors

prateeklambda avatar

Watchers

 avatar  avatar  avatar

Forkers

swapnilrlambda

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.