Giter Site home page Giter Site logo

stratum's Introduction

Stratum

Stratum test server

Status

Build Status Coverage Status Codacy Badge

Stubbing Server

This is a simple Play application that exposes a REST API simulating the service provided by ********. The intention is to deploy this server as a drop-in replacement for the real service, allowing integration testing of client application, avoiding the charges and providing canned happy-path and error case responses.

Running locally

Run the server on a local system, with source change monitoring / automatic restarting

% sbt ~run

Sample usage

POST translation request

curl -X POST -d \
 '{"text": "We strongly advise you to keep your luggage with you at all times. Any unattended luggage in the terminal will be removed by the security services and may be destroyed", "language" : "de", "requestType" : "TEXT"}' \
 -H "Content-Type: application/json" \
 -H "Accept: application/json" \
 http://localhost:9000/api/translate?apiKey=eabb12404d141ed6e8ee2193688178cb

GET speech request

http://localhost/api/speech?apiKey=eabb12404d141ed6e8ee2193688178cb&action=convert&text=say%20this&voice=usenglishfemale&format=mp3

Testing

Running the tests

Run the test suite to verify correct behaviour.

From the command line:

% sbt test

Test Coverage Report

To measure test coverage, this app uses the 'scoverage' SBT plugin. To create the report, rom the command line:

% sbt coverage test coverageReport

Author

License

License

(c) 2018 This project is licensed under Creative Commons License

Attribution 4.0 International (CC BY 4.0)

stratum's People

Contributors

sothach avatar

Watchers

James Cloos 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.