2

For an Angular based web application: Is it useful to include the requests to get javascript and css files? Knowing that the files will be stored in the browser cache after the first visit.

I am tempted to only include XHR calls like authenticate, loading and saving data, ...

2

Think about the purpose of your tests. Are you looking at a small number of users using the system, perhaps just one user, each from the same computer? Are you looking at many users from many computers using the system? For the former once the cache is loaded few JS and CSS etc files will be requested from the server. For the latter, each simulated user will be visiting from another computer and their cache will be, initially, empty, so all the JS and CSS etc should be requested from the server.

1
  • It's for a test with a lot of different users. You're right I will include the css en js files. Thanks for your input!
    – Charlie
    Jan 2 '15 at 11:54
1

I believe that JMeter Load Test needs to look as close to reality as possible.

Particular in your case:

  1. Real browsers of real users download all embedded resources like images, scripts, styles, etc.
  2. Real browsers of real users do it only once, on the next request(s) those resources are returned from the browser cache.

To simulate this behavior (and also to let JMeter respect "Cache-Control" and "Expires" headers) just add a HTTP Cache Manager to your Test Plan - it will be the best option.

Other test elements which can make your test more realistic are:

1
  • I am already using the cookie manager, header manager and request defaults :) Will definitely try the cache manager. thanks!
    – Charlie
    Feb 9 '15 at 12:17

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.