diff --git a/README.md b/README.md index 203fa6a..bd0fb1b 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ This plugin makes JMeter behave a little more like a browser: form fields are au ![HTTP Form Manager](https://raw.githubusercontent.com/tilln/jmeter-formman/master/docs/before.png) -HTTP form POST parameters are extracted at runtime from HTML responses and added to HTTP sampler parameters +HTTP form parameters are extracted at runtime from HTML responses and added to HTTP sampler parameters (similar to JMeter's [HTML Link Parser](http://jmeter.apache.org/usermanual/component_reference.html#HTML_Link_Parser)). ![HTTP Form Manager](https://raw.githubusercontent.com/tilln/jmeter-formman/master/docs/after.png) @@ -32,7 +32,7 @@ Extract the [zip package](https://jmeter-plugins.org/files/packages/tilln-formma ### Via Manual Download -Copy the [jmeter-formman jar file](https://github.com/tilln/jmeter-formman/releases/download/1.0-SNAPSHOT/jmeter-formman-1.0-SNAPSHOT.jar) +Copy the [jmeter-formman jar file](https://github.com/tilln/jmeter-formman/releases/download/1.0/jmeter-formman-1.0.jar) into JMeter's lib/ext directory and restart JMeter. Usage @@ -69,12 +69,20 @@ Normally these form parameters would be extracted into JMeter variables via [CSS/JQuery Extractors](http://jmeter.apache.org/usermanual/component_reference.html#CSS/JQuery_Extractor) and then added to the subsequent HTTP sampler, as in the screenshot above. -The HTTP Form Manager can replace those extractors and list of parameters, +The *HTTP Form Manager* can replace those extractors and list of parameters, reducing the parameter list to just the username and password elements. +It can be especially useful for parameter names that are generated dynamically by the application and change all the time. + +The plugin will copy all form parameters to the sampler, except the ones that are already defined in the sampler +(the username and password in the screenshot). ### Multiple Forms -Suppose the HTML response contains more than one form, then the URL path and method are used to determine which parameters to extract and send. +Suppose the HTML response contains more than one form, then the plugin needs to determine which form to copy from. + +There are several options for identifying which form should match the current sampler. + +##### Example: By sampler URL ```html @@ -93,14 +101,16 @@ Suppose the HTML response contains more than one form, then the URL path and met ``` -If the HTTP Sampler path matches form1 and the method is POST, then the parameters `__VIEWSTATE` and `submit` will be dynamically added as follows: +If the HTTP Sampler's *Path* matches `/form1` and the *Method* is POST, then the parameters `__VIEWSTATE` and `submit` will be copied as follows: |Parameter |Value |Added by| |-----------|-------|--------| |__VIEWSTATE|value1 |plugin | |submit |submit1|plugin | -Should both forms have the same URL path and method, then the value of the submit element needs to be included in the parameter list to determine which form to send: +##### Example: By submit element + +Should both forms have the same URL path and method, then the value of the submit element may be used instead: ```html @@ -109,44 +119,119 @@ Should both forms have the same URL path and method, then the value of the submi ... +