Coder Social home page Coder Social logo

hto's Introduction

Hosted Test Orchestration Examples

Sauce Labs has an exciting new feature for running your tests with Hosted Orchestration

This mono-repo has example code in Java & Python (more language examples soon) for how to run a small set of tests locally, remotely on Sauce Labs, and hosted by Sauce Labs for comparison.

Prerequisites

Sauce Labs

  1. Get your username and access key
  2. Set an environment variable for Sauce Labs Username as SAUCE_USERNAME
  3. Set an environment variable for Sauce Labs Access Key as SAUCE_ACESS_KEY

Docker Hub

  1. Create an account
  2. Set an environment variable for Docker Hub Username as DOCKER_USERNAME
  3. Set an environment variable for Docker Hub Password as DOCKER_PASSWORD

Git

  1. Install Git

Download this code

  1. Fork this Repo on GitHub
  2. Go to your new fork, click the big green "Code" button and copy the https line
  3. Make a new directory for your projects if you don't have one already
    mkdir ~/projects
  4. Clone from your fork onto your machine
    cd ~/projects
    git clone <LINK_COPIED_IN_STEP_2>

Install and Run Docker Desktop

  1. Download
  2. Open the application
  3. In a terminal run this to make sure it is running:
    docker info

If Docker is not running you get an error like:

ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Executing from Local Machine

You can only run one language at a time, so make sure you change directories into the language subdirectory, and check out the README:

Executing on Github Actions

This repo also defines workflows for kicking off tests from Github Actions.

  1. make sure you have properly forked this code to your own organization (instructions above)
  2. Add these secrets to github: (https://github.com/<YOUR_GITHUB_ORG>/hto/settings/secrets/actions)
    • SAUCE_USERNAME
    • SAUCE_ACCESS_KEY
    • DOCKER_USERNAME
    • DOCKER_PASSWORD
  3. Go to https://github.com/<YOUR_GITHUB_ORG>/hto/actions
  4. Click the workflow you want to execute on the left hand side
  5. Click the "Run Workflow" button on the right side and select "main"

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/saucelabs-training/hto.

License

The code is available as open source under the terms of the MIT License.

hto's People

Contributors

titusfortner avatar

Stargazers

 avatar

Watchers

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