Setting Up Your Performance Test Environment (Windows + Ubuntu)

Before building performance test plans, you need to set up a robust environment. This guide will walk you through the installation of JavaApache JMeterPythonGitand Chrome/Firefox, as well as configuring proxy and SSL certificates on both Windows and Ubuntu.

Prerequisites
RequirementUbuntu (Linux)Windows
OSUbuntu 20.04+Windows 10/11
InternetRequiredRequired
Permissionssudo userAdmin privileges
Terminal AccessTerminalPowerShell or CMD

Step-by-Step Installation

1. Install Java JDK 17
Ubuntu Terminal CommandWindows Instructions
sudo apt install openjdk-17-jdk -yDownload from Adoptium, install it
java -versionConfirm via java -version in Command Prompt
echo 'export JAVA_HOME=...' >> ~/.bashrcSet JAVA_HOME via System Properties → Environment Variables
2. Install Apache JMeter (v5.6.3)
UbuntuWindows
wget https://downloads.apache.org//jmeter/binaries/apache-jmeter-5.6.3.tgzDownload the zip file from JMeter site
tar -xvzf apache-jmeter-5.6.3.tgz && sudo mv apache-jmeter-5.6.3 /opt/jmeterExtract to C:\JMeter\apache-jmeter-5.6.3
Add to PATH in .bashrcAdd C:\JMeter\apache-jmeter-5.6.3\bin to Environment Variables → PATH
Run with jmeterRun jmeter.bat from the bin folder
3. Install Google Chrome & ChromeDriver
UbuntuWindows
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.debDownload Chrome from google.com/chrome
sudo apt install ./google-chrome*.debInstall Chrome like any other EXE
Download matching ChromeDriver manually or via scriptDownload ChromeDriver from here
Move ChromeDriver to /usr/local/binUnzip and place chromedriver.exe in C:\Tools or add to PATH
4. Install Python 3 and pip
UbuntuWindows
sudo apt install python3 python3-pip -yDownload from python.org, and check “Add to PATH” during installation
python3 --version, pip3 --versionUse python --version and pip --version in CMD

5. Install Git
UbuntuWindows
sudo apt install git -yDownload and install from git-scm.com
6. Install Firefox & Set Proxy for Recording
UbuntuWindows
sudo apt install firefox -yDownload from mozilla.org
Open Firefox > Settings > Network SettingsSame path: Firefox > Settings > Network Settings
Manual Proxy: localhost:8888Manual Proxy: localhost:8888
Check “Use for all protocols”Same checkbox
7. Configure JMeter Proxy & SSL CertificateWorks identically on both platforms:
  1. Launch JMeter GUI
  2. Go to Templates → Recording → Create
  3. Start HTTP(S) Test Script Recorder
  4. JMeter creates a file: ApacheJMeterTemporaryRootCA.crt in bin/
  5. Open Firefox → Settings → Privacy & Security → Certificates
  6. Click View Certificates → Authorities → Import
  7. Select ApacheJMeterTemporaryRootCA.crt and trust it

Now Firefox will work with JMeter’s HTTPS proxy.

Final Test

To verify everything:

  • Open JMeter and start recording
  • Set the browser proxy to localhost:8888
  • Visit a website like https://example.com
  • Traffic should appear in JMeter if the certificate is trusted
Optional Script for Ubuntu

Create setup_performance_env.sh and paste this:

#!/bin/bash
sudo apt update && sudo apt install openjdk-17-jdk wget unzip git python3 python3-pip firefox -y

echo 'export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64' >> ~/.bashrc
wget https://downloads.apache.org/jmeter/binaries/apache-jmeter-5.6.3.tgz
tar -xvzf apache-jmeter-5.6.3.tgz
sudo mv apache-jmeter-5.6.3 /opt/jmeter
echo 'export JMETER_HOME=/opt/jmeter' >> ~/.bashrc
echo 'export PATH=$PATH:$JMETER_HOME/bin' >> ~/.bashrc
source ~/.bashrc

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome-stable_current_amd64.deb -y

CHROME_VERSION=$(google-chrome --version | grep -oP '\\d+\\.\\d+\\.\\d+')
CHROMEDRIVER_VERSION=$(curl -s "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROME_VERSION")
wget https://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip
unzip chromedriver_linux64.zip
sudo mv chromedriver /usr/local/bin/
sudo chmod +x /usr/local/bin/chromedriver

Run:

chmod +x setup_performance_env.sh ./setup_performance_env.sh
ToolLink
Java JDK 17https://adoptium.net/en-GB/temurin/releases/?version=17
Apache JMeterhttps://jmeter.apache.org/download_jmeter.cgi
ChromeDriverhttps://sites.google.com/chromium.org/driver/
Firefoxhttps://www.mozilla.org/en-US/firefox/new/
Pythonhttps://www.python.org/downloads/
Githttps://git-scm.com/downloads

What’s the biggest challenge you foresee in managing performance test environments across both Windows and Linux?
Think about permission handling, scripting automation, and environment variable management.

Here’s a PowerShell script for Windows that sets up a basic performance test environment, including:

  • Installing JDK 17
  • Downloading and extracting Apache JMeter
  • Downloading Chrome and ChromeDriver
  • Installing Python and Git

Note: Some steps still require manual confirmation (e.g., Firefox proxy, SSL cert import). But this script automates everything else to the extent permitted by Windows.


PowerShell Script: Setup-PerformanceEnv.ps1 (for Windows 10/11)
# PowerShell script to install JDK, JMeter, ChromeDriver, Git, and Python

$ErrorActionPreference = "Stop"

# Set base folder
$baseDir = "$env:USERPROFILE\PerformanceTools"
New-Item -ItemType Directory -Force -Path $baseDir | Out-Null
Set-Location $baseDir

Write-Host "🔧 Installing performance testing tools to $baseDir"

# ---- 1. Install JDK 17 ----
Write-Host "📦 Downloading JDK 17..."
$jdkUrl = "https://github.com/adoptium/temurin17-binaries/releases/latest/download/OpenJDK17U-jdk_x64_windows_hotspot_17_latest.msi"
$jdkInstaller = "$baseDir\jdk17.msi"
Invoke-WebRequest -Uri $jdkUrl -OutFile $jdkInstaller
Start-Process -FilePath "msiexec.exe" -ArgumentList "/i `"$jdkInstaller`" /quiet" -Wait

# Set JAVA_HOME and update PATH
$jdkHome = "C:\Program Files\Eclipse Adoptium\jdk-17"
[System.Environment]::SetEnvironmentVariable("JAVA_HOME", $jdkHome, "Machine")
$env:Path += ";$jdkHome\bin"
[System.Environment]::SetEnvironmentVariable("Path", $env:Path, "Machine")

# ---- 2. Install Apache JMeter ----
Write-Host "📦 Downloading Apache JMeter..."
$jmeterUrl = "https://downloads.apache.org//jmeter/binaries/apache-jmeter-5.6.3.zip"
$jmeterZip = "$baseDir\apache-jmeter.zip"
$jmeterDir = "$baseDir\apache-jmeter-5.6.3"
Invoke-WebRequest -Uri $jmeterUrl -OutFile $jmeterZip
Expand-Archive -Path $jmeterZip -DestinationPath $baseDir -Force
[System.Environment]::SetEnvironmentVariable("JMETER_HOME", $jmeterDir, "Machine")
[System.Environment]::SetEnvironmentVariable("Path", "$env:Path;$jmeterDir\bin", "Machine")

# ---- 3. Install Chrome & ChromeDriver ----
Write-Host "🌐 Downloading Chrome..."
Start-Process -FilePath "msedge.exe" -ArgumentList "https://www.google.com/chrome/" -Wait

Write-Host "⬇️ Downloading ChromeDriver..."
$chromeVersion = (Invoke-WebRequest "https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json").Content | ConvertFrom-Json
$driverUrl = $chromeVersion.channels.Stable.downloads.chromedriver | Where-Object {$_.platform -eq "win64"} | Select-Object -ExpandProperty url
$driverZip = "$baseDir\chromedriver.zip"
Invoke-WebRequest -Uri $driverUrl -OutFile $driverZip
Expand-Archive -Path $driverZip -DestinationPath "$baseDir\chromedriver" -Force
$driverExe = Get-ChildItem -Path "$baseDir\chromedriver" -Recurse -Filter chromedriver.exe | Select-Object -First 1
Copy-Item $driverExe.FullName -Destination "C:\Windows\System32"

# ---- 4. Install Python ----
Write-Host "🐍 Installing Python..."
$pythonUrl = "https://www.python.org/ftp/python/3.12.2/python-3.12.2-amd64.exe"
$pythonInstaller = "$baseDir\python-installer.exe"
Invoke-WebRequest -Uri $pythonUrl -OutFile $pythonInstaller
Start-Process -FilePath $pythonInstaller -ArgumentList "/quiet InstallAllUsers=1 PrependPath=1" -Wait

# ---- 5. Install Git ----
Write-Host "🔁 Installing Git..."
$gitUrl = "https://github.com/git-for-windows/git/releases/latest/download/Git-2.44.0-64-bit.exe"
$gitInstaller = "$baseDir\git-installer.exe"
Invoke-WebRequest -Uri $gitUrl -OutFile $gitInstaller
Start-Process -FilePath $gitInstaller -ArgumentList "/VERYSILENT" -Wait

# ---- 6. Firefox Manual Instructions ----
Write-Host "`n🌐 Download Firefox manually from: https://www.mozilla.org/en-US/firefox/new/"
Write-Host "📌 After installing Firefox:"
Write-Host "- Set Manual Proxy: localhost:8888"
Write-Host "- Import JMeter certificate: ApacheJMeterTemporaryRootCA.crt (generated after running recorder)"

Write-Host "`n✅ Environment setup complete. Please restart your machine or open a new PowerShell window."

How to Run This Script on Windows
  1. Open PowerShell as Administrator
  2. Allow script execution temporarily:

Set-ExecutionPolicy RemoteSigned -Scope Process

  1. Save the script as Setup-PerformanceEnv.ps1 and run:

.\Setup-PerformanceEnv.ps1

What This Script Doesn’t Do (Manual Steps Required):
  • Set Firefox proxy settings (must be done via Firefox GUI)
  • Trust the JMeter certificate in Firefox (Tools → Settings → Certificates → Authorities → Import)

About the author 

PoojaBharat

Our mission on this planet is to help you in leaving the past behind and creating the future with you, so you can live happily in the present and embark on the journey of fulfilling life.

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
Subscribe to get the latest updates
>