Git Product home page Git Product logo

screenshotservice's Introduction

Screenshot Service

The architecture diagram can be found in doc/architecture.png.

The RAML description of the service's REST endpoints can be found in doc/screenshot-service.html.

Required software

  • Docker Toolbox with docker-compose (docker engine 17.12.0+)
  • Postman (for manual REST requests)

Bring the docker containers online:

docker-compose up --build --scale selenium-chrome=5

This generates 5 containers:

builder_java

A small container with maven and JDK 11 installed, which takes the source code and generates the output EARs.

wildfly

The Wildfly application server, which deploys any EARs built in the shared volume by the 'builder_java' container.

selenium-hub

The Selenium hub that Wildfly will send requests to, that forwards to the browser-specific container.

selenium-chrome

The Google Chrome remote browser. Nothing will send requests to this directly, instead requests are sent to **selenium-hub** which will forward requests on to this container.

postgres

The PostgreSQL database container, used to persist requests and results. 

We also specify --scale selenium-chrome=5 in order to create 5 instances of the selenium-chrome container.

Execute the integration tests (in another window)

mvn clean install -Dts

This will execute some basic tests:

  • Send a valid POST request with 10 URLs, retrieve the response, retrieve the screenshot
  • Send an invalid POST request (with malformed URLs), and receive a 400 HTTP response
  • Send an invalid GET request for a job ID, and receive a 404 HTTP response
  • Send an invalid GET request for a screenshot file name, and receive a 404 HTTP response

screenshotservice's People

Contributors

zodac avatar dependabot[bot] avatar

Watchers

 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.