LoadRunner Correlation on application using Wickets (dynamic urls) - wicket

Loadtesting a wicket application with LoadRunner using WEB/HTTP protocol record and playback calls for challenges due to dynamic links.
The same issue is relevant to other loadtesting frameworks as JMeter and this entry describes a solution for it using Regular Expression based approach:
https://cwiki.apache.org/WICKET/wicket-and-jmeter-with-regular-expressions.html
My concrete question is twofold:
The approach described using JMeter in the abovementioned link has a key point, namely to derive the URL that has to be used in the next step from the HTML respons for the previous step. In the JMeter example they use a Regular Expression Extractor to capture the respons to reuse it further down in the script.
Does this directly apply to a LoadRunner approach using manual correlation?
My initial strategy to resolve issues I have with recording LoadRunner HTTP-protocol script for a wicket application is to get hold of the data needed to derive the URL thats has to be used in the next step. The example with JMeter uses Regular Expression Extractor.
Could this be directly related to web_reg_save_param in LoadRunner?

web_reg_save_param() should be able to handle this easily. Have you tried it yet?

Related

Basic Jmeter Framework for Functional testing

Does anyone know or have implemented a basic framework in Jmeter which helps achieve re-usability and robustness.
I currently have 4 API's (upload file, get details, update file, delete file)
Now i need to test this for different formats.
I initially took the approach of putting all 4 api's in a thread group and disabling that group.
Then i called each api's using a module controller for different formats of the file.
This helped me achieve reusability but then asserting responses and extracting response using regex. extractor, became difficult and next to impossible.
Is there a way to achieve reusability in Jmeter? Module Controller works but it doesn't allow regex extractor which can inturn be used for assertion.
Instead of adding multiple assertions and regex extractors in every HTTP call, i would like to add it once and then probably reuse it.
I faced similar issues while implementing complex functional tests for a large web application. I used components mentioned below to achieve reusability:
Module Controller
Parameterized Controller
Loop Controller
IF controller
Beanshell & JMeter functions
You should not face any issue with use of Regex extractor under any controller. For conditioning you can use IF controller and Beanshell.
Parameterized controller is extremely useful if you need to use same samplers but with different datasets/values.

Switching to Gatling for Load Testing

I'd like to use Gatling for REST performance and scalability web service testing. I'm currently using JMeter for this as I wasn't aware of gatling when I started this project. Gatling would integrate better and would be better for the project a number of reasons.
I'd like to ask one main question:
Obviously, there's a lot of overhead in configuring Gatling with the correct web service information. I've already done this in JMeter and I'm not keen to do it again. For one of the sub-projects, we have a WADL but we have no such thing for the other. Is it possible, out of the box, to import:
a. JMeter test plans and
b. WADL documents
into Gatling?
I've looked through the docs but unfortunately I can't find anything that references these.
No, Gatling has neither.
Building a jmx converter is something we might investigate in 2013, as you're not the first one to ask for it. At this point, I'm a bit skeptical, as the logic and the configuration of the 2 JMeter and Gatling are quite different, so the features and the way to use them don't map 1:1.
The easiest way to work with REST APIs is to use the recorder, so you'd dump request bodies as template and then inject data into them. See http://gatling.io/docs/2.1.6/http/http_request.html#request-body
If you work with JSON, you can use our JsonPath (or standard regex) checks in order to make assertions on the response body, or even capture data. See http://gatling.io/docs/2.1.6/http/http_check.html#defining-the-check-type
Using HttpSampler with Raw Post body And last 2.8 version is the right way to test Webservices.
Is it the way you are doing it ?
Upcoming 2.9 has new performance improvements related to memory and cpu consumed by Post Processors.
Regarding a, I don't think so.

How to get the result of a JSP in a java method?

I am working on a restaurant web portal which will send periodic emails to the registered users such as changes in menu, discounts and offers, birthday wishes etc.
Here is how I am doing it-
I create a JSP page with the HTML formatting. This page accepts certain parameters that will customize the page.
The MailDaemon scans the db and upon a certain trigger will make a GET request to the JSP.
The returned JSP represents the final mail content which is then sent using the JavaMail API.
My questions are these -
Do I really need to make a GET request? Or can I obtain the JSP result directly in my Daemon class?
Does my approach have any drawbacks? Any better solutions (architecturally speaking)
Any other templating solutions for the job?
It's possible to buffer a response from your JSP using javax.servlet.RequestDispatcher#include by wrapping original response in javax.servlet.ServletResponseWrapper (in case your MailDaemon is a servlet)
Your approach is OK. Though it'll be easier to leverage another templating engine.
Apache Velocity or FreeMarker. These two are not tied to web, so you can easily use them without servlet container.
If I understand correctly, you're using the JSP as a templating engine to generate the body of an HTML email. If you want to keep using JSPs for that, I don't think there's a better solution than making a GET request to get the generated HTML.
But you could also use an embeddable templating engine like Velocity or FreeMarker to generate the HTML to a String, directly from the mail daemon.

ASP.Net Integrated Pipeline and HTTPResponseBase.Headers

Ok...
I'm writing a ASP.Net MVC 2 application, and one of the requirements is that I log the headers on the requests we receive, and also on the responses we send...
My approach to do this has been to create a controller that overrides OnActionExecuting and OnActionExecuted, and then create our actual "live" controllers by inheriting from this rather than from the usual base class. This way, I basically get the logging functionality for free.
While this approach works fine for handling the requests, responses seem to be another matter. I am getting an error telling me that the Headers property of the HTTPResponseBase class requires IIS to be using the Integrated Pipeline. I therefore have two questions.
Question 1.
Can anyone suggest a means to get the headers through a means other than HTTPResponseBase.Headers? I have considered for example simply parsing the entire resposne and getting them that way myself, but I was hoping someone might have a better way...
Question 2.
What is this Integrated Pipeline? What does it do? How do I enable it?
Cheers in anticipation...
Martin.
In response to Question 2:
Integrated Pipeline is a new feature in IIS 7 and higher, you can change the application pool in IIS7 to use this new pipeline.

REST pass multiple inputs to GET method

I have deployed a simple REST based application in RAD.
A simple URL is accessed using http://localhost/<contextroot>/users/<username> where <username> is accessed using reqeust.getAttributes(). Now, how do i pass more than one attribute to the REST service?
Usually you'll use query parameters:
http://localhost/<contextroot>/users/<username>?a=10&b=hello
You haven't indicated which language or framework you are using so I can't tell you how to do this in code.
You could also use URLs of the style http://localhost/<contextroot>/comments/<username>/after/<date>, but that tends to get messy if you wish to include a large number of options.