EzDevInfo.com

jmeter interview questions

Top jmeter frequently asked interview questions

JMeter upload file with relative path from the jmx file

I am creating a HTTP Request Sampler in JMeter to automate uploading file to a http service. Is there a way to set the "File Path" in the "Send Files With the Request" to a relative path from the location of the jmx file?


Source: (StackOverflow)

How to analyse JMeter result?

I am new in JMeter tool. Can anyone help me for the best way to analyse JMeter reports?


Source: (StackOverflow)

Advertisements

How do I install jmeter on a Mac?

We want to use jmeter.

I've downloaded the production version as directed in the user manual at http://jmeter.apache.org/usermanual/get-started.html

But how do I get started and install the software?

I don't know java and I can't find any instructions on what I'm supposed to do with the download.

I am on a Mac.

How do I install the product as a usable program?


Source: (StackOverflow)

Running Selenium scripts with JMeter

I have Selenium automation scripts ready with functional flow, now I want to integrate those scripts with JMeter for load-testing.
Is that possible?
If so how to integrate both?

My first aim is to run the automation script using selenium than run those scripts in jmeter for load or performance testing.


Source: (StackOverflow)

Jmeter alternative [closed]

I'm looking for a freeware / simpler alternative to JMeter. It is a very complete yet complex tool and all I need is to simulate a number of simultaneous calls to a site, grab stats about performance (time to the response) and see how many concurrent calls it can endure without breaking. Some chart thrown in would be useful.

Thanks.


Source: (StackOverflow)

How to clear the results in Aggregate Report's table in JMeter automatically when executing the same test plan again?

So after executing a test run, I have the Aggregate Report's table filled with the data of the test plan that just finished running. Now, when I execute the test plan again, the results are getting added to this data in the Aggregate Report's table, but I would like the table data to be cleaned up before starting to display the results for the current run. Any way to do this?


Source: (StackOverflow)

Access to JMeter script path

Is there a way of accessing the current script's absolute physical path via a variable/property? There doesn't appear to be anything listed via a Debug Sampler.

It's incredibly annoying that actions like loading CSV files and JMX Includes uses the current working directory as its relative path.


Source: (StackOverflow)

Jmeter variable from response

Is it posible to bind to a variable value from response and then pass it as parameter to other http request?


Source: (StackOverflow)

multiple user logins in jmeter

I am using jmeter to test a php application. I need to create a different thread with a unique session for each user. Because in my application you can only have one login per user at a time so putting 100 times the same user I will not get to any conclusion. I have created 40 users user0,user1....user39 with the same password is there a way to automatically create simultaneous threads for each of them?

Thanks


Source: (StackOverflow)

Which gets the measurements right, JMeter or Apache ab?

I started writing some basic tests in JMeter and was surprised that the measurements are so different from those from Apache ab.

I have a gigabit LAN connecting an Intel i7 server running Nginx and an i5 test machine running JMeter or ab. Initially, I am simply testing the out-of-the box Nginx home page response rate.

ab -c 1 -n 100 http://testserver.local/

gives

Document Path:          /
Document Length:        151 bytes

Concurrency Level:      1
Time taken for tests:   0.078 seconds
Complete requests:      100
Failed requests:        0
Write errors:           0
Total transferred:      38400 bytes
HTML transferred:       15100 bytes
Requests per second:    1280.77 [#/sec] (mean)
Time per request:       0.781 [ms] (mean)
Time per request:       0.781 [ms] (mean, across all concurrent requests)
Transfer rate:          480.29 [Kbytes/sec] received

This result is consistently reproducible, +/- a few percent.


In JMeter, I have a 1-user 100-loop thread group containing:

  • an HTTP header manager setting Accept-Encoding: gzip
  • an HTTP Get / sampler
  • a summary report listener

With only 100 samples, this gives wildly inconsistent results each time I run it. But the most startling fact is that the throughput is reported as low as 40 requests per second (not 1280). The highest recorded rate was 1030, and this was achieved only when I increased to 10,000 samples.

Am I right in thinking that JMeter is the wrong tool for simple load tests because its overheads are too high to allow accurate measurements?


Source: (StackOverflow)

How do I pass a variable from one Thread Group to another in JMeter

I have a JMeter test with 2 Thread Groups - the first is a single thread (which creates some inventory) and the second has multiple threads (which purchase all the inventory). I use BeanShell Assertions and XPath Extractors to parse the returned value (which is XML) and store variables (such as the ids of the items to be purchased).

But, values that are created in the first Thread Group, whether extracted into standard ${jmeter} type variables, or ${__BeanShell(vars.get("jmeter"))} type vars, are not available in the second Thread Group. Is there anyway to create a variable in the first Thread Group and make it visible to the second?


Source: (StackOverflow)

What is the highest number of threads that is reasonable to simultaneously run in Jmeter?

I want to use the highest possible number of threads (to use less computers) but without making the bottleneck to be in the client.


Source: (StackOverflow)

Testing with JMeter: how to run N requests per second

I need to test if our system can perform N requests per second. Technically, it's 2 requests to one API, 2 requests to another, and 6 requests to third one. But the important thing that they should happen simultaneously - so 10 requests per second. So, in JMeter I've created three Thread Groups, first defines number of threads 1, and ramp-up time 0. Second thread group is the same, and third thread group defines number of threads 6 and ramp-up time 0. But that doesn't really guarantee it's going to run them per second How do I emulate that? And how do I see the results -- if it was able to perform or wasn't?

Thanks!


Source: (StackOverflow)

How to get JMeter to request gzipped content?

My website serves gzipped content. I verified with Firebug and YSlow. However, JMeter does not request the gzipped content. Therefore, it gets all uncompressed content. As a result, my test cases take much longer (6-10x longer) than they do in reality.

How can I make JMeter request gzipped content from a website?

FYI, I am using the latest stable build: JMeter 2.3.4 r785646.


Source: (StackOverflow)

Session/cookie management in Apache JMeter

We have a simple performance test flow in an application.

  1. We login
  2. Search based on some criteria
  3. repeat searches for different parameters.

We are using Jmeter to do a performance testing. We need to have multiple threads running to test this in a scalable manner.

The way we currently have this arranged is:

-Test Plan
  - Thread Group
      - Cookie Manager
      - Login To application
      - Search on param 1
      - Search on param 2
  - results summary table
  - Summary report

So basically we have summary return table and report present on plan level while cookie manager is present on thread group level.

When I run for one thread it runs fine and completes well. When I scale it to multiple threads, as soon as the next thread kicks off, the session for the last thread is invalidated. This causes failures for all the already running threads due to newly spawned thread.

I reached this result with observation:
1. If I run multiple threads, only last thread has got valid responses in result summary tree
2. If I run with 2 threads with ramp up period as 10 seconds, which means each thread gets time to finish itself, then both of them run successfully.

As per my understanding each thread login's into application and since cookie manager is at thread level, the values will be maintained for session id for each thread respectively? But what is causing the override of the session id value between threads?

Any help will be much appreciated.


Source: (StackOverflow)