Giter Club home page Giter Club logo

ministryofjustice.prepare-a-case-gatling-performance-tests's Introduction

gatling-maven-plugin-demo

Simple showcase of a maven project using the gatling-maven-plugin.

To test it out, simply execute the following command:

$mvn gatling:test -Dgatling.simulationsClass=simulations.ProbationRecordScreen

or simply:

mvn clean gatling:test -DUsers=1 -DDuration=1 -DEnv=preprod -DThinkTime=5 -DDate=2021-03-30 -DUsername= -DPassword=

-DUSER => This will allow the test to run with 1 user via the terminal command prompt. 
-DDuration => This will allow the test to run for 1 minute via the terminal command prompt. - we normally specify that it should be a 10 minute test.
-DEnv=preprod => This will allow the tests to be ran against the preprod enviroment. - In previous tests we tested against 'preprod'.
-DDate=2021-03-30 => This will allow for the front-end to show cases against the given date. It will auto input 2021-03-30 if nothing is specified on cmd line. 
This date is chosen as auto as it has suffecient data across all courts for tests to be ran.
-DThinkTime=5 => This will allow for the test to be ran with pauses of 5 seconds inbewteen requests.
This is what is done to mimic real user actions via the front end. NOTE: For debugging we rn with either 0 or 1. 

We can see response times for the requests within the /results directory, when opening this, find the date and time you ran the test You will then see a file named 'index.html' if you open this, it will show reports from the run.

NOTE

If data refresh or enviroment changes made, user credentials may be affected. If this occurs either update the user details in prepare-a-case-gatling-performance-tests\src\test\resources\data\mined-data\users OR insert new details over the top of old (requires a username and password that works on the front-end).

NOTE

If the date chosen on cmd line or enviroment changes effects data on 2021-03-30 front-end. Data will need to be put on to the front-end for a date on every court for the tests not to fail due to data.

Build and run Docker image locally

If making changes to the docker image you can build and run these locally using the following commands:

docker build ./ -t prepare-a-case-gatling-performance-tests

You will need to retrieve the AWS S3 access details from the kubernetes cluster secret to run the tests with the following command:

docker run -e AWS_ACCESS_KEY_ID={ACCESS_KEY_ID} -e AWS_SECRET_ACCESS_KEY={SECRET_ACCESS_KEY} -e S3_BUCKET_NAME={S3_BUCKET_NAME} prepare-a-case-performance-test:latest

ministryofjustice.prepare-a-case-gatling-performance-tests's People

Contributors

haseebnawazk avatar jhevans 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.