1

Here is the Scenario : When i login to the application, a graph is displayed with some main menus on the left side of the page. The graph takes some time to get displayed say 3 to 4 seconds but the buttons are displayed early. I want to measure how much time the graph is taking to get displayed after successful login.

This is what is displayed when i login

2

If I got your issue correctly then, there is a work around of doing this, you just either need to know/find out which HTTP requests are made for displaying Graph or which requests are made after Login and displaying navigation links in Left. Once this is known, just move those requests (cut-paste) to a different Controller (you can use Simple Controller for this), and when you execute the script, listener will show you the Response time for the Graph requests (new Controller) separately.

enter image description here

It is easy to know which requests are made for Displaying graph if Graph section is a separate page which is being displayed after login; for example: if your application under test is like

1. Login.aspx: Login page required for login

2. Home.aspx: Homepage with Left Navigation links

3. GraphContainer.aspx: page containing graph which is displayed inside Homepage

If structure is like this then it is easy for you to separate the requests and then adding them to separate Controllers in JMeter, even without adding new controller you can tell the response time for the graph requests in this kind of application structure. If not then apply another work around, jot down the request or sequence number of request (this is a feature in JMeter 2.13 that it displays sequence number before request URL) which are send before displaying graph, once that request or sequence number is known, all major requests after that will be related to Graph feature only.

This complete work around will work positively, as I too have tried it for couple of performance tests where a same action provide multiple results or I need to separate response time like in your scenario.

2

It looks like your application is using AJAX request(s) to display the graph. You need to capture the requests somehow and execute along with main GET request to the page. You can use Transaction Controller to measure and record the whole sequence execution time.

In regards to AJAX thing itself, JMeter doesn't provide a relevant sampler to exactly simulate browser's behaviour, you will need to implement the logic yourself. Some approaches are listed in How to Load Test AJAX/XHR Enabled Sites With JMeter guide.

2

You can try to use WebDriver plugin which interacts with UI elements. It support explicit wait on some conditions like IsElementVisible.

0

This doesn't seem in-line with what JMeter is built to do: create load on a server.

Sounds like you'd be better off doing this sort of thing in Selenium. For manual testing, just use the network tab of DevTools in most modern browsers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.