문제

I'm a newbie to jMeter, so please bear with me.

I've been assigned the task of testing how an e-commerce website responds under load. I've managed to set up basic tests in jMeter that basically just repeatedly visit the home page, but I'd like to simulate something a bit more realistic:

  • User arrives on home page
  • User goes to catalogue page
  • User views product
  • User adds product to cart
  • User returns to catalogue, selects another product, adds to cart
  • User removes first product from cart
  • User proceeds to checkout
  • User completes checkout process.

I'm having trouble finding adequate documentation to explain how to do this. I figured out that I need a cookie manager in my test so that the user session will be maintained, but I haven't figured out how to get the user to traverse the site in a realistic use pattern (such as the one described above). Can anyone help out with this, give me some pointers as where to look for good examples, etc?

도움이 되었습니까?

해결책

This should be no problem, record or manually create the necessary steps as HTTP Samplers, then add them into a Runtime Controller for example to execute them iteratively.

The individual steps will be executed in the order they are in the tree and, in case Cookies are used to handle session state, you might need to add the Cookie Manager to the top of the tree which will handle cookie headers for each user.

Add some timers to simulate user's think time and scale up by increasing the number of virtual users in the thread group.

Use some listener like the Aggregate Report to view the response times for every step.

다른 팁

Try to read http://jmeter.apache.org/usermanual/index.html at first.

Also you'll encounter the problem that Jmeter can't process dynamic pages: http://wiki.apache.org/jmeter/JMeterFAQ#Does_JMeter_process_dynamic_pages_.28e.g._Javascript_and_applets.29

Does JMeter process dynamic pages (e.g. Javascript and applets)?

No. JMeter does not process Javascript or applets embedded in HTML pages.

JMeter can download the relevant resources (some embedded resources are downloaded automatically if the correct options are set), but it does not process the HTML and execute any Javascript functions.

If the page uses Javascript to build up a URL or submit a form, you can use the Proxy Recording facility to create the necessary sampler. If this is not possible, then manual inspection of the code may be needed to determine what the Javascript is doing.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top