I have deployed jmeter in kubernetes by using
https://github.com/kubernauts/jmeter-kubernetes
But I am facing difficulties when I want to integrate selenium webdriver with jmeter. I am able to install selenium packages within the docker using
RUN cd /jmeter/apache-jmeter-$JMETER_VERSION/ && wget -q -O /tmp/jpgc-webdriver-3.3.zip https://jmeter-plugins.org/files/packages/jpgc-webdriver-3.3.zip && unzip -n /tmp/jpgc-webdriver-3.3.zip && rm /tmp/jpgc-webdriver-3.3.zip
But how to install chromedriver within docker. There is no official documentation for jmeter on this and I am new to jmeter. I really appreciate if anyone would guide me on this.
There is no official documentation for JMeter because JMeter doesn't support Selenium
You should look into official documentation for Chromedriver and Docker
Given you were able to come up with RUN directive to download and unpack WebDriver Sampler plugin you should be able to do the same with the Chromedriver, like:
RUN wget -q -O /tmp/chromedriver.zip https://chromedriver.storage.googleapis.com/87.0.4280.20/chromedriver_linux64.zip && unzip /tmp/chromedriver.zip && rm /tmp/chromedriver.zip && mv chromedriver/tmp
You will also need to change the ENTRYPOINT to set webdriver.chrome.driver JMeter system property like -Dwebdriver.chrome.driver=/tmp/chromedriver
Related
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.
Converting the jmeter desktop application to webapp using webswing, java web start but was not successful in that.
Running the jmeter jar directly in rest controller to launch it as webapp but it did not launch as webapp.
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
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:
Build the image:
docker build -t jmeter .
Run the image as the container:
docker run -it --rm -p 8080:8080 jmeter
Open http://localhost:8080/vnc.html URL in your browser (must be Websocket-capable)
You will see a virtual desktop with JMeter
More information: Get Started With JMeter: Installation & Tests
I am having trouble building an image on Docker when trying to install Berryconda. I need to accept the terms and conditions before I can continue (as shown in the image below). Has anyone experienced this issue before and knows how to tackle this scenario?
Berryconda T&C
Berryconda installation portion of the Dockerfile
RUN : \
&& echo "Installing Berryconda" \
&& wget -O berryconda3-2.0.0.sh "https://github.com/jjhelmus/berryconda/releases/download/v2.0.0/Berryconda3-2.0.0-Linux-armv7l.sh" \
&& chmod +x berryconda3-2.0.0.sh \
&& ./berryconda3-2.0.0.sh /usr/bin/berryconda3
You should be able to run the Berryconda install script with the -b argument to execute the script in batch mode.
-b run install in batch mode (without manual intervention),
it is expected the license terms are agreed upon
The available command line arguments for the installer are described near the top of the install script.
I want to run vscode in docker for internal test, i've created the following
FROM debian:stable
RUN apt-get update && apt-get install -y apt-transport-https curl gpg
RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg \
&& install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/ \
&& echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list
RUN apt-get update && apt-get install -y code libx11-xcb-dev libasound2
RUN code --user-data-dir="~/.vscode-root"
I use to build
docker build -t vscode .
I use to run
docker run vscode code -v
when I run it like this I got error
You are trying to start vscode as a super user which is not recommended. If you really want to, you must specify an alternate user data directory using the --user-data-dir argument.
I just want to verify it by running something like RUN code -v how can I do it ?
should I change the user ? I just want to run vscode in docker and use some vscode apis
Have you tried using VSCode's built in functionality for developing in a container?
Checkout this page which describes how to do this:
Developing inside a Container
You can try out some of the sample container configurations provided by VSCode and use any of those devcontainer.json files as an example to configure a custom development container to your liking. According to the page above:
Workspace files are mounted from the local file system or copied or cloned into the container. Extensions are installed and run inside the container, where they have full access to the tools, platform, and file system. This means that you can seamlessly switch your entire development environment just by connecting to a different container.
This is a very handy way to have different environments for development that are isolated within the container.
I am trying to have a distributed load testing POC using Jmeter. I have followed tutorial mentioned in this medium article - link
The repo for the code is here - https://github.com/vepo/jmeter-docker
Since the Jmeter version used in the tutorial link is 3.3, I changed the Dockerfile inside jmeter-base to pull the most recent version 5.5.1
New Dockerfile inside jmeter-base :
FROM java:8
RUN mkdir /jmeter \
&& cd /jmeter/ \
&& wget http://mirrors.estointernet.in/apache//jmeter/source/apache-jmeter-5.1.1_src.tgz \
&& tar -xvzf apache-jmeter-5.1.1_src.tgz \
&& rm apache-jmeter-5.1.1_src.tgz
ENV JMETER_HOME /jmeter/apache-jmeter-5.1.1/
# Add Jmeter to the Path
ENV PATH $JMETER_HOME/bin:$PATH
I have not made any other changes in the dockerfile.
As per the readme, when I run the command ./exec-jmeter.sh 4 (4 being the count of slaves), I keep getting this error
/bin/bash: ../bin/jmeter: No such file or directory
I tried with the full path like -
../jmeter/apache-jmeter-5.1.1/bin/jmeter, and also ../jmeter/bin/jmeter but I still keep getting the same error.
What am I doing wrong here.
You are downloading the JMeter source, not the JMeter build tar.gz.
Now I had updated the repo with the JMeter 5.1.1, but the Test Plan is not compatible anymore.
I'm using the dotnet-sdk image and would like to install AWS CLI into it - but no pip, unzip, or even the setuptools Python module is available.
How can I get the AWS CLI tools going?
Got it going - forgot to chmod+x. You can do the following:
curl -sL "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
python -m zipfile -e awscli-bundle.zip .
chmod +x ./awscli-bundle/install
./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws