Coder Social home page Coder Social logo

rollno748 / jmeter-onflyupdater Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 102 KB

A unique plugin to control Jmeter using REST APIs during the run.

License: MIT License

Java 100.00%
jmeter jmeter-plugins jmeter-scripting jmeter-onflyupdator jmeter-rest jmeter-plugin jmeter-tests jmeter-performance jmeter-api-controller jmeter-controller

jmeter-onflyupdater's Introduction

JMeter-OnFlyUpdater

Introduction

JMeter plugin to control Jmeter during the running status. This plugin adds feature to control jmeter over REST APIs

Required Components

  1. Jmeter
  2. Postman/cURL

Features

  • Get Plugin active status
  • Get Jmeter user status (active/running/stopped)
  • Get the list of properties from the running Jmeter (System/Jmeter)
  • Update one or more properties to running Jmeter (System/Jmeter)
  • Update Logger type to running Jmeter (OFF/FATAL/ERROR/WARN/INFO/DEBUG/TRACE/ALL)
  • Get All the threads info
  • Add/Remove users/threads to specific threadgroup(s). Supports multiple updation at single call
  • Get info releated to specific threadgroup(s)
  • Update info to specific threadgroup(s)
  • Get list of variables from one or more threads
  • Update variables to one or more threads
  • Get elements from the running test (Listeners)
  • Enable/Disable elements to the running test (ThreadGroups/Listeners/ConfigElements etc)
  • Stops the test - Supports both gradual and abrupt
  • Get Slaves Info
  • Send Stop signals to specific/all slaves

Jar Dependencies Required

  • spark-core-2.8.0.jar
  • gson-2.2.4.jar

Jmeter Target

  • Jmeter version 5.1.1 or above
  • Java 8 or above

Installation Instructions

  • Download the source code from the Github.
  • Just do a mvn clean install (Git bash is required)
  • Jar will be generated under the target directory (jmeter-onfly-updater-0.1.jar)
  • Copy the Jar to \<Jmeter Installed Directory\>/lib/ext/

How to use it

Add required config element (On-Fly-Updater config)

  • Set a password for authentication (Default password will be Upd@t3M3)
  • Set the Port number on which the Spark Services to run (Optional, Defaults to 1304)
  • Set the URI path (Optional, Defaults to /on-fly)
  • Once the test started, the Spark server will start a REST server according to the config provided. The default will be http://127.0.0.1:1304/on-fly/
  • The Rest services supported are as follows. e.g; http://localhost:1304/on-fly/ping
  • The On-Fly Updater will have a credentials based control to the REST services. It requires a password header to be passed with the REST services.

Supported REST Services

Service HTTP Method URI QueryParams ReqBody Status
PluginRunningStatus GET /{URI-PATH}/ping NA Completed
GetStatus GET /{URI-PATH}/status NA Completed
SetLogger PUT /{URI-PATH}/logger/{logType} WARN/ERROR/DEBUG/OFF Completed
GetProperties GET /{URI-PATH}/properties?type={type} jmeter/system Completed
UpdateProperties PUT /{URI-PATH}/properties NA Completed
GetThreads GET /{URI-PATH}/threads NA Completed
UpdateThreads PUT /{URI-PATH}/threads NA Completed
GetThreadGroupsList PUT /{URI-PATH}/threadgroups NA Completed
UpdateThreadGroups PUT /{URI-PATH}/threadgroups NA Completed
GetJmeterVariables GET /{URI-PATH}/vars NA Completed
UpdateJmeterVariables PUT /{URI-PATH}/vars NA Completed
GetElements GET /{URI-PATH}/elements NA Completed
UpdateTestElement PUT /{URI-PATH}/elements NA Not Started
StopTest POST /{URI-PATH}/stoptest?action={action} shutdown/stop Completed
Slaves GET /{URI-PATH}/slaves NA Completed
StopTest-Slaves POST /{URI-PATH}/slaves/stoptest?action={action} shutdown/stop Needs Validation

Additional Info

Some more info on the plugin

  • The REST services will be active only during the test. The End of test will terminate the REST services
  • Plugin Running status also initialised during the test
  • Observed some abnormal behavior on the plugin when the test is restarted without killing the JMeter JVM

Known Issues

  • Updating thread groups is working, response is not retrieved from the server
  • Updating test element in the testplan is not working
  • Sending signals to slaves is not working

References

Tools Used

๐Ÿ’ฒ Donate

๐Ÿ’ฒ Support Me

If this project help you reduce time to develop, you can give me a cup of coffee :)

paypal

Please rate a ๐ŸŒŸ if you like it / benefits you.

Please open up a ๐Ÿชฒ - If you experienced something.

jmeter-onflyupdater's People

Contributors

mi185051 avatar rollno748 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

jmeter-onflyupdater's Issues

Issue with Updating Threads

Updating threads with running thread has below issues.

  • Add Threads to threadgroup is not working
  • The thread removal is working fine for the testplan having only one threadgroup
  • For the test plan having multiple threadgroups, it is removing threads only for the last threadgroup
  • Add/removal of threads to specific threadgroup is not working

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.