Chance of data mismatch when Multiple users share datafiles - jmeter

The sceanrio is: change user password(User will change password to new password).
I have to run a fixed number of users for 1hr duration.
Input I have is: A fixed number of userids set to the same password.
The data file (username,password,newpassword) in case of 3 users ( users can vary Up to 200) is like:
u1,p1,newp1
u2,p1,newp1
u3,p1,newp1
u1,newp1,newp2
u2,newp1,newp2
u3,newp1,newp2
u1,newp2,newp3
u2,newp2,newp3
u3,newp2,newp3....
The mode used for csv data config is shared across " all threads".
So basically all users will start with password p1 and change it to newp1 in the first iteration. Then for next iteration the current password will be newp1 and it will changed to newp1.
Initially I will use a 5-10 minute ramp up.
The doubt is: This is working in case of few users. But is it sure that all the users will pick the data from csv in the correct order for a prolonged duration?
For example if some of the users finish the iteration earlier will they pick the userids already in process by other ids?
Any miss match will affect the execution since assumption is the users will pick the correct current and new passwords. Also one failure will fail all reamaining iterations.
Please check this approach is correct and suggest modifications if needed. Also feel free to suggest if you have a better approach for the scenario.

Related

jMeter how to make user wait until the previous loop is done

I am new to jmeter, so please bare with me if I have asked a silly question. I have a thread where I want to run that thread like 100 times. In the thread I have scripts like
Add a member to a mailbox,
Get the mailbox details and confirm the member added was displayed
update the member role in that mailbox
Delete the member from that mailbox
I am using same mailbox and user for my test for my loop. Here the issue is the same member cannot be added to the same mailbox unless we delete that member from that mailbox.
So when I run the test with just 5 iterations, the add script for first iteration was passed and next 4 iterations for that add script getting failed. Because the first thread already added the user to that mailbox and while the second user tries to add the same user it fails, that's expected.
Steps I tried:
I even tried using constant timer in my add script to wait for 4secs so my previous user actions should be done. That's my understanding. Please correct me if that's wrong.
The other thing I tried was ramp-up time to 8 secs and then the script for 5 users ran fine. But when I increase the users to 50 then almost 50% of the scripts failed.
Here comes my problem. How do I make the second user to wait until the first user done with the delete script, so second user can use the same data and so on.
Attached are some screens of my scripts
Please let me know if you need any other information.
Thanks
Each JMeter thread (virtual user) should represent a real user with its own credentials and mailbox. Credentials and/or mailbox can be parameterized, normally people use CSV Data Set Config to provide test data for JMeter scripts
If you have only one user/mailbox - you won't be able to use more than 1 thread (virtual user) in the Thread Group, to wit if you need to run the scenario 100 times - you need to set it up like:
Another option is using Critical Section Controller. But be aware that there will be no concurrency (only 1 user will be running the test at a time), if you need to have more - you will need to use different credentials for different users

Same login/password pair is used for multiple threads sign in

I am trying to simulate the scenario when multiple users(100) are logged in using login\password from my CSV file, where I have 10 different combinations of valid credentials. But the problem is that JMeter always takes the same login\password pair from my CSV file for all simulated users. The only way to solve it is to set Ramp-Up period of my Thread Group to be 0, but this seems to be not so plausible scenario, is it?
Make sure Sharing Mode is set to All Threads.
Also, it looks like you're trying to have 100 Threads split up a set of 10 credentials, and there's not enough to go around. You will probably get 10 sets of threads all logging in with the same username/password. Try adding more usernames.
I'm not sure why a very small ramp up would fix this unless: if you don't have any think times, a user might go through your script quite quickly, then log in again with the same credentials. Even then, I'd expect it to get a new set, though.
SEE:
CSV_Data_Set_Config

how to avoid a request timing out when uploading and resizing large amount of images in Coldfusion?

I'm running Coldfusion8 and have a cfc, that loops through a set of database records.
Each record contains two fields image path and image file. I'm constructing a path for every image, upload it to a temp folder, resize and then store it to S3.
Depending on the number of records, this may take quite some time and I have not been able to successfully finish the upload cycle with larger sets of images (eventually times out).
I'm already settings my timeout threshold to 5000, but it still does not seem enough.
I can pick up where I left, because I'm keeping a media log to check against, before uploading to S3. This way I can finish the task, but I need to trigger this function 5x to upload 400 items.
Question:
Is there way to avoid a timeout without setting (in S3 case) httptimeout to some 50000000? And would it make sense to run this in a CFTHREAD or will this be a problem if the user leaves the import page while the system is still uploading?
Thanks for some insights.
You can use a CFthread to perform the task, but make sure you LOCK THE SCOPE! otherwise you could end up running this memory intensive proccess several times over and kill the server, you only want this proccess running once at a time if its so intensive.
You have other options though, if this is not something that your application users will need to run and its a one-off proccess your doing, you could set a scheduled task with an exceedingly long timeout to run overnight, when the server is not very high use, This allows you to set the timeout independently to the application so the rest of the application is unaffected by global timeout changes.
Another option is, if this is something users will be doing semi-regularly then a thread which pushes a notification via email, log or other means (Ajax or Websockets) letting the user know they're task is complete. This has the upside that timeouts can be changed, calculated on the amount of data to be proccessed dynamically at thread generation. However, if your not careful you can overload your server with many threads proccessing large datasets (plus log file read-write locks will be harder to manage).
I would encourage you though, to take this away and see what solution works for you and post your final solution so others can see what the outcome is.
Hope this helps.

Define a group of requests in order to obtain a total time in Jmeter

I would like to know if there is anyway to create a group of HTTP requests in order to obtain the total time of a request ?
Let me to explain better when i start a login process several resources are loaded since i don't know how to group this login process i have to make a sum of all this resources in order to obtain the waiting time to finish the login. In one user is easy but since i'm testing 1000 user simultaneous it became impossible.
( i want to create a graphic using the number of user vs time of waiting )
best regards.
Use Transaction Controller as parent of those requests that you need to group together.
To produce graph I suggest you use JMeter Plugins and their Ultimate Thread Group to better control number of users and to show results use Composite Graph in which you'll show number of users and response time.
If you don't want time component you can use Response times vs Threads. It'll show you number of users on X and response time on Y axis.

Why is Cacti showing an empty graph, even though the rrd file is created?

I have developed my own SNMP service, and i want to plot a graph of an OID provided.
So, i have created a graph in Cacti.
-) It is showing device up.
-) It is creating rrd file. (RRDTool says OK).
-) Showing the graph, but it's empty.
But when I check it, say
rrdtool fetch <rrd file> AVERAGE
it shows me nan for all the values. The monitored OID has value 47 and i have set min=0 and max=100.
I am using Cacti appliance by rpath:
http://www.rpath.org/ui/#/appliances?id=http://www.rpath.org/api/products/cacti-appliance
Still, I can't show value on graph..
Where is the problem? Can anyone please tell me?
First of all, use Cacti's "Rebuild Poller Cache" function under the Utilities menu.
If that didn't work ,check if the RRD file is actually updating with new data.
To do this use the command:
rrdtool last [filename.rrd]
This will output the last time (in unix timestamp) that a new value has been inserted into the RRA file which you can compare to the current time that date +%s will output.
If it's not updating with data then you should change the cacti log level to DEBUG via the settings page on Cacti's web UI and look for appropriate messages.
If the poller couldn't get the data then it's usually an issue relating to connectiviy/SNMP.
You can further check issues as such by manually polling the specific OID on that host:
snmpwalk -c[SNMP COMMUNITY] -v2c [HOSTNAME OR IP ADDRESS] 1.3.6.1.2.1
You can use the above command and OID (1.3.6.1.2.1) just to see if you're getting a reply.
If that worked then you should change the command from snmpwalk to snmpget and the OID to the actual OID you're trying to poll and retry.
If the RRD is updating with new data but you're still getting NaN in your graphs then I suggest looking into the heartbeat and step values of the data source (via the data template) in relation to your polling interval and poller cronjob interval.
These values determine how many times the RRD file will miss data before inserting a NaN.
The cronjob calls the cacti poller to start performing it's polling cycle.
The poller interval is the actual time that the poller will wait between two polling cycles if it was indeed invoked in time by the cronjob.
So for 1 minute polling (on the poller and the cronjob) you will have to use a step of 60 (seconds) and a heartbeat of 120.
For 5 minutes polling, the step will be 300 and the heartbeat will be 600.
This is mainly caused by someone changing the poller interval on the settings page.
Gandalf from the Cacti forums wrote a nice Guide that you can use and further help can be found on Cacti forums.
Good luck! :)
Maybe cacti doesn't have the needed permissions to access the rrd file and your test was done with a user who has the required permissions, for example root?
Are you sure you have collected enough data?
If your RRD has a step of 1 minute, and your first RRA has a consolidated count of 1 (1cdp=1pdp), then you should collect data for at least (step x ( count + 1 )) seconds before you expect to see any data in the graph. Make sure you are collecting data at least as often as the step size.
If you collect data for 10 min and nothing shows up, then make sure you are actually collecting the data, make sure the values you get are within range, and that they are being used. Check the last modification time on the RRD file. Print out the values before you update to verify they are what you think they are.
You should double check the range Cacti is plotting in. I moved the values in the graph filter and spotted a little chunk of data in the graphs, then you just have to adjust it.

Resources