Mayank
Mayank

Reputation: 71

File is not got uploaded in case script run in Jmeter

I recorded a file uploading scenario and successfully saved in web application now when i try to run recorded script by updating "send file with request" by some other file. there is no error seems in log but file is not getting upload in web application in case i run recorded script

Please Help!

enter image description here

Upvotes: 0

Views: 506

Answers (1)

Dmitri T
Dmitri T

Reputation: 168217

  1. First of all add View Results Tree listener and inspect "Request" and "Response Data" tabs. JMeter automatically considers requests with response code < 400 as successful so even if file upload didn't happen but browser responded with HTTP Code 200 (OK) - you won't see any errors or failed tests.
  2. Usually ability to upload a file somewhere requires being authenticated (logged in). Try adding HTTP Cookie Manager to your test plan
  3. Sometimes application under test uses dynamic parameters which are generated in runtime. So it won't be possible to record and successfully replay scenario. If you record the same request 2 times, inspect recorded requests and see the differences - it means you'll need to perform "correlation" - process of extracting dynamic parameters from previous response and adding them to next request. The most commonly used test element for this is Regular Expression Extractor.

Upvotes: 1

Related Questions