why jmeter for performance testing?
Here’s is the top 30 reason for using Jmeter as a performance testing tool.
- Jmeter is an open source tool.
- There seem to be more cost saving for MQ ,SOAP,FTP protocols when considering other proprietary tools in the market.
- Customized/Specialized reports are given in proprietary tools to attract the end users. Jmeter has simple reports and it will be helpful to analyse the server logs and get into the root cause of the performance issue. So if you do not want Grand UI reports , Jmeter will save more money from you pocket
- User friendly UI.
- All the components are pre-built and readily available for use. Even the person who is not much comfortable with coding can understand and script in jmeter.
- Test can be executed in NON-GUI mode to save the machine resources.
- You can extend or write the new samplers in java and it can be included in jmeter.
- You can send the files with the request using simple configuration.
- It is easy to run multiple users (1000 User logins in ~2GB system) without worrying license cost.
- Simple and effective session correlation for a web application.
- You can run multiple scripts consecutively(One at a time) , also all at a time (concurrently)
- Response time results can be exported to CSV.
- Assertions will help to validate the response from the server easily.
- You can send JSON string and test JSON response for HTTP request.
- Various timers are there to introduce the delay concept
- Using SSH Sampler , Jmeter can connect to Linux Shell.
- Jmeter Can Execute Perl Script from Shell.
- Jmeter Supports functional testing.
- Jmeter has Perfmon for monitoring the entire system.
- Jmeter has Jmxmon for monitoring JVM.
- Jmeter can be integrated with ant jar to generate HTML Reports.
- Jmeter supports SOAP testing.
- Jmeter supports JDBC Testing.
- Easy to add new properties in Jmeter’s property file.
- Jmeter’s Beanshell processor supports Beanshell language.
- Jmeter’s JSR223 Preprocessor supports JAVA language,bsh.
- Easy to use Jmeter’s Function Helper.
- Jmeter’s Test Action Sampler helps to pause the test.
- Junit sampler is available in Jmeter.
- Jmeter can Test MongoDB.
- Jmeter Supports Distributed Testing.
Watch out for more updates.
How to access a blocked website?
How to access a blocked website? Well, a direct answer to that question is switch to Tor.
What is Tor?
Tor Browser is your choice if you need an extra layer of anonymity. It’s a modified version of Firefox, it comes with pre-installed privacy add-ons, encryption and an advanced proxy. The Tor software protects you by bouncing your communications around a distributed network of relays run by volunteers all around the world: it prevents somebody watching your Internet connection from learning what sites you visit, it prevents the sites you visit from learning your physical location, and it lets you access sites which are blocked.
How to go Incognito with Youtube in Android
Sometimes we don’t want all the videos we watch to show up in our browsing history, yes for this youtube has a new feature added, an Incognito mode that makes it easier to watch videos without adding to your view history.
This feature is currently only available for Android.
Note: This helps only in not listing the videos in your history, your traffic can be still monitored by service providers.
To turn on Incognito mode, launch the YouTube app and tap on your profile picture. From there, select “Turn on Incognito” from the menu that appears.
JMeter Distributed Testing using AutoMeter
AutoMeter is an automation tool which helps us to create distributed load testing environment. It is developed and released by Intuit to open source world. It includes Jmeter in Docker image. It provides single command to start, stop test. At the end of the run, we get reports in master docker node. It can also be integrated with Jenkins easily for any of the CI requirements. What makes unique about AutoMeter is that it simplifies JMeter’s Master Slave configuration.Performance Testing in Jmeter Distributed environment can be triggered just by “One-Click”. To scale the load we can just add AutoMeter-Slave in autometer.config.js.
autometer --help provides help manual
More details on installing an configuring AutoMeter can be found here https://github.com/intuit/autometer
- One or more linux hosts with docker (>=1.12.5) installed.
- In one of the linux host install nodeJs (>=7) and autometer npm module. This node can be designated as master (from where tests has to be triggered).
npm install -g autometer
Comparison Between AutoMeter and BlazeMeter
|Features||AutoMeter||BlazeMeter (Available Yes/No)|
|Supported Tools||Jmeter||Jmeter, Gatling|
|Proprietary||Open Source Tool||Yes|
|Test Ongoing Stastics||Yes(Limited ,Console View)||Yes( Web View )|
|AWS Support||Yes (By Default)||Yes ( Can deploy in any environment)|
|Reports||JTL, HTML Reports||JTL, CSV (Can view in Blazemeter web)|
How to change Google Drive folder location?
By default Google Drive installer creates a folder here C:\Users\<USERNAME>\AppData\
We can change the Gdrive installation location in two ways.
During installation we can change as mentioned BELOW
- Download the latest drive installer
- Begin the installation, then click “Get started”
- Log in using your account
- Click next 3 times after logging in, you should see a window that says “You’re all set” –>There should now be an Advanced Setup button
- Click that button and choose your installation location.
- Click on the Google Drive icon in your system tray
- Choose Disconnect account… in Preferences
- Sign in again. You can change the folder when you click Advanced setup button.
Till now we have heard of ransomware’s targeted computers files will be encrypted, in this scenario users are allowed to login to the Operating System but won’t be able to open encrypted files. The newly discovered PETYA Crypto-Ransomware has crossed one more step and it overwrites the MBR itself to lock users out of their computers.
Petya is still distributed via email. Victims would receive an email tailored to look and read like an applicant applying for a job in a company. It would present users with a hyperlink to Dropbox storage location, which would let users download the above said user’s CV.
The file downloaded is actually a self-extracting executable which will unleash the trojan into the system.
Once executed, Petya overwrites the MBR of the entire hard drive, causing windows to crash and display a blue screen. When the user tries to reboot the system the modified MBR will stop him to boot into the operating system, and will be greeted with an ASCII skull and an ultimatum: pay up with a certain amount of bitcoins or lose access to your files and computer.
Fig1: Petya’s red skulls-and-crossbones warning
This modified MBR even disable booting to safe mode also. The user is then given explicit instructions on how to do this, just like any crypto-ransomware currently making the rounds: a list of demands, a link to the Tor Project and how to get to the payment page using it, and a personal decryption code.
Fig 2: Petya’s decryption and ransom payment instructions
Drown stands for Decrypting RSA using Obsolete and Weakened eNcryption, and it provides a way for attackers to decrypt HTTPS communications from servers that are still supporting SSLv2. Most of us think supporting SSLv2 protocol on server is not a problem because most of the modern client software’s just don’t use it.
But looks like the mere existence of SSLv2 help attackers to crack a connection’s encryption, and initiate what is effectively a MITM attack.
According to the researchers, a server is vulnerable to the DROWN vulnerability (also known as CVE-2016-0800) if:
It allows SSLv2 connections. This is surprisingly common, due to misconfiguration and inappropriate default settings. Our measurements show that 17% of HTTPS servers still allow SSLv2 connections.
Its private key is used on any other server that allows SSLv2 connections, even for another protocol. Many companies reuse the same certificate and key on their web and email servers, for instance. In this case, if the email server supports SSLv2 and the web server does not, an attacker can take advantage of the email server to break TLS connections to the web server. When taking key reuse into account, an additional 16% of HTTPS servers are vulnerable, putting 33% of HTTPS servers at risk.
If you want to check whether a particular site is vulnerable, the researchers have helpfully provided an online tool.
Introduction to Gatling
We are living in the world of technologies, it changes the way we work, the way we look at the things. We search queries in google, do shopping online, share a moment in Facebook, chat with our childhood friends irrespective of where they live. Everyone likes if the tasks are simplified or automated by online solutions and gives more sophistication on our needs. Hence it is more important to design the web application by considering the performance factors such as concurrency, response time, fault tolerance, scalability. Though there are so many load testing tools available in the market, JMeter and Gatling are considered as widely used performance testing tools. Both JMeter and Galing are open source tools , Gatling also has enterprise version ‘Gatling Frontline’ “https://gatling.io/gatling-frontline/”
We had seen already about JMeter and how it helps QA to identify performance bottlenecks without worrying much on coding part as JMeter offers built-in components like Logical controllers, Samplers for protocols like http,ftp,Soap,Jms etc…, listeners for reports, Config elements like CSVDatasetConfig for customizing user data, Pre-Processors , Post-Processors such as Regex-Extractor, JMXMon for Monitoring the heap parameters of the Web application. Indeed JMeter is easy to use and it servers the purpose of finding the performance bottleneck, we have to agree on the fact that it has JMX format which makes script changes challenging.
Introduction on Gatling
Gatling is developed and maintained by Stephene Landelle. Gatling is well known for its speed and performance as it is built on AKKA Engine, Scala language based. Gatling works on asynchronous model. Gatling does not lock the thread at the jvm level, so there is no one user per thread concept. After thread completes it tasks , it will be released and takes the next task. Currently Gatling supports more on HTTP protocol , also they support JMS protocol.
As per https://gatling.io/performancetesting ,it has code-like scripting which can help in continuous delivery pipeline. Gatling Domain Specific Language (DSL) helps easy-to-read for everyone.
Download Gatling from the following location, Latest version is Gatling 2.1.7
When you open Gatling you can see the following folders
It has gatling recorder and gatling to run simulations for both windows and linux
Gatling configuration files are placed here
lib folder has Gatling Jar files , Scala libararies, netty libraries
results folder basically consists of simulation results, html files
where simulation class files can be found
user files are placed under data folder of this user-files directory.
simulation files are inside /user-files/simulation folder.
Load Testing Apache kafka using Kafkameter
Go to githup and download kafkameter
Follow the Steps for building the kafkameter.jar
Place the generated jar in $JMETER_HOME/lib/ext folder
Add Threadgroup->Samplers-> Javarequest
Configure Input parameters, like hostname , kafka topic that you created already
Run Jmeter test and verify the same message is consumed by Kafka consumer.
Refer the below screenshots
Sending message to Kafka Consumer
Configuring Apache Kafka Environment
Kafka is used widely in social networking websites because of its performance. Refer Kafka introduction for more information. Here i’m going to show how to setup Kafka in simple 8 steps.
Download Kafka from Apache Website:
Untar downloaded archive.
Start zookeeper which is used for Synchronizing producers and consumers.
start Kafka Server
Create topics for Kafka producer and consumer
bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic kafkatopic2
Start kafka Producer and type some messages
bin/kafka-console-producer.sh --broker-list localhost:9092 --sync --topic kafkatopic2
Start Kafka Consumer and observe that the messages you typed in #Step 7 , getting consumed.
bin/kafka-console-consumer.sh --zookeeper localhost:2181 --topic kafkatopic2 --from-beginning
So you have successfully setup the kafka . We will try to add more consumers and producers in next post.