Giter Club home page Giter Club logo

demo-python's Introduction

Python Demonstration Scripts

CircleCI

This repository contains example scripts and dependencies for running automated Selenium tests on Sauce Labs using Python. You can use these scripts to test your Sauce Labs authentication credentials, setup of your automated testing environment, and try out Sauce Labs features.

Disclaimer

The code in these scripts is provided on an "AS-IS" basis without warranty of any kind, either express or implied, including without limitation any implied warranties of condition, uninterrupted use, merchantability, fitness for a particular purpose, or non-infringement. These scripts are provided for educational and demonstration purposes only, and should not be used in production. Issues regarding these scripts should be submitted through GitHub. These scripts are maintained by the Technical Services team at Sauce Labs.

Some examples in this repository, such as appium-examples and headless-examples, may require a different account tier beyond free trial. Please contact the Sauce Labs Sales Team for support and information.


Solution Outline


Prerequisites

In order to complete these exercises you must complete the following prerequisite installation and configuration steps:

Detailed Instructions located in the prerequisites file.

*NOTE: All code here is written in Python 3, and is not guaranteed to work with Python 2. It is strongly, strongly recommended you either migrate to Python 3.5+ if you are using Python 2, or get started using Python 3.5+.

Try Demo in Gitpod

Select the button below to try this demo in Gitpod

Open in Gitpod

After the gitpod session launches, navigate to the terminal and run the following commands to save your Sauce Labs Credentials to gitpod as environment variables:

eval $(gp env -e SAUCE_USERNAME=******)
eval $(gp env -e SAUCE_ACCESS_KEY=******)

Click the following link if you're unsure how to access your Sauce Labs credentials. Also, if you start a new terminal in gitpod, you have to run the following command to reset envrionment variables:

eval $(gp env -e)

For more information consult the gitpod documentation


Run the Onboarding Scripts

If you would like to get started with using Python and Sauce Labs with some guidance, please look at the Onboarding scripts provided in the on-boarding-modules directory.


Run the Sauce Examples

In addition to onboarding, we have also included some samples of using Sauce Labs with some common Python test tools. In particular, we have examples using

  • Pytest
  • Robotframework

and these cover using

  • Sauce Labs Virtual Device Cloud (VDC), which includes desktop browsers and emulator/simulator devices (EMUSIM)
  • Sauce Labs Real Device Cloud (RDC).

These samples are executed using Pipenv for simplicity. You can find a list of available executions in the Pipfile for executing tests written in the test tools. These executions demonstrate how to run tests in parallel on the various Sauce Labs platforms.

The organization of these samples are as follows:

-- driver (appium or selenium) 
   |- test tooling
      |- test environment (virtual or real devices)
         |- additional resources needed (if any)
            |- sample test framework

For example, to run tests with pytest:

sudo pip install pipenv
pipenv install
pipenv run pytest-vdc-us

demo-python's People

Contributors

joshmgrant avatar mehmetg avatar mehmetg-sauce avatar ndmanvar avatar neilgoldman avatar tacktician avatar titusfortner 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.