Web Login Load Test Tool “Curl-Loader”

J-Meter, etc. is famous as the Web of the load test tool, but you will not be able to measure the load on the user simultaneous login.So help in this scenario is the tool that curl-loader. Here is a sample to measure the login load on the Web site that is in this article.

Scenario

Sends the Unique user ID and the Unique IP address of 100 different users at the same time one of the web site to the login page of the request (http GET), performs the log-in process (http POST) to the login page.

What you need

  • CentOS7 * 1 units (decent specs of things. Environment also need to come out to the Internet)
  • Subject to Web server of login load test (including authentication servers and test account for authentication)

Installation on CentOS

1. will be carried out CentOS7 with minimum installation.

2. Install the tools needed to curl-loader installation.

yum -y install wget
yum -y install bzip2
yum -y install gcc
yum -y install patch

3. Move to the current directory /usr/local/src.

cd /usr/local/src

4. Download the source file by wget.

wget https://sourceforge.net/projects/curl-loader/files/curl-loader-stable/curl-loader-0.56/curl-loader-0.56.tar.bz2/download

5. tar.bz2 file will be renamed because it is in a file called download.

mv download curl-loader-0.56.tar.bz2

6. Unzip.

tar jxvf curl-loader-0.56.tar.bz2

7. Go to the directory.

cd curl-loader-0.56

8. make and make install.

make
make install

Installation is over.

Sponsored Link

Set of curl-loader

curl-loader is worked with specifying the .conf file after the -f.

curl-loader -f XXX.conf

The conf file you create in the following manner. (It is based on bax.conf of the sample.)

--- web-login-load-test.conf ---


########### GENERAL SECTION ################################
BATCH_NAME = web-login-load- test
CLIENTS_NUM_MAX = 100
CLIENTS_RAMPUP_INC = 0
INTERFACE = eth0
NETMASK = 24
IP_ADDR_MIN = 10.1.1.101
IP_ADDR_MAX = 10.1.1.200
URLS_NUM = 2
CYCLES_NUM = 1
########### URL SECTION ####################################

### Login URL - cycling

# GET-part
URL = https: //www.example.com/
URL_SHORT_NAME = "Login-GET"
REQUEST_TYPE = GET
TIMER_URL_COMPLETION = 0 # In msec. When positive, Now it is enforced by cancelling url fetch on timeout
TIMER_AFTER_URL_SLEEP = 0
LOG_RESP_BODIES = 1
LOG_RESP_HEADERS = 1

# POST-part
URL = ""
URL_SHORT_NAME = "Login-POST"
URL_USE_CURRENT = 1
REQUEST_TYPE = POST
FORM_USAGE_TYPE = "RECORDS_FROM_FILE"
FORM_RECORDS_FILE = ./userinfo.csv
FORM_STRING = "PtUser =%s & PtPwd =%s & PtButton = Logon"
TIMER_URL_COMPLETION = 0 # In msec. When positive, Now it is enforced by cancelling url fetch on timeout
TIMER_AFTER_URL_SLEEP = 1000
LOG_RESP_BODIES = 1
LOG_RESP_HEADERS = 1


Sponsored Link

BATCH_NAME = web-login-load-test

Just a label.It can be any string. Log files, etc. related files will be generated which is named with this label after the execution.

CLIENTS_NUM_MAX = 100

You can run up to 100 clients.

CLIENTS_RAMPUP_INC = 0

It specifies whether to start what client at the same time every second. For example, in case of =20, first started 20 clients at the same time, and increase 20 per second, up to CLIENTS_NUM_MAX value, and one cycle is terminated.

In the case of 0 to suddenly start the 100 clients.

INTERFACE = eth0

It specifies the interface to send the packet.

NETMASK = 24
IP_ADDR_MIN = 10.1.1.101
IP_ADDR_MAX = 10.1.1.200

Specify the client of the range and subnet mask.

You can launch 100 units using the 10.1.1.101/24 ~ 10.1.1.200/24 ​​if the above setting.

URLS_NUM = 2

The number of URL described in the URL SECTION.This time "to display the 1. Web screen (GET)", are two of the "2. Log in Web login screen (POST)".

CYCLES_NUM = 1

The number of cycles that repeat.In the case of 0 will be an infinite loop, it does not stop until you press Ctrl C.

URL = https: //www.example.com/

Specify the access to URL.

URL_USE_CURRENT = 1 case of can be left blank URL, this case will run against the currently displayed page.

FORM_USAGE_TYPE = "RECORDS_FROM_FILE"

Specifies whether to bring the ID password information to use to log in from anywhere.

By the parameter that RECORDS_FROM_FILE this time, ID password information in the CSV format will read the files that are written.

It should be noted that, "UNIQUE_USERS_SAME_PASSWORD" or "UNIQUE_USERS_AND_PASSWORDS" that it's a likely to be realized in the parameter, actually doing try and %d does not rise is well digit place called, because it has become a 100-user the same ID, I gave up.

FORM_RECORDS_FILE = ./userinfo.csv

The above-mentioned, and specify the file of ID password information to use to login.Place the conf file and a file called userinfo.csv in the same directory, there CSV format [ID, Password] has described the information of 100 accounts worth in.

testuser1, testpassword1
testuser2.testpassword2
.....

Sponsored Link

FORM_STRING = "PtUser =% s & PtPwd =% s & PtButton = Logon"

This should abide in the form of Form itself when POST to the login screen.It was confirmed using Firefox developer tools (start-up in the F12 button) that you are sending the following string in the POST method in this trial was the login screen.(Wireshark's and encrypted communication of https is can not be sure even local)

"PtUser = [User ID] & PtPwd = [Password] & PtButton = Logon"

Fisrt %s indiactes the first column of csv file, USER-ID, and second %s indicates the second column of csv file, password.

This is at the ready.

Execution of curl-loader

Run the following command.

curl-loader -f web-login-load-test.conf

The execution results are generated file called web-login-load-test.log in the same directory.

less web-login-load-test.conf

To share

  • このエントリーをはてなブックマークに追加

To follow