Jmeter View Results tree displaying Multiple urls in single Http Request - jmeter

I'm working on web application performance testing to Create the Customers,i've recorded the script using Recording Controller.Once i execute the same i'm getting failure in View Results Tree because one HTTP Sample loading Multiple URL's under one HTTP Samples as below.
View Results Tree
Login
-http://ipaddress:port/login
-http://ipaddress:port/registration
Home
-http://ipaddress:port/login
-http://ipaddress:port/registration-home
In Login sample it got fail because giving error in registration page,Please help how to resolve this type issues.

Related

Omit the redirection responses on the html report results when running performance tests using JMeter

I'm running performance tests against a server, which uses a proxy that redirects (302) to the real backend service (api under test).
As result of that, when running the tests I get always two responses per requests (302 and 200) which is totally fine, but I wouldn't like it to be displayed in the html report that i generate using JMeter CLI:
jmeter -n -t Workbench_Performance_Test_Plan.jmx -l LoadTest/loadtest.csv -e -o LoadTest/HtmlReport -f
So these are displayed as get link by id-0 and get link by id-1
I've seen there is a way to filter by success or error in the View Results Tree or Table, but is there a way to omit those additional requests (302) using any kind of filtering without removing the errors?
Many thanks for your help.
I post my solution here in case anybody runs into the same issue.
In the Http Request Sampler there is a checkbox to force "Redirect Automatically" that has to be checked:
So in this way the published results (as well as the View Result tree output) will display only one row or item per request:

Jmeter script is working fine for single user but failures at multiple users and not able to retrieve response from server

My application end to end scenarios are working with single user iteration with all post processors data working fine But when I increase multiple users in thread group and run the same scenario..scripts getting failed in the middle due to some requests are not properly executed leads correlation fails...attached my scripts and error message, scripts files located at below drive link
https://drive.google.com/open?id=13IPlVh-Zi2AJOioGeCuHihyxYiDeRBLK
Please help me how to resolve this issue, as this is highly important to proceed further.
You're not being able to click any order from the search results as there are no order search results - there are simply no orders to choose from as you're not getting logged in by 2nd user
My expectation is that this is due to wrong test structure, i.e. you have the requests like:
/login_check
/user/showInfoBox
etc.
under the Parallel Controller however the Parallel Controller's children are being executed at the same time.
Real browser first executes login_check request followed by / followed by index.php, so you should put only css and ajax calls under the Parallel Controller otherwise you may run into the situation when the AJAX calls are being fired already and you haven't been logged in yet.
Check out How to Debug your Apache JMeter Script article for more information on JMeter tests troubleshooting techniques.

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
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.
Usually ability to upload a file somewhere requires being authenticated (logged in). Try adding HTTP Cookie Manager to your test plan
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.

Data entry through Jmeter not reflected in UI of application

I'm using Jmeter to perform load test on Moodle application
I followed the below steps to replicate a simple "add company " test scenario
1: Recorded the browser actions through HTTP Test script recorder and created a test plan with thread user of 1
2: Added HTTP Cache Manager,Added regular expression extractor for retrieving dynamically generated session for login HTTP request.
For Http request of adding new company, addded user parameters containing new company name
I run the test, everything seems ok in the view results tree- response section (response code: 200,response message:OK), all the required variables are passed in the HTTP POST
PROBLEM: New company added through Jmeter test is not reflected in UI of the moodle action
Can any of you please let me know
Is there something I could be missing or anyway I can debug the problem?
P.S: I'm new to Jmeter and looked around a lot for data inputted through Jmeter not being displayed in the UI of the web application,dint find useful results.
The answer to questions of this sort is almost always that you missed some necessary dynamic value besides session ID which you did catch.
An HTTP200 response just means the server returned a "good" response. Which could also happily contain an error message.
I would check the actual html body of the returned response for any errors. Checking the log on the server side can give you clues to what went wrong sometimes. You should also try adding a cookie manager.
Run your test with 1 virtual user in GUI mode with View Results Tree listener enabled and inspect responses to see where your scripts fails. My expectation is that you simply cannot log in.
See Moodle-JMeter-LoadTest.jmx file for reference, it uses XPath Extractor to get session key and course id.
I don't think you can test using JMeter. Try JUnit Test cases instead http://jakarta.apache.org/jmeter/usermanual/junitsampler_tutorial.pdf

Tips to confirm JMeter script is working when receiving no errors

I am running a JMeter script to hit a web page that opens another link to a shopping cart. There are a few different urls that JMeter recorded for me using the HTTP Script Recorder. When running the JMeter script, I receive no errors in any logs ( JMeter log and a few summary report / View results tree logs ). I even added a Constant Timer to some of the pages that do actually take a few seconds to load when hitting them manually in a web browser. In the end, I cannot see what is happening, but JMeter also does not indicate any errors. How can I confirm that each url hit is actually succeeding so that the shopping cart actually gives me my item when JMeter is done?
If JMeter is able to make a http request successfully, it will be always green in View Results Tree (200 http code). It does not mean that your test is correct - ie even if the login is not successful JMeter does not report it as error/failure unless you validate the response.
I think you need assertions to ensure that the http response you get is as you are expecting.

Resources