Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Jmeter to fill out a form?

Can anyone help me figure out how to use jmeter and force it to fill out and submit a form automatically? For example, I need to fill out the google search box and then click the I'm Feeling Lucky button?

like image 773
llaskin Avatar asked Dec 04 '09 13:12

llaskin


2 Answers

Google is not a good example because it uses GET for the form. For example, to search "jmeter" and press Feeling Lucky button, you can just send this URL,

http://www.google.com/search?hl=en&source=hp&q=jmeter&oq=&btnI=1

To do a real post, you need to find the form control field names from a trace or by looking at HTML source and just do something like showed here. The username/password are the field name to post. The action is http://www.example.com/login.

JMeter example

like image 109
ZZ Coder Avatar answered Sep 16 '22 21:09

ZZ Coder


Please note the screen shot is wrong. The method is a "GET" and it should be set to "POST", otherwise the form will not be submitted properly.

like image 42
BlackGaff Avatar answered Sep 16 '22 21:09

BlackGaff