hide's memo
6 Apr, 2023

Fiddler

[Japanese(日本語)]

HTTP Packet capture tool.
you can see HTTP communications between your web browser and web server.
Additionally, you can change the HTTP request and response.

 

■How to see HTTP communications

(1)select the communication you want to see.
(2)select “Inspectors” tab.
(3)Select “Raw” tab.
(4)you can see HTTP request in the right upper window.
(5)you can see HTTP resonse in the right upper window.

 

 

■How to change HTTP request.

(1)Select Rules -> Automatic Breakpoints -> Before Request.
then Fiddler holds every HTTP request before sending.
(2)Choose holded HTTP communication.
(3)You can change HTTP request.
(4)Push Run to Completion Button.

As Fiddler holds every HTTP request,
You have to process every HTTP request .

■How to use Fiddler’s record to JMeter.

(1)Export Fiddler’s record as “cURL Script”.

(2)Import data to JMeter.

When you import the “cURL Script”. JMeter kindly prepare Cookie Manager which is basically required by Most Web Application.
Additionaly , you will have “View Result Tree”, So you can check the JMeter’s test result.

But, Thread Group is set with more than 10 thread.
I think you shuld better change Thred properties so that you can simply see how the test senario run.

27 Feb, 2022

using a lot of individual accounts on JMeter

[japanese(日本語)]

Prepare a lot of indivisual accounts and each of them access to the web system.

 

 

 

1.Prepare a text file including ID,Passwod

This file is delimitered by “tab” as follows.

user001 passwd001
user002 passwd002
user003 passwd003

 

2. Set JMeter As follows

 

(1)User Defined Variable

Add uid,passwd.

(2)Add HTTP Cookie Manager.

(3)Add Transaction Controller.

(3.1.)Add BeahShell PreProcessor. Write code as follows.

int threadNum = ${__threadNum}; 
String filename = "users.txt"; // wirte file name as full path.

String data;
BufferedReader br = new BufferedReader(new FileReader(filename));
String uid="";
String passwd="";

int num=0;
while((data = br.readLine())!=null){
  String[] token = data.split("t");
  uid = token[0];
  passwd = token[1];

  num++;
  if(num == threadNum){
    break;
  }
}
br.close();

vars.put("uid",uid);
vars.put("passwd",passwd)

 

(3.2) Add HTTP Request

This example assumed to login with posting uid and passwd .

Access URL:http://localhost/cgi-bin/login.cgi

HTTP Request:POST

Add Parameters  as follows

uid    ${uid}

passwd    ${passwd}

 

(4)Add Loop Controller

(4.1)Add HTTP Request

(4.2)Add HTTP Request

 

You can increse the number of Threads as many as the “user.txt” files line.