GithubHelp home page GithubHelp logo

automationhacks / grasp-grpc Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 139 KB

Ports routeguide example service from grpc-java repository and adds functional and non functional API tests

License: MIT License

Java 99.78% Python 0.22%
api-testing grpc grpc-java testing

grasp-grpc's Introduction

grasp-grpc

Running load test

Start locust master on local

pip3 install pipenv

# One time setup
# Set below in .zshrc or .bash_profile depending upon the type of shell you are using
export WORKON_HOME=~/virtualenvs
export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python3
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8

# Start pipenv shell such that a virtualenv is created which has locust python module already installed
pipenv shell

# Start locust master on local
locust -f locust_master.py --master --master-bind-host=127.0.0.1 --master-bind-port=5557
[2024-05-26 12:22:02,412] Gauravs-Laptop/INFO/locust.main: Starting web interface at http://0.0.0.0:8089
[2024-05-26 12:22:02,416] Gauravs-Laptop/INFO/locust.main: Starting Locust 2.28.0

Ensure all relevant proto files are generated by executing below (you only need to run this if you've made some changes to the proto)

./gradlew installDist

Start gRPC server

./build/install/grasp-grpc/bin/route-guide-server
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
May 25, 2024 10:39:06 PM io.automationhacks.routeguide.RouteGuideServer start
INFO: Server started, listening on 8980

Start locust slave by running the main function

RouteGuideLoadGen.java

public static void main(String[] args) {
    new RouteGuideLoadTest().getFeatureLoad();
}

Now you can go to the locust master URL and start your load test using locust UI

References

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.