My Application allows only one user to login/perform any operation at a time but jmeter is able to do the same process/request multiple times without throwing any error using same user credential simultaneously. I've used record and play function of Jmeter and it is able to do the same request multiple times without throwing any error. I have used multiple users in my thread group that's why it is doing same request multiple time but this should be shown in red or fail as my application support that one user can be used only once to perform any operation.
And the question is?– dzieciouMar 14, 2016 at 14:30
You have described the situation but for people to be able to assist, you will need to add your error and what you tried to get past it– ECiurleoMar 14, 2016 at 15:15
Dhiman has got my point correctly but my question is If i am not using any Assertion in my execution and it's a plain record and play scripts then the work done by jmeter is valid or not considering my application use. If it's right behavior from jmeter as my end goal is to measure the time taken by that request to perform the operation successfully please help me more about the logic or any article for the same. Is it mandatory to add the assertion or csv i/p to validate my application use or the current working by jmeter is also fine– Vikash kumarMar 15, 2016 at 9:49
If I understand your issue correctly, you wonder why JMeter is not showing fail request in red color for multiple users, Right?
No, this is not how JMeter works, actually red color/failed request is shown only when your application throws error or JMeter didn't get any valid response. In your case your application has restriction that one user can login only at one time and not from multiple machines at same time. But when you run script using JMeter with same user multiple times, your application still passes a valid response to JMeter (like 'User already logged In' or 'Not able to login' or most of the times 'Application throws user back to login page') and that's why you get a normal sequence in results and not the red color. This is how JMeter works, it doesn't care about the expected response and if you analyze the results you will see that users other than first user has not actually been able to login.
So, if you use a 'Tree Listener' and navigate to the request which you expected to be in Red, and open the "Response Data" tab, then you will see the HTML response of the request sent and received by JMeter, this response will tell you what actually has happened and you might be able to see that any user other than the First one is not able to Login i.e. for other users you will either see the Login page or Validation message.
Now, you need to understand the difference in Expected and Valid Response.
Expected Response: is the response you are expecting and you want JMeter to validate the same too and then show a Pass/Fail request on the basis of the expected response vs. actual response. You can do this using Assertions and in your case you should use it just to see the difference. You can use the 'Response Assertion' for validate the response i.e. Homepage is shown or not.
Valid Response: is a non-error response which JMeter has received from the application it can be Expected one or non-expected one.
Dhiman, you've got my point correctly but my question is If i am not using any Assertion in my execution and it's a plain record and play scripts then the work done by jmeter is valid or not considering my application use. If it's right behavior from jmeter as my end goal is to measure the time taken by that request to perform the operation successfully. Please help me more about the logic or any article for the same. Is it mandatory to add the assertion or csv i/p to validate my application use or the current working by jmeter is also fine. Mar 15, 2016 at 10:06
Anyways thanks for your help , but again in my case all the 3 users are showing at login page in the HTML response data of tree listener instead of showing one user logged in and others at log-in page as mentioned by you :) Mar 15, 2016 at 10:06
the response data also is same for all the users. All the user/threads are getting the same response from the server using the same user credentials. Instead of throwing error it's showing the same response data to all the users. How is this possible i literally believe this is a bug as my system allow one user to login once at a time and the Jmeter is showing 3 same responses using the same user credentials logged in simultaneously.?? Mar 15, 2016 at 14:25
It is not a bug. There is difference in your understanding of 'error' and what JMeter shows as an 'error'. Simply add response assertion to your login request and you will see that JMeter will start showing it as error. Just understand this concept. Its pretty basic in my opinion :) Mar 16, 2016 at 6:17
@ TestingWithArif : I think you've misunderstood my point, pls read my last comment again as i am talking about the same Response Data (Not response code) given to the multiple threads by Jmeter using the same user credentials and i am reiterating this again "my system allow a user to login once at a time" Mar 16, 2016 at 8:43