0

As we know JMeter is desktop based application which will get launched in our OS and we can use it to do performance testing but what if I want to use it as web application rather than desktop application.

How can I use Jmeter desktop application as web app and expose this on some port ?

I tried following but none of them launched Jmeter as webapp.

  1. Converting the jmeter desktop application to webapp using webswing, java web start but was not successful in that.
  2. Running the jmeter jar directly in rest controller to launch it as webapp but it did not launch as webapp.
  3. Also tried to run the jmeter docker image but that also did not help.

Can anyone please tell me ? do we have web app of jmeter or web version of jmeter so that I can use it as webapp and access it from web browser via some port ? like this localhost:8080/jmeter

Ori Marko
  • 56,308
  • 23
  • 131
  • 233
ss-ss-v1
  • 71
  • 2
  • 16

1 Answers1

4

Currently running JMeter as a "pure" web application is not possible, however if all you need to do is to make JMeter GUI available to yourself or someone else via a web interface/browser you can install JMeter into a Docker container and expose the virtual desktop via i.e. noVNC so you (or someone else) will be able to open specific hostname/port in the browser and see JMeter GUI and create, edit or debug a script.

Example Dockerfile:

FROM uphy/novnc-alpine
RUN \
    apk add --no-cache curl openjdk8-jre bash \
    && curl -L https://archive.apache.org/dist/jmeter/binaries/apache-jmeter-5.4.1.tgz >  /tmp/jmeter.tgz \
    && mkdir -p /opt \
    && tar -xvf /tmp/jmeter.tgz -C /opt \
    && rm /tmp/jmeter.tgz \
    && cd /etc/supervisor/conf.d \
    && echo '[program:jmeter]' >> supervisord.conf \
    && echo 'command=/opt/apache-jmeter-5.4.1/bin/./jmeter' >> supervisord.conf \
    && echo 'autorestart=true' >> supervisord.conf

So given you follow next steps:

  1. Build the image:

    docker build -t jmeter .
    
  2. Run the image as the container:

    docker run -it --rm -p 8080:8080 jmeter
    
  3. Open http://localhost:8080/vnc.html URL in your browser (must be Websocket-capable)

  4. You will see a virtual desktop with JMeter

    enter image description here

More information: Get Started With JMeter: Installation & Tests

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • Hi Dmitri, Thanks for the great solution! I have question, in this vnc.html page, can we remove followings 1. extra grey color space and black color space, 2. in the left hand side there is a noVNC button which has some settings, 3. in the down side of this page, there is a workspace 1,2,3,4, it would be great if these above 3 extra things can be removed. can you please help me in that ? I want to see this vnc.html page just like you , is it possible? Thanks in advance. – ss-ss-v1 May 07 '21 at 07:31
  • Hi Dmitri, this is the result that I am getting (screenshot)-> https://ibb.co/sRM63tM – ss-ss-v1 May 07 '21 at 07:43
  • This is not a code writing service, I didn't gave you the fish, I provided information regarding how to fish, you can either start JMeter in maximized mode or consider amending the dockerfile to expose JMeter in so called [kiosk mode](https://ubuntu.com/tutorials/secure-ubuntu-kiosk#1-overview) – Dmitri T May 07 '21 at 08:26