GithubHelp home page GithubHelp logo

onlykumarabhishek / selenium-ui-testing-with-aws-lambda-layers Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yai333/selenium-ui-testing-with-aws-lambda-layers

0.0 0.0 0.0 11 KB

Selenium UI testing with AWS Lambda Layers

Python 100.00%

selenium-ui-testing-with-aws-lambda-layers's Introduction

Selenium UI testing with AWS Lambda Layers

This is an example of set up Selenium testing with AWS lambda layers Python3.6

File Structure

  • seleniumLayer - Selenium
  • lambda
── /seleniumLayer/  # lambda layers
  ├── /selenium  lambda layer of selenium lib
  │  └──/python/      # python libs
  │   └── /lib/    
  │     └── /python3.6/*    
  ├── /chromedriver/    # lambda layer of headless Chrome 
  │ ├── /chromedriver   # chrome driver
  │ └── /headless-chromium # headless chrome binary
  └── /serverless.yaml     
── /lambda/            # lambda function
  ├── /handler.py      # source code of lambda function 
  └── /serverless.yaml # serverless config

Stack

Install

Go to root directory of project

# download Selenium 2.37
$ pip3.6 install -t seleniumLayer/selenium/python/lib/python3.6/site-packages selenium==2.37

# download chrome driver
$ cd seleniumLayer
$ mkdir chromedriver
$ cd chromedriver
$ curl -SL https://chromedriver.storage.googleapis.com/2.37/chromedriver_linux64.zip > chromedriver.zip
$ unzip chromedriver.zip
$ rm chromedriver.zip

# download chrome binary
$ curl -SL https://github.com/adieuadieu/serverless-chrome/releases/download/v1.0.0-41/stable-headless-chromium-amazonlinux-2017-03.zip > headless-chromium.zip
$ unzip headless-chromium.zip
$ rm headless-chromium.zip

Install serverless command

Do this if you don't have serverless in your machine yet

npm config set prefix /usr/local
and then,
npm i -g serverless

Deploy Lambda Layers

Go to root directory of project

$ cd seleniumLayer
$ sls deploy 

Deploy Lambda Function

Go to root directory of project

$ cd lambda
$ sls deploy 

Start Testing

Go to root directory of project

$ cd lambda
$ sls invoke --function hello

selenium-ui-testing-with-aws-lambda-layers's People

Contributors

yai111 avatar yai333 avatar kumarcode avatar ricalanis 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.