Skip to main content

Beginners tutorial -:working with JMeter in Mac and windows - Part-01

 


Prequisite 

you should have Java downloaded in your system with Home path set under environment variables.(as of today Java version 8 and higher are required fro jmeter ) for help check out this link

Note
Always run the jmeter on your secondary browser,  if you give the primary browser for proxy settings then your internet connection will be disrupted for the browser as well as system
For ex if you have chrome and firefox and your primary or default browser is chrome then do all the proxy setting in firefox so it won't hamper the system Internet connection 
if you have safari as your default browser in your mac os then set proxy in chrome/firefox 

MAC

Download jmeter from the link here

click on the hypelink under section Binaries  "Apache JMeter(5.3). tgz" file  for Mac  
Tar file will get downloaded


Double click on the tar file to unzip 

once you open the folder  got to bin and search for jmeter.sh file this is a executable file for Mac
open the terminal
 enter   ls. (it will give you list of folder/file  in your system)
enter  cd apache-jmeter-5.3
 enter  ls
enter  cd bin
enter  sh jmeter.sh

It will open jmeter in your system



A test plan folder will be visible 
Right click on Test plan folder ->Add->Non test elements->HTTPS(S) test script recorder 

click on start  it will give you a message 

You can go and check the same in bin folder

Download "jmeter plugin manager" from the link  and  click on the Jar File in "installation and usage" section    

once it gets downloaded unzip it and place the file in folder  Jmeter -> lib-> ext 


once you are done pasting the file in ext folder 
close and restart Jmeter
Check plugins manager option will be available

Preparing secondary  Browser ---Chrome/Firefox for JMeter

You can do the setting in any of the secondary browser available in your Mac system, I am mentioning all the steps for Both the browser for your convenience It will give you a message Apache JMeterTemporaryRootCA certification is generated in bin folder.

Chrome
Setting up proxy 
settings->search for proxy  and click Open your computer's proxy setting's

once the page is check web proxy(HTTP), Web proxy server  mention "localhost" and port "8089"(Your choice but it should be similar to what your are going to mention in jmeter)
Click Ok and then apply.
Port number should be similar to test script recorder
Note:- If you want you can keep default port 8888 but make sure in browser and script recorder it should  be same 

To install SSL certificate in your chrome browser
Unlike windows you do not need to install "apache jmeter temporary root CA" file to browser.

Now you are good to go with Jmeter,  and ready to record   you only need to change Target controller under Test plan creation as "Testplan->Thread group->recording controller"                                                                                                

Click on "start" button, you will get a window prompt for , which indicates that the recording is started

Now you can move on to browser where proxy is set , I am using Firefox here/
enter the url I am using "https://jmeter.apache.org/usermanual/" and go to few steps, once steps are done  you can "Stop" the recorder:Transactions control and check,  your steps will be recorded in recording controller



If you wanted to to do recording on another weblink you can simply add another recording controller
I have renamed it as "sample" ( the earlier recording we did has been renamed as "Java")
 Now to save new recording in "sample" you only need to change the path in
HTTPS test script recorder -> Target controller and select TestPlan>Thread Group>Sample. and you are good to go with recording the steps


More about this is discussed in next blog


Windows

Download jmeter from the link here
click on the hypelink under section Binaries  "Apache JMeter(version). zip" file  for windows  
to run jmeter in windows double click on "windows batch file" for jmeter. present in bin folder 


download "jmeter plugin manager" from the link  and  click on the Jar File in "installation and usage" section    
once it gets downloaded unzip it and place the file in folder  Jmeter -> lib-> ext 
once you are done pasting the file in ext folder 
close and restart Jmeter
Check plugins manager option will be available

download and paste "apache jmeter temporary root CA" file in  Jmeter  and place it in bin folder if its not generated automatically

Chrome
Setting up proxy 
settings->search for proxy  and click Open your computer's proxy setting's
page proxy will open  switch it off Automatically detect settings, Go to Manual proxy setup
switch it on "user a proxy server"    in place of address mention "http://localhost"    and port 8089 and save

To install SSL certificate in your chrome browser
settings-search for  cert and security option will be visible  click on security and go to manage certificate click on it and certificate window will open  click on Import and add file "apache jmeter temporary root CA" downloaded earlier

Firefox
Setting up proxy
options->search for proxy  and click on settings  in connection setting page click on Manual proxy configuration mention localhost in  HTTP proxy  and port 8089 and click on the checkbox also use this proxy in FTP and HTTPS

To install SSL certificate  in your firefox bowser
Options->in search box search for cert  click on view certificate  and certificate manager will open  click on Import and add file "apache jmeter temporary root CA" downloaded earlier








Comments

Popular posts from this blog

Cucumber - Execution of test cases and reporting

Before going through this blog please checkout blog on   Cucumber Fundamentals Cucumber is testing tool which implements BDD(behaviour driven development).It offers a way to write tests that  anybody can understand, regardless of there technical knowledge. It users Gherkin (business readable language) which helps to  describe behaviour without going into details of implementation It's helpful for  business stakeholders who can't easily read code ( Why cucumber tool,  is  called  cucumber , I have no idea if you ask me I could have named it "Potato"(goes well with everything and easy to understand 😂) Well, According to its founder..... My wife suggested I call it  Cucumber  (for no particular reason), so that's how it got its  name . I also decided to give the Given-When-Then syntax a  name , to separate it from the  tool . That's why it's  called  Gherkin ( small variety of a cucumber that's been pickled. I...

Jmeter 5.4.1- Config Elements - Part-03

  Part-01- Installation of Jmeter and HTTP's Recorder click  here Part 02--Previous blog on Assertion Config elements in Jmeter are used to configure or modify the samplers requests made to the server. These elements are added at the same or higher level of the samplers that we want to configure  Let' start with  CSV data config As the name suggest it used to read data from CSV first we need to put data in variables and then use the variables in sampler request. create a new test plan add CSV data set config Add a Thread Group and then add Sampler "Java Request"  Create a CSV file  with some data (Name and Data) and save it  Now go to Jmeter CSs data set config browse and upload the css file create Make few more changes in place of  variable name - Name and Dept Ignore first line - True Delimeter - \t (as suggested) Now move on the Sampler-" Java Request" and rename it with header elements of CSV As we have Name and d...