Close

March 19, 2017

Download Free Ebooks using Apache JMeter

Download Free Ebooks using Apache JMeter

Download Free Ebooks using Apache JMeter I have created this Apache JMeter script for avid book readers who rely on free ebooks from PacktPub. PacktPub releases free ebooks every now and then. I thought of automate the downloading process, so that I won’t miss any titles.

Prerequisites

Before you start using this JMeter script, below are the prerequisites:

  1. Valid account with PacktPub
  2. Latest version of Apache JMeter
  3. Latest version of Jenkins

Creating an account with PacktPub

You can create a valid account with PacktPub in here. All you need is valid email account, preferably with google mail.

Latest version of Apache JMeter

You need to have latest version of Apache JMeter in your system. The version I used is Apache JMeter 3.1. You can download JMeter in here.

Download Free Ebooks using Apache JMeter

Download Free Ebooks using Apache JMeter

Latest version of Jenkins

I created a Jenkins freestyle project to automate the downloading process. You can download Jenkins in here.

Download Free Ebooks using Apache JMeter

Jenkins

Download Free Ebooks using Apache JMeter Script

After all the prerequisites are done, you are set to download my JMeter script from my GitHub. .

Go to Script folder to download PacktPubDownload_v1.jmx

Your test plan looks like as shown below.

Download Free Ebooks using Apache JMeter

Test Plan

You will have 4 samplers to download the free eBook in PDF format and 1 sampler to trigger email. Before you run the script, make sure that you have valid credentials is configured or not.

Click on 01_Login sampler and enter your email and password as shown below.

Download Free Ebooks using Apache JMeter

Configuring Login Sampler

Once the email and password is configured. Next step is to configure the email id to be sent. You can set your email in Send Email Controller > Trigger Email as shown below.

Download Free Ebooks using Apache JMeter

Configuring Email ID

Before you execute

Please note that the purpose of the script is only for educational purpose and to save your time. If you are trying to attempt any illegal activities, QAInsights is not responsible.

Make sure that the Number of Threads (users) are always set to 1 as shown in the below.

Download Free Ebooks using Apache JMeter

Threads must be 1

If you execute the script, you will get an email with the subject line “Today’s Free Book from PacktPub is {Title}” with the PDF attached as shown below.

Download Free Ebooks using Apache JMeter

Sample Email

In my next blog, I will share the details about integrating this JMeter script with Jenkins, so that you can schedule daily build jobs to receive free eBooks daily without manually logging in and downloading it from PacktPub.

You turn : Please download this script and let me know if you are facing any issues or not. If you want to enhance this, create a pull request in GitHub.

About NaveenKumar Namachivayam

Hi there! is a passionate and experienced Performance Test Analyst based in Chicago, USA with skill sets in Manual Testing, Test Automation, Performance Testing, and Test Estimation. He loves to learn and experiment new trends and models in Software Testing. Please stop by at his personal blogs: Excel Blog, DealsBrook, NaveenKumarN.in, and Affiliate Insights blog and Software Testing Memes.

Leave a Reply

Your email address will not be published. Required fields are marked *