GithubHelp home page GithubHelp logo

ansible-selenium-setup's Introduction

Setup a server able to run Selenium tests and notify via email&phone in case of failure.

Definitions

Control machine = the machine Ansible will run on (your local dev machine)

Client machine = the machine that Selenium will be setup on

Notes

This was tested with Client machines running Ubuntu 16.04.3. Other releases should work. Other distributions were not tested.

Some deprecation warnings (caused by upstream code) might be thrown. They can be ignored.

One of the Ansible tasks ("Register systemd service status") will fail. Can be ignored.

What you will need

  1. A Sendgrid account and it's API credentials (Full Access)
  2. A Twilio account and it's API crendetials and phone number
  3. A fresh server that you are able to SSH to (the Client machine)

SETUP: Control machine setup

Ensure you have Ansible installed

a. On Ubuntu, run:

sudo easy_install pip

sudo pip install ansible

Other OSs, check http://docs.ansible.com/ansible/latest/intro_installation.html

b. Confirm Ansible works ok by running:

ansible --version

c. Ensure all Ansible roles are available on the Control machine by running the following command on your Control machine, in the root of this repo:

ansible-galaxy install -r requirements.yml

Once the Control machine is ready:

a. Add the IP(s) of the client machine(s) to the hosts file (in the root directory of this repo), under [test_runners]. Each IP on a new line.

b. Change the client_user in vars/main.yml to the username you created on the Client machine

c. Add the credentials for Sendgrid and Twilio (get them from https://www.twilio.com/console/sms/dashboard) to vars/main.yml

d. Add the emails that will be notified to send_email_notifications_to in vars/main.yml, comma separated

e. Add the phone numbers that will be notified to send_sms_notifications_to in vars/main.yml, comma separated

SETUP: Client machine setup

Start the Client machine setup by running the following command on your Control machine, in the root of this repo:

ansible-playbook provision.yml

Adding a test suite for a new project to an already deployed server

ansible-playbook create_test_suite.yml

Uploading tests

To upload new tests to the test server, run:

ansible-playbook upload_tests.yml

ansible-selenium-setup's People

Contributors

adyg avatar

Watchers

 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.