際際滷

際際滷Share a Scribd company logo
Presented by
Mr. Nilesh R. JAISWAR
INDEX
 Introduction.
 How do we do it ?
 How we make parameters dynamic, reacting to the
unique server responses of each test run?
 How do we use external data files to define variables
in my Test scripts?
 Does JMeter process dynamic pages
 JMeter keeps getting "Out of Memory" errors.
 JMeter Distributed Testing Step-by-step
 JMeter proxy Step-by-step
 Configure your browser to use the JMeter HTTP
Proxy
 Conclusion
 References
INTRODUCTION
JMeter is an Apache Jakarta project that can be used as a load testing tool
for analyzing and measuring the performance of a variety of services, with a
focus on web applications.
Apache JMeter is a 100% pure Java desktop application designed to load
test client/server software (such as a web application ). It may be used to
test performance both on static and dynamic resources such as static files,
Java Servlets, CGI scripts, Java objects, databases , FTP servers , and
more. JMeter can be used to simulate a heavy load on a server, network or
object to test its strength or to analyze overall performance under different
load types.
Stefano Mazzocchi of the Apache Software Foundation was the original
developer of JMeter. He wrote it primarily to test the performance of Apache
JServ (a project that has since been replaced by the Apache Tomcat
project). We redesigned JMeter to enhance the GUI and to add functional-
testing capabilities.
Why to use JMeter ?
JMeter can be used as a unit test tool for JDBC database connection,
FTP, LDAP, WebServices,J MS, HTTP and generic TCP connections.
JMeter can also be configured as a monitor, although this is typically
considered an ad-hoc solution in lieu of advanced monitoring solutions.
JMeter is not a browser.
JMeter is not a browser. As far as web-services and remote services are
concerned, JMeter looks like a browser (or rather, multiple browsers);
however JMeter does not perform all the actions supported by browsers. In
particular, JMeter does not execute the Javascript found in HTML pages.
Nor does it render the HTML pages as a browser does .
Features
Full multithreading framework allows concurrent sampling by many threads
and simultaneous sampling of different functions by separate thread groups.
Careful GUI design allows faster operation and more precise timings.
Caching and offline analysis/replaying of test results.
How do we do JMeter Localisation
?
Building JMeter and Add-
Ons
How we make parameters dynamic, reacting
to the unique server responses of each test
run?we can use the Regular Expression Post Processor to extract a value from a
response, and then reuse this response in another request. Looking at the previous
question in this FAQ, you could extract the product id from the result and use it in
the following request:
1. Load Test Plan created in previous FAQ question.
2. Add Post Processor > Regular Expression Extractor to thread Group with following values:
1. Reference Name: product
2. Regular Expression: product_id=(w*-w*-w*)
3. Template: $1$
4. Match No.: 0 (Setting this parameter to 0 returns a random match)
3. Copy the HTTP Request we created in the previous question and paste to the thread group
after the previous HTTP Request.
4. Change the following values:
1. Path: /estore/control/product
2. Add Parameter and set name to product_id, value to ${product}
5. Save Test Plan
6. Run > Start
When you view the results in the View Results Tree, you can see the ${product}
value was replaced with the value extracted by the regular expression.
How do we use external data files to define
variables in my Test scripts?
1. The CSV Data Set Config element is the best way to do this, as it can create
multiple variables from a single data file. Or Start JMeter,
2. Add a Thread Group to the Test Plan
1. set the appropriate number of threads and iterations.
3. Add Pre Processors > User Parameters to Thread Group.
4. Click Add Variable
1. Set Update once per iteration
2. Set the Name to the name of the variable (e.g. ACCOUNTID)
3. Set the value (under User_1) to ${_StringFromFile(accounts.dat)}
5. Add Sampler > HTTP Request to Thread Group:
6. Click the Add button to add a parameter to the request:
1. Name: account_id
2. Value: ${ACCOUNTID}
7. Add Listener > View Results Tree to Thread Group.
8. Save.
9. create the file accounts.dat containing one line per account id. If it is not in the bin
directory, then modify the StringFromFile parameter accordingly,
10. Run > Start
Does JMeter process dynamic pages
No,
JMeter does not process Javascript or applets embedded in
HTML pages.
JMeter can download the relevant resources (some embedded
resources are downloaded automatically if the correct options are
set), but it does not process the HTML and execute any
Javascript functions.
If the page uses Javascript to build up a URL or submit a form,
you can use the Proxy Recording facility to create the necessary
sampler. If this is not possible, then manual inspection of the code
may be needed to determine what the Javascript is doing.
If there are several nodes running the JMeter test plan, it is a
good idea to try and ensure that their clocks are synchronised, as
this makes it easier to analyze the data later.
JMeter keeps getting "Out of Memory" errors.
This is usually caused by including memory intensive listeners in
your stress test. Listeners like "View Tree Results" are useful for
debugging your test, but they are too memory intensive to remain
in your test when you ramp up the number of simulated users and
iterations. The best listeners to use for a long-term, high-load test
are Aggregate Listener, Graph Listener, and Spline Listener.
In addition, you can instruct the JVM to use more memory by
editing the jmeter/jmeter.bat files for linux/windows. Within these
files, find a section that sets values for the Heap:
set HEAP=-Xms256m -Xmx256m
Feel free to change these values. Xms indicates the starting RAM
the jvm will take, and Xmx will be the maximum it is allowed (for
the HEAP).
JMeter Distributed Testing Step-by-step
This explains how to use multiple systems to perform stress
testing. Before we start, there are a couple of things to check.
1. the firewalls on the systems are turned off.
2. all the clients are on the same subnet.
3. the server is in the same subnet, if 192.x.x.x or 10.x.x.x ip
addresses are used. If the server doesn't use 192 or 10 ip
address, there shouldn't be any problems.
4. Make sure JMeter can access the server.
5. Make sure you use the same version of JMeter on all the
systems. Mixing versions may not work correctly.
Once you've made sure the systems are ready, it's time to
setup remote testing. The tutorial assumes you already have
JMeter installed on all the systems. The way JMeter works is 1
master controller initiates the test on multiple slave systems.
1. Terminology
Before we dive into the step-by-step instructions, it's a good idea to define the
terms and make sure the definition is clear.
Master  the system running JMeter GUI, which controls the test.
Slave  the system running JMeter-server, which takes commands from the GUI and
send requests to the target system(s).
Target  the web server we plan to stress test.
Software testing
Step by step
1. On the slave systems, go to jmeter/bin directory and execute jmeter-server.bat
(jmeter-server on unix). On windows, you should see a dos window appear with
jre[version]binrmiregistry.exe. If this doesn't happen, it means either the
environment settings are not right, or there are multiple JRE installed on the system.
Note: [version] would be the jre version installed on the system.
1. Open jmeter-server.bat in a text editor
2. go to line 44 and find :setCP
3. edit START rmiregistry to the full path. Example: START
C:<JAVA_HOME>jrebinrmiregistry
2. On master system acting as the console, open windows explorer and go to
jmeter/bin directory
3. open jmeter.properties in a text editor
4. edit the line remote_hosts=127.0.0.1
5. add the IP address. For example, if I have jmeter server running on 192.168.0.10,
11, 12, 13, and 14, the entry would like like this:
remote_hosts=192.168.0.10,192.168.0.11,192.168.0.12,192.168.0.13,192.168.0.14
6. Start jmeter.
7. Open the test plan you want to use
Starting the Test
At this point, you are ready to start load testing. If you want to double
check the slave systems are working, open jmeter.log in notepad. You
should see the following in the log.
Jmeter.engine.RemoteJMeterEngineImpl: Starting backing engine
If you do not see this message, it means JMeter-server did not start
correctly. For tips on debugging the issue, go to the tips section. There
are two ways to initiate the test: a single system and all systems.
1. click Run at the top
2. select Remote start
3. select the IP address
1. click Run at the top.
2. select Remote start all or use CRTL-Z.
Limitations:
There are some basic limitations for distributed testing. Here's the list of the known items in no specific order.
1. RMI cannot communicate across subnets without a proxy; therefore neither can jmeter without a proxy.
2. Since JMeter sends all the test results to the controlling console, it is easy to saturate the network IO. It is a good idea to
use the simple data writer to save the results and view the file later with one of the graph listeners.
3. Unless the server is a large multi processor system, in most cases 1-2 clients is sufficient to overwhelm the server.
4. A single JMeter client running on a 2-3Ghz CPU (recent cpu) can handle 300-600 threads depending on the type of test.
(The exception is the webservices). XML processing is CPU intensive and will rapidly consume all the CPU cycles. As a
general rule, the performance of XML centric applications will perform 4-10 slower than applications using binary protocols.
Tips
In some cases, the firewall may still be blocking RMI traffic.
Symantec Anti Virus and Firewall,
In some cases, Symantec firewall needs to be stopped from windows services.
1. open control panel
2. open administrative tools
3. double click services
4. Go to down to symantec anti virus, right click and select stop
Windows firewall
1. open network connections
2. select the network connection
3. right click and select properties
4. select advanced tab
5. uncheck internet connection firewall
Linux
On Suse linux, ipchains is turned on by default. For instructions, please refer to the remote testing in the user manual.
On RedHat (or derivatives), iptables (netfilter) is turned on by default. Execute service iptables stop to stop the
Linux netfilter firewall.
JMeter proxy Step-by-step
8.1 Basic Proxy Instructions
1. Go to JMETER_HOME/bin and start JMeter with jmeterw.cmd on Windows and jmeter on
Linux/Unix
2. Select Test Plan on the tree
3. Right click on the Test Plan and add a new thread group: Add > Threads (Users) >
Thread Group
4. Select the Thread Group
5. Right click Add -> Config Element -> Http Request Defaults
6. In new HTTP Request Defaults element: Server name  enter jmeter.apache.org
7. Path leave Blank.
6. In new HTTP Request Defaults element: Server name  enter jmeter.apache.org
7. Path leave Blank.
8. Right click on the Thread Group and add a recording controller: Add > Logic Controller >
Recording Controller
9. Next, select WorkBench
10. Right click on WorkBench and add the Http proxy: Add -> Non-test elements -> HttpProxy Server
11. On HTTP Proxy Server, click the Add button in URL Patterns to Include. This will
create a blank entry.
12. Enter .*.html
13. Click 3 times, the Add button in URL Patterns to Exclude. This will create 3 blank
entries.
14. Enter .*.png pattern, .*.gif pattern and .*.ico pattern
15. Right click on HTTP Proxy Server and add a listener: Add ->
Listener -> View Results Tree.
Return to HTTP Proxy Server, and click the Start button at the bottom.
Configure your browser to use the JMeter HTTP
ProxyAt this point, JMeter's proxy is running. For this exercise, we will use
Iceweasel/Firefox to view some pages on JMeter.
13. Start Iceweasel/Firefox, but do not close Jmeter.
14. From the tool bar, click Edit -> Preferences (or Tools > Preferences).
This should bring up the options.
15. Select the Advanced tab, and Network tab
16. Click Settings button near the
bottom.
17. On the new popup, check Manual proxy configuration. The
address and port fields should be enabled now.
18. Address  enter localhost or the IP address of your system
19. Port  enter 8080.
20. Check Use this proxy server for all protocols.
21. Click ok button
22. Click ok button again. This should return you to the browser
9.1 Record your navigation
23. With your brower, in the Address bar at the top, enter
http://jmeter.apache.org/index.html and hit the enter key.
24. Click on a few links on JMeter's pages.
25. Close your browser and bring up the JMeter window.
Expand the thread group and there should be several samplers. At this point, the test plan can
be saved as is. If you forget to add default http request settings, you will have to
manually delete the servername, and port.
In this sample, there aren't any default request parameters. If a particular request
parameter is required by all pages, the request defaults is where one would add the
entries.
25. Select Thread Group
26. Right click Add -> Listener -> Summary Report to add an summary listener.
27. The summary listener will show some basic statistics
27. Select Thread Group
28. Number of Threads  enter 5
29. Ramp up Period  do not change
30. Loop Count  enter 100
9.2 Start the test
At this point, we are ready to run our test plan and see what happens. Save
the test plan. When you're ready to run the test, there's two ways:
1. Run -> Start
2. CtrlR
Before you start the test, select Summary Report. As the test runs, the statistics will change until the test is done.
At the end of the test, the summary report should look like this
While the test is running, in the upper right-hand corner, there should be a
green square. When the test is done, the box should be grey.
Benefits:
1. Its pure Java tool, which allows to execute this tool in any platform (i.e. platform
independent)
2. Its have lot many configuration mechanism like Htt Request,FTP Request, java request , SOAP
Request
3. This tool mainly used for performance testing (load, stress)
4. GUI are very user friendly, which helps in executing and recording application sessions
5. User can apply automation frame work (data driven, parameter)
Drawbacks:
1. It does not support recording SSL (https).
2. Its only for web base application not windows base application
3. User can't write its own script, or change any recorded script
CONCLUSION
REFERENCES
http://wiki.apache.org/jmeter/JMeterFAQ#How_to_do_remote_te
sting_the_.27proper_way.27.3F
http://jmeter.apache.org/usermanual/remote-test.html
http://ipoint-tech.com/
http://en.wikipedia.org/wiki/jmeter
Reference Books :
Software testing tools by v.k.k.k. dauling
Software testing

More Related Content

Similar to Software testing (20)

How to use Jmeter for performance testing
How to use Jmeter for performance testingHow to use Jmeter for performance testing
How to use Jmeter for performance testing
chiragppatel0111
jmeter interview q.pdf
jmeter interview q.pdfjmeter interview q.pdf
jmeter interview q.pdf
AmitPandey559256
Day1 JMeter_training_overview
Day1 JMeter_training_overviewDay1 JMeter_training_overview
Day1 JMeter_training_overview
SravanthiN
Day1_Apache_JMeter_Overview
Day1_Apache_JMeter_OverviewDay1_Apache_JMeter_Overview
Day1_Apache_JMeter_Overview
Sravanthi N
Mastering Distributed Performance Testing
Mastering Distributed Performance TestingMastering Distributed Performance Testing
Mastering Distributed Performance Testing
Knoldus Inc.
Automation - Apache JMeter
Automation - Apache JMeterAutomation - Apache JMeter
Automation - Apache JMeter
Wira Santos
Load testing with J meter
Load testing with J meterLoad testing with J meter
Load testing with J meter
Manoj Shankaramanchi
Top 20 JMeter Interview Questions and Answers in 2023.pdf
Top 20 JMeter Interview Questions and Answers in 2023.pdfTop 20 JMeter Interview Questions and Answers in 2023.pdf
Top 20 JMeter Interview Questions and Answers in 2023.pdf
AnanthReddy38
Apachejmeterabriefintroduction
ApachejmeterabriefintroductionApachejmeterabriefintroduction
Apachejmeterabriefintroduction
Foredoomed
Basic of jMeter
Basic of jMeter Basic of jMeter
Basic of jMeter
Shub
Performance testing and j meter
Performance testing and j meterPerformance testing and j meter
Performance testing and j meter
Purna Chandar
Performance testing using Jmeter for apps which needs authentication
Performance testing using Jmeter for apps which needs authenticationPerformance testing using Jmeter for apps which needs authentication
Performance testing using Jmeter for apps which needs authentication
Jay Jha
Performancetestingjmeter 131210111657-phpapp02
Performancetestingjmeter 131210111657-phpapp02Performancetestingjmeter 131210111657-phpapp02
Performancetestingjmeter 131210111657-phpapp02
Nitish Bhardwaj
Apache J meter
Apache J meterApache J meter
Apache J meter
Livares Technologies Pvt Ltd
Jmeter introduction
Jmeter introductionJmeter introduction
Jmeter introduction
Ramakrishna kapa
Top 20 JMeter Interview Questions and Answers in 2023.pptx
Top 20 JMeter Interview Questions and Answers in 2023.pptxTop 20 JMeter Interview Questions and Answers in 2023.pptx
Top 20 JMeter Interview Questions and Answers in 2023.pptx
AnanthReddy38
JMETER-SKILLWISE
JMETER-SKILLWISEJMETER-SKILLWISE
JMETER-SKILLWISE
Skillwise Consulting
Perfromane Test Tool jmeter
Perfromane Test Tool jmeterPerfromane Test Tool jmeter
Perfromane Test Tool jmeter
Naga Mallala
JMeter_introduction_Final.ppt for jmeter
JMeter_introduction_Final.ppt for jmeterJMeter_introduction_Final.ppt for jmeter
JMeter_introduction_Final.ppt for jmeter
shwetaykperf
jmeter - Google Search.pdf
jmeter - Google Search.pdfjmeter - Google Search.pdf
jmeter - Google Search.pdf
MohanKoppala3
How to use Jmeter for performance testing
How to use Jmeter for performance testingHow to use Jmeter for performance testing
How to use Jmeter for performance testing
chiragppatel0111
Day1 JMeter_training_overview
Day1 JMeter_training_overviewDay1 JMeter_training_overview
Day1 JMeter_training_overview
SravanthiN
Day1_Apache_JMeter_Overview
Day1_Apache_JMeter_OverviewDay1_Apache_JMeter_Overview
Day1_Apache_JMeter_Overview
Sravanthi N
Mastering Distributed Performance Testing
Mastering Distributed Performance TestingMastering Distributed Performance Testing
Mastering Distributed Performance Testing
Knoldus Inc.
Automation - Apache JMeter
Automation - Apache JMeterAutomation - Apache JMeter
Automation - Apache JMeter
Wira Santos
Top 20 JMeter Interview Questions and Answers in 2023.pdf
Top 20 JMeter Interview Questions and Answers in 2023.pdfTop 20 JMeter Interview Questions and Answers in 2023.pdf
Top 20 JMeter Interview Questions and Answers in 2023.pdf
AnanthReddy38
Apachejmeterabriefintroduction
ApachejmeterabriefintroductionApachejmeterabriefintroduction
Apachejmeterabriefintroduction
Foredoomed
Basic of jMeter
Basic of jMeter Basic of jMeter
Basic of jMeter
Shub
Performance testing and j meter
Performance testing and j meterPerformance testing and j meter
Performance testing and j meter
Purna Chandar
Performance testing using Jmeter for apps which needs authentication
Performance testing using Jmeter for apps which needs authenticationPerformance testing using Jmeter for apps which needs authentication
Performance testing using Jmeter for apps which needs authentication
Jay Jha
Performancetestingjmeter 131210111657-phpapp02
Performancetestingjmeter 131210111657-phpapp02Performancetestingjmeter 131210111657-phpapp02
Performancetestingjmeter 131210111657-phpapp02
Nitish Bhardwaj
Top 20 JMeter Interview Questions and Answers in 2023.pptx
Top 20 JMeter Interview Questions and Answers in 2023.pptxTop 20 JMeter Interview Questions and Answers in 2023.pptx
Top 20 JMeter Interview Questions and Answers in 2023.pptx
AnanthReddy38
Perfromane Test Tool jmeter
Perfromane Test Tool jmeterPerfromane Test Tool jmeter
Perfromane Test Tool jmeter
Naga Mallala
JMeter_introduction_Final.ppt for jmeter
JMeter_introduction_Final.ppt for jmeterJMeter_introduction_Final.ppt for jmeter
JMeter_introduction_Final.ppt for jmeter
shwetaykperf
jmeter - Google Search.pdf
jmeter - Google Search.pdfjmeter - Google Search.pdf
jmeter - Google Search.pdf
MohanKoppala3

More from nil65 (9)

Selenium
SeleniumSelenium
Selenium
nil65
software testing on whatsapp
software testing on whatsappsoftware testing on whatsapp
software testing on whatsapp
nil65
Security
SecuritySecurity
Security
nil65
Software project management
Software project managementSoftware project management
Software project management
nil65
Wifi
WifiWifi
Wifi
nil65
multimedia mpeg-7
multimedia mpeg-7multimedia mpeg-7
multimedia mpeg-7
nil65
Linux intro to advance
Linux intro to advanceLinux intro to advance
Linux intro to advance
nil65
Gps
GpsGps
Gps
nil65
Dss
Dss Dss
Dss
nil65
Selenium
SeleniumSelenium
Selenium
nil65
software testing on whatsapp
software testing on whatsappsoftware testing on whatsapp
software testing on whatsapp
nil65
Security
SecuritySecurity
Security
nil65
Software project management
Software project managementSoftware project management
Software project management
nil65
Wifi
WifiWifi
Wifi
nil65
multimedia mpeg-7
multimedia mpeg-7multimedia mpeg-7
multimedia mpeg-7
nil65
Linux intro to advance
Linux intro to advanceLinux intro to advance
Linux intro to advance
nil65
Gps
GpsGps
Gps
nil65
Dss
Dss Dss
Dss
nil65

Recently uploaded (20)

Q4 2024 Earnings and Investor Presentation
Q4 2024 Earnings and Investor PresentationQ4 2024 Earnings and Investor Presentation
Q4 2024 Earnings and Investor Presentation
Dropbox
A Framework for Model-Driven Digital Twin Engineering
A Framework for Model-Driven Digital Twin EngineeringA Framework for Model-Driven Digital Twin Engineering
A Framework for Model-Driven Digital Twin Engineering
Daniel Lehner
Understanding Traditional AI with Custom Vision & MuleSoft.pptx
Understanding Traditional AI with Custom Vision & MuleSoft.pptxUnderstanding Traditional AI with Custom Vision & MuleSoft.pptx
Understanding Traditional AI with Custom Vision & MuleSoft.pptx
shyamraj55
Future-Proof Your Career with AI Options
Future-Proof Your  Career with AI OptionsFuture-Proof Your  Career with AI Options
Future-Proof Your Career with AI Options
DianaGray10
FinTech - US Annual Funding Report - 2024.pptx
FinTech - US Annual Funding Report - 2024.pptxFinTech - US Annual Funding Report - 2024.pptx
FinTech - US Annual Funding Report - 2024.pptx
Tracxn
Endpoint Backup: 3 Reasons MSPs Ignore It
Endpoint Backup: 3 Reasons MSPs Ignore ItEndpoint Backup: 3 Reasons MSPs Ignore It
Endpoint Backup: 3 Reasons MSPs Ignore It
MSP360
Cloud of everything Tech of the 21 century in Aviation
Cloud of everything Tech of the 21 century in AviationCloud of everything Tech of the 21 century in Aviation
Cloud of everything Tech of the 21 century in Aviation
Assem mousa
Brave Browser Crack 1.45.133 Activated 2025
Brave Browser Crack 1.45.133 Activated 2025Brave Browser Crack 1.45.133 Activated 2025
Brave Browser Crack 1.45.133 Activated 2025
kherorpacca00126
Wondershare Filmora Crack 14.3.2.11147 Latest
Wondershare Filmora Crack 14.3.2.11147 LatestWondershare Filmora Crack 14.3.2.11147 Latest
Wondershare Filmora Crack 14.3.2.11147 Latest
udkg888
Fl studio crack version 12.9 Free Download
Fl studio crack version 12.9 Free DownloadFl studio crack version 12.9 Free Download
Fl studio crack version 12.9 Free Download
kherorpacca127
Gojek Clone Multi-Service Super App.pptx
Gojek Clone Multi-Service Super App.pptxGojek Clone Multi-Service Super App.pptx
Gojek Clone Multi-Service Super App.pptx
V3cube
Early Adopter's Guide to AI Moderation (Preview)
Early Adopter's Guide to AI Moderation (Preview)Early Adopter's Guide to AI Moderation (Preview)
Early Adopter's Guide to AI Moderation (Preview)
nick896721
DealBook of Ukraine: 2025 edition | AVentures Capital
DealBook of Ukraine: 2025 edition | AVentures CapitalDealBook of Ukraine: 2025 edition | AVentures Capital
DealBook of Ukraine: 2025 edition | AVentures Capital
Yevgen Sysoyev
Computational Photography: How Technology is Changing Way We Capture the World
Computational Photography: How Technology is Changing Way We Capture the WorldComputational Photography: How Technology is Changing Way We Capture the World
Computational Photography: How Technology is Changing Way We Capture the World
HusseinMalikMammadli
DevNexus - Building 10x Development Organizations.pdf
DevNexus - Building 10x Development Organizations.pdfDevNexus - Building 10x Development Organizations.pdf
DevNexus - Building 10x Development Organizations.pdf
Justin Reock
Backstage Software Templates for Java Developers
Backstage Software Templates for Java DevelopersBackstage Software Templates for Java Developers
Backstage Software Templates for Java Developers
Markus Eisele
L01 Introduction to Nanoindentation - What is hardness
L01 Introduction to Nanoindentation - What is hardnessL01 Introduction to Nanoindentation - What is hardness
L01 Introduction to Nanoindentation - What is hardness
RostislavDaniel
Unlocking DevOps Secuirty :Vault & Keylock
Unlocking DevOps Secuirty :Vault & KeylockUnlocking DevOps Secuirty :Vault & Keylock
Unlocking DevOps Secuirty :Vault & Keylock
HusseinMalikMammadli
Replacing RocksDB with ScyllaDB in Kafka Streams by Almog Gavra
Replacing RocksDB with ScyllaDB in Kafka Streams by Almog GavraReplacing RocksDB with ScyllaDB in Kafka Streams by Almog Gavra
Replacing RocksDB with ScyllaDB in Kafka Streams by Almog Gavra
ScyllaDB
FTSG TRENDS REPORT 2025 as seen at #SXSW2025
FTSG TRENDS REPORT 2025 as seen  at #SXSW2025FTSG TRENDS REPORT 2025 as seen  at #SXSW2025
FTSG TRENDS REPORT 2025 as seen at #SXSW2025
HUB INSTITUTE
Q4 2024 Earnings and Investor Presentation
Q4 2024 Earnings and Investor PresentationQ4 2024 Earnings and Investor Presentation
Q4 2024 Earnings and Investor Presentation
Dropbox
A Framework for Model-Driven Digital Twin Engineering
A Framework for Model-Driven Digital Twin EngineeringA Framework for Model-Driven Digital Twin Engineering
A Framework for Model-Driven Digital Twin Engineering
Daniel Lehner
Understanding Traditional AI with Custom Vision & MuleSoft.pptx
Understanding Traditional AI with Custom Vision & MuleSoft.pptxUnderstanding Traditional AI with Custom Vision & MuleSoft.pptx
Understanding Traditional AI with Custom Vision & MuleSoft.pptx
shyamraj55
Future-Proof Your Career with AI Options
Future-Proof Your  Career with AI OptionsFuture-Proof Your  Career with AI Options
Future-Proof Your Career with AI Options
DianaGray10
FinTech - US Annual Funding Report - 2024.pptx
FinTech - US Annual Funding Report - 2024.pptxFinTech - US Annual Funding Report - 2024.pptx
FinTech - US Annual Funding Report - 2024.pptx
Tracxn
Endpoint Backup: 3 Reasons MSPs Ignore It
Endpoint Backup: 3 Reasons MSPs Ignore ItEndpoint Backup: 3 Reasons MSPs Ignore It
Endpoint Backup: 3 Reasons MSPs Ignore It
MSP360
Cloud of everything Tech of the 21 century in Aviation
Cloud of everything Tech of the 21 century in AviationCloud of everything Tech of the 21 century in Aviation
Cloud of everything Tech of the 21 century in Aviation
Assem mousa
Brave Browser Crack 1.45.133 Activated 2025
Brave Browser Crack 1.45.133 Activated 2025Brave Browser Crack 1.45.133 Activated 2025
Brave Browser Crack 1.45.133 Activated 2025
kherorpacca00126
Wondershare Filmora Crack 14.3.2.11147 Latest
Wondershare Filmora Crack 14.3.2.11147 LatestWondershare Filmora Crack 14.3.2.11147 Latest
Wondershare Filmora Crack 14.3.2.11147 Latest
udkg888
Fl studio crack version 12.9 Free Download
Fl studio crack version 12.9 Free DownloadFl studio crack version 12.9 Free Download
Fl studio crack version 12.9 Free Download
kherorpacca127
Gojek Clone Multi-Service Super App.pptx
Gojek Clone Multi-Service Super App.pptxGojek Clone Multi-Service Super App.pptx
Gojek Clone Multi-Service Super App.pptx
V3cube
Early Adopter's Guide to AI Moderation (Preview)
Early Adopter's Guide to AI Moderation (Preview)Early Adopter's Guide to AI Moderation (Preview)
Early Adopter's Guide to AI Moderation (Preview)
nick896721
DealBook of Ukraine: 2025 edition | AVentures Capital
DealBook of Ukraine: 2025 edition | AVentures CapitalDealBook of Ukraine: 2025 edition | AVentures Capital
DealBook of Ukraine: 2025 edition | AVentures Capital
Yevgen Sysoyev
Computational Photography: How Technology is Changing Way We Capture the World
Computational Photography: How Technology is Changing Way We Capture the WorldComputational Photography: How Technology is Changing Way We Capture the World
Computational Photography: How Technology is Changing Way We Capture the World
HusseinMalikMammadli
DevNexus - Building 10x Development Organizations.pdf
DevNexus - Building 10x Development Organizations.pdfDevNexus - Building 10x Development Organizations.pdf
DevNexus - Building 10x Development Organizations.pdf
Justin Reock
Backstage Software Templates for Java Developers
Backstage Software Templates for Java DevelopersBackstage Software Templates for Java Developers
Backstage Software Templates for Java Developers
Markus Eisele
L01 Introduction to Nanoindentation - What is hardness
L01 Introduction to Nanoindentation - What is hardnessL01 Introduction to Nanoindentation - What is hardness
L01 Introduction to Nanoindentation - What is hardness
RostislavDaniel
Unlocking DevOps Secuirty :Vault & Keylock
Unlocking DevOps Secuirty :Vault & KeylockUnlocking DevOps Secuirty :Vault & Keylock
Unlocking DevOps Secuirty :Vault & Keylock
HusseinMalikMammadli
Replacing RocksDB with ScyllaDB in Kafka Streams by Almog Gavra
Replacing RocksDB with ScyllaDB in Kafka Streams by Almog GavraReplacing RocksDB with ScyllaDB in Kafka Streams by Almog Gavra
Replacing RocksDB with ScyllaDB in Kafka Streams by Almog Gavra
ScyllaDB
FTSG TRENDS REPORT 2025 as seen at #SXSW2025
FTSG TRENDS REPORT 2025 as seen  at #SXSW2025FTSG TRENDS REPORT 2025 as seen  at #SXSW2025
FTSG TRENDS REPORT 2025 as seen at #SXSW2025
HUB INSTITUTE

Software testing

  • 2. INDEX Introduction. How do we do it ? How we make parameters dynamic, reacting to the unique server responses of each test run? How do we use external data files to define variables in my Test scripts? Does JMeter process dynamic pages JMeter keeps getting "Out of Memory" errors. JMeter Distributed Testing Step-by-step JMeter proxy Step-by-step Configure your browser to use the JMeter HTTP Proxy Conclusion References
  • 3. INTRODUCTION JMeter is an Apache Jakarta project that can be used as a load testing tool for analyzing and measuring the performance of a variety of services, with a focus on web applications. Apache JMeter is a 100% pure Java desktop application designed to load test client/server software (such as a web application ). It may be used to test performance both on static and dynamic resources such as static files, Java Servlets, CGI scripts, Java objects, databases , FTP servers , and more. JMeter can be used to simulate a heavy load on a server, network or object to test its strength or to analyze overall performance under different load types. Stefano Mazzocchi of the Apache Software Foundation was the original developer of JMeter. He wrote it primarily to test the performance of Apache JServ (a project that has since been replaced by the Apache Tomcat project). We redesigned JMeter to enhance the GUI and to add functional- testing capabilities.
  • 4. Why to use JMeter ? JMeter can be used as a unit test tool for JDBC database connection, FTP, LDAP, WebServices,J MS, HTTP and generic TCP connections. JMeter can also be configured as a monitor, although this is typically considered an ad-hoc solution in lieu of advanced monitoring solutions. JMeter is not a browser. JMeter is not a browser. As far as web-services and remote services are concerned, JMeter looks like a browser (or rather, multiple browsers); however JMeter does not perform all the actions supported by browsers. In particular, JMeter does not execute the Javascript found in HTML pages. Nor does it render the HTML pages as a browser does . Features Full multithreading framework allows concurrent sampling by many threads and simultaneous sampling of different functions by separate thread groups. Careful GUI design allows faster operation and more precise timings. Caching and offline analysis/replaying of test results.
  • 5. How do we do JMeter Localisation ?
  • 7. How we make parameters dynamic, reacting to the unique server responses of each test run?we can use the Regular Expression Post Processor to extract a value from a response, and then reuse this response in another request. Looking at the previous question in this FAQ, you could extract the product id from the result and use it in the following request: 1. Load Test Plan created in previous FAQ question. 2. Add Post Processor > Regular Expression Extractor to thread Group with following values: 1. Reference Name: product 2. Regular Expression: product_id=(w*-w*-w*) 3. Template: $1$ 4. Match No.: 0 (Setting this parameter to 0 returns a random match) 3. Copy the HTTP Request we created in the previous question and paste to the thread group after the previous HTTP Request. 4. Change the following values: 1. Path: /estore/control/product 2. Add Parameter and set name to product_id, value to ${product} 5. Save Test Plan 6. Run > Start When you view the results in the View Results Tree, you can see the ${product} value was replaced with the value extracted by the regular expression.
  • 8. How do we use external data files to define variables in my Test scripts? 1. The CSV Data Set Config element is the best way to do this, as it can create multiple variables from a single data file. Or Start JMeter, 2. Add a Thread Group to the Test Plan 1. set the appropriate number of threads and iterations. 3. Add Pre Processors > User Parameters to Thread Group. 4. Click Add Variable 1. Set Update once per iteration 2. Set the Name to the name of the variable (e.g. ACCOUNTID) 3. Set the value (under User_1) to ${_StringFromFile(accounts.dat)} 5. Add Sampler > HTTP Request to Thread Group: 6. Click the Add button to add a parameter to the request: 1. Name: account_id 2. Value: ${ACCOUNTID} 7. Add Listener > View Results Tree to Thread Group. 8. Save. 9. create the file accounts.dat containing one line per account id. If it is not in the bin directory, then modify the StringFromFile parameter accordingly, 10. Run > Start
  • 9. Does JMeter process dynamic pages No, JMeter does not process Javascript or applets embedded in HTML pages. JMeter can download the relevant resources (some embedded resources are downloaded automatically if the correct options are set), but it does not process the HTML and execute any Javascript functions. If the page uses Javascript to build up a URL or submit a form, you can use the Proxy Recording facility to create the necessary sampler. If this is not possible, then manual inspection of the code may be needed to determine what the Javascript is doing. If there are several nodes running the JMeter test plan, it is a good idea to try and ensure that their clocks are synchronised, as this makes it easier to analyze the data later.
  • 10. JMeter keeps getting "Out of Memory" errors. This is usually caused by including memory intensive listeners in your stress test. Listeners like "View Tree Results" are useful for debugging your test, but they are too memory intensive to remain in your test when you ramp up the number of simulated users and iterations. The best listeners to use for a long-term, high-load test are Aggregate Listener, Graph Listener, and Spline Listener. In addition, you can instruct the JVM to use more memory by editing the jmeter/jmeter.bat files for linux/windows. Within these files, find a section that sets values for the Heap: set HEAP=-Xms256m -Xmx256m Feel free to change these values. Xms indicates the starting RAM the jvm will take, and Xmx will be the maximum it is allowed (for the HEAP).
  • 11. JMeter Distributed Testing Step-by-step This explains how to use multiple systems to perform stress testing. Before we start, there are a couple of things to check. 1. the firewalls on the systems are turned off. 2. all the clients are on the same subnet. 3. the server is in the same subnet, if 192.x.x.x or 10.x.x.x ip addresses are used. If the server doesn't use 192 or 10 ip address, there shouldn't be any problems. 4. Make sure JMeter can access the server. 5. Make sure you use the same version of JMeter on all the systems. Mixing versions may not work correctly. Once you've made sure the systems are ready, it's time to setup remote testing. The tutorial assumes you already have JMeter installed on all the systems. The way JMeter works is 1 master controller initiates the test on multiple slave systems.
  • 12. 1. Terminology Before we dive into the step-by-step instructions, it's a good idea to define the terms and make sure the definition is clear. Master the system running JMeter GUI, which controls the test. Slave the system running JMeter-server, which takes commands from the GUI and send requests to the target system(s). Target the web server we plan to stress test.
  • 14. Step by step 1. On the slave systems, go to jmeter/bin directory and execute jmeter-server.bat (jmeter-server on unix). On windows, you should see a dos window appear with jre[version]binrmiregistry.exe. If this doesn't happen, it means either the environment settings are not right, or there are multiple JRE installed on the system. Note: [version] would be the jre version installed on the system. 1. Open jmeter-server.bat in a text editor 2. go to line 44 and find :setCP 3. edit START rmiregistry to the full path. Example: START C:<JAVA_HOME>jrebinrmiregistry 2. On master system acting as the console, open windows explorer and go to jmeter/bin directory 3. open jmeter.properties in a text editor 4. edit the line remote_hosts=127.0.0.1 5. add the IP address. For example, if I have jmeter server running on 192.168.0.10, 11, 12, 13, and 14, the entry would like like this: remote_hosts=192.168.0.10,192.168.0.11,192.168.0.12,192.168.0.13,192.168.0.14 6. Start jmeter. 7. Open the test plan you want to use
  • 15. Starting the Test At this point, you are ready to start load testing. If you want to double check the slave systems are working, open jmeter.log in notepad. You should see the following in the log. Jmeter.engine.RemoteJMeterEngineImpl: Starting backing engine If you do not see this message, it means JMeter-server did not start correctly. For tips on debugging the issue, go to the tips section. There are two ways to initiate the test: a single system and all systems.
  • 16. 1. click Run at the top 2. select Remote start 3. select the IP address
  • 17. 1. click Run at the top. 2. select Remote start all or use CRTL-Z.
  • 18. Limitations: There are some basic limitations for distributed testing. Here's the list of the known items in no specific order. 1. RMI cannot communicate across subnets without a proxy; therefore neither can jmeter without a proxy. 2. Since JMeter sends all the test results to the controlling console, it is easy to saturate the network IO. It is a good idea to use the simple data writer to save the results and view the file later with one of the graph listeners. 3. Unless the server is a large multi processor system, in most cases 1-2 clients is sufficient to overwhelm the server. 4. A single JMeter client running on a 2-3Ghz CPU (recent cpu) can handle 300-600 threads depending on the type of test. (The exception is the webservices). XML processing is CPU intensive and will rapidly consume all the CPU cycles. As a general rule, the performance of XML centric applications will perform 4-10 slower than applications using binary protocols. Tips In some cases, the firewall may still be blocking RMI traffic. Symantec Anti Virus and Firewall, In some cases, Symantec firewall needs to be stopped from windows services. 1. open control panel 2. open administrative tools 3. double click services 4. Go to down to symantec anti virus, right click and select stop Windows firewall 1. open network connections 2. select the network connection 3. right click and select properties 4. select advanced tab 5. uncheck internet connection firewall Linux On Suse linux, ipchains is turned on by default. For instructions, please refer to the remote testing in the user manual. On RedHat (or derivatives), iptables (netfilter) is turned on by default. Execute service iptables stop to stop the Linux netfilter firewall.
  • 19. JMeter proxy Step-by-step 8.1 Basic Proxy Instructions 1. Go to JMETER_HOME/bin and start JMeter with jmeterw.cmd on Windows and jmeter on Linux/Unix 2. Select Test Plan on the tree 3. Right click on the Test Plan and add a new thread group: Add > Threads (Users) > Thread Group
  • 20. 4. Select the Thread Group 5. Right click Add -> Config Element -> Http Request Defaults 6. In new HTTP Request Defaults element: Server name enter jmeter.apache.org 7. Path leave Blank.
  • 21. 6. In new HTTP Request Defaults element: Server name enter jmeter.apache.org 7. Path leave Blank. 8. Right click on the Thread Group and add a recording controller: Add > Logic Controller > Recording Controller
  • 22. 9. Next, select WorkBench 10. Right click on WorkBench and add the Http proxy: Add -> Non-test elements -> HttpProxy Server
  • 23. 11. On HTTP Proxy Server, click the Add button in URL Patterns to Include. This will create a blank entry. 12. Enter .*.html 13. Click 3 times, the Add button in URL Patterns to Exclude. This will create 3 blank entries. 14. Enter .*.png pattern, .*.gif pattern and .*.ico pattern
  • 24. 15. Right click on HTTP Proxy Server and add a listener: Add -> Listener -> View Results Tree.
  • 25. Return to HTTP Proxy Server, and click the Start button at the bottom.
  • 26. Configure your browser to use the JMeter HTTP ProxyAt this point, JMeter's proxy is running. For this exercise, we will use Iceweasel/Firefox to view some pages on JMeter. 13. Start Iceweasel/Firefox, but do not close Jmeter. 14. From the tool bar, click Edit -> Preferences (or Tools > Preferences). This should bring up the options. 15. Select the Advanced tab, and Network tab 16. Click Settings button near the bottom.
  • 27. 17. On the new popup, check Manual proxy configuration. The address and port fields should be enabled now. 18. Address enter localhost or the IP address of your system 19. Port enter 8080. 20. Check Use this proxy server for all protocols.
  • 28. 21. Click ok button 22. Click ok button again. This should return you to the browser 9.1 Record your navigation 23. With your brower, in the Address bar at the top, enter http://jmeter.apache.org/index.html and hit the enter key. 24. Click on a few links on JMeter's pages. 25. Close your browser and bring up the JMeter window. Expand the thread group and there should be several samplers. At this point, the test plan can be saved as is. If you forget to add default http request settings, you will have to manually delete the servername, and port.
  • 29. In this sample, there aren't any default request parameters. If a particular request parameter is required by all pages, the request defaults is where one would add the entries. 25. Select Thread Group 26. Right click Add -> Listener -> Summary Report to add an summary listener.
  • 30. 27. The summary listener will show some basic statistics
  • 31. 27. Select Thread Group 28. Number of Threads enter 5 29. Ramp up Period do not change 30. Loop Count enter 100
  • 32. 9.2 Start the test At this point, we are ready to run our test plan and see what happens. Save the test plan. When you're ready to run the test, there's two ways: 1. Run -> Start 2. CtrlR Before you start the test, select Summary Report. As the test runs, the statistics will change until the test is done. At the end of the test, the summary report should look like this
  • 33. While the test is running, in the upper right-hand corner, there should be a green square. When the test is done, the box should be grey. Benefits: 1. Its pure Java tool, which allows to execute this tool in any platform (i.e. platform independent) 2. Its have lot many configuration mechanism like Htt Request,FTP Request, java request , SOAP Request 3. This tool mainly used for performance testing (load, stress) 4. GUI are very user friendly, which helps in executing and recording application sessions 5. User can apply automation frame work (data driven, parameter) Drawbacks: 1. It does not support recording SSL (https). 2. Its only for web base application not windows base application 3. User can't write its own script, or change any recorded script