Git Product home page Git Product logo

ups-test-suite's Introduction

Unified Push Server Test Suite

Some tools and scripts for a UPS test suite

Mocked Data

A tool to produce mock data (push applications, variants and tokens) can be found into the ups-test-suite/mock-data-loader folder.

Automation Tools

WireMock

In order to stress-testing we must not talk directly to FCM, but to a mocked server that is provided by WireMock tool.

Artillery

Artillery is a command-line load testing tool that will send requests directly to UPS's REST API.

Usage

First step is to install and startp up the mocked FCM server. In order to do it, cd to the path where you want to install it and run:

bash <(curl https://gist.githubusercontent.com/josemigallas/9577750d09f87aaaa570c64d5ce8b58e/raw/83124a8596c93a862bcaefbb2dad4522c5d60828/Start%2520Up%2520WireMock)

This script will create the server and start it. To start it again use:

java -jar path/to/server/wiremock-standalone-2.4.1.jar --port 3000

Once it is running, start your UPS setting -Dcustom.aerogear.fcm.push.host parameter with the fake URL:

path/to/jboss/bin/standalone.sh -b 0.0.0.0 --server-config=standalone-full.xml -Dcustom.aerogear.fcm.push.host=http://localhost:3000/fcm/send

Note: in case you need to install a local UPS follow the installation guide.

And that's it, any notification request will be sent to the mocked backend.

Next step is run the actual load tests. Firstly install Artillery:

npm install -g artillery

Then download the ups-artillery.yml file and simply run it:

artillery run ups-artillery.yml

Note: modify the YAML file the way it suits your spec. Authorization header must be filled with "appId:secret" b64 encoded. More info in the artillery documentation.

ups-test-suite's People

Contributors

josemigallas avatar matzew avatar ziccardi 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.