Skip to main content

Posts

Showing posts from March, 2011

JMeter handling dynamic ViewState parameter in Seam framework

Testing applications built with Seam Java framework is possible with JMeter like any other web applications, though there are some nuances to take into account. One of them is ViewState parameter. This parameter is dynamic and it means that we cannot just leave it hardcoded in our JMeter script because it will be broken the next time you try to execute it. Why this happens? Let's dig a little deeper. Black-box testing doesn't require us to know how Seam framework works, right? Okay, in this case we only need to know how it affects our tests. As testers we need to make sure that ViewState parameter in the POST request has the same value as returned by a previous GET request. For example you have two subsequent requests: GET http://x.x.x.x:8080/some_page.seam POST http://x.x.x.x:8080/some_page.seam The first request opens a page and the second one performs an action on the page (for instance - expands some tab, tree, etc). If you analyze the response data with a list

Server-side authorization in JMeter

How to handle server-side authorization with JMeter? Well, this is probably one of the most popular questions amid the novices implementing JMeter tests. It is very straightforward to pass credentials in the POST request if this type of authorization is implemented on application side. But what if we have authorization configured on Apache web server? It is showing us a pop-up demanding user and password every time we try to access the application. However it is very easy to handle, you just need to use JMeter HTTP Authorization Manager . You can do this in two steps: Add authorization manager to your thread group: Add -> Config Element -> HTTP Authorization Manager. Set application URL, username and password fields.