How could I simulate the following scenario in JMETER? - multithreading

I want to do the following:
-20 users log into the application.
-The users have to remain connected to the session, but each 20 minutes they have to make an specific request to the page.
-I would like to measure the time of the last request for each user after being connected the 2 hours and making the specific request each 20 minutes.
Which thread group or actions will be recomendable?

Add Thread Group and configure it as follows:
where:
20 - is the number of connected users
6 - is the number of iterations (user makes a request each 20 minutes == 3 requests per hour == 6 requests per 2 hours)
Add Once Only Controller
Add sampler(s) performing the login under the Once Only Controller. This way the users will perform the login only once
Add HTTP Request sampler which you're going to run each 20 minutes below the Once Only Controller
Add JSR223 PostProcessor as a child of the HTTP Request and put the following code into "Script" area:
if (vars.get('__jm__Thread Group__idx') != '5') {
prev.setIgnore()
}
this will instruct JMeter to not to record first 5 iterations metrics, only last one will be recorded.
Add Flow Control Action sampler and configure it to sleep for 1200000 milliseconds (20 minutes)
Test plan overview:

Related

Maths - Calculate Time Required to Process Requests

I am trying to come up with a formula to calculate time required as per following configuration:
It takes 40 seconds to process each request. Server allows 3 requests per IP address per second.
If we use 50 proxies to process 200 requests, how much time will be required to complete all requests? I need the formula where number of requests and number of proxies can be variables.

Azure logic app twitter trigger not working

I have created a logic app to trigger when a tweet is posted with a given hashtag. The trigger is set to check every 10 seconds. The reality is that the Logic App does not run, even if I wait minutes for it, but then if i manually run it, it then executes with the expected input. Any idea what is happening here?
I was having a similar issue, and believe this is due to the specific limitations set for the Twitter Connector (4. Frequency of trigger polls: 1 hour).
https://learn.microsoft.com/en-us/connectors/twitterconnector/
LIMITS
The following are some of the limits and restrictions:
Maximum number of connections per user: 2
API call rate limit for POST operation: 12 per hour
API call rate limit for other operations: 600 per hour
Frequency of trigger polls: 1 hour
Maximum size of image upload: 5 MB
Maximum size of video upload: 15 MB
Maximum number of search results: 100
Maximum number of new tweets tracked within one polling interval: 5
There should be some error occurred. You can inspect all runs of the triggers on the 'Trigger History' blade. This page gives a good overview of monitoring of logic apps: https://azure.microsoft.com/en-us/documentation/articles/app-service-logic-monitor-your-logic-apps/

Gatling (performance test):how to perform task in background every x-minutes

I would like to know how to perform a task in the background every x-minutes with Gatling.
Background:
I want to write a couple of scenario's on our backend. Our backend will be called by another backend in this case. A usual scenario:
client (backend) to server authentication (optional)
client requests X
client requests Y
client requests Z
I want a scenario where requests 'X, Y and Z' are performed.
The problem: The backend(client) to backend (server) authentication is performed with accessTokens. This accesToken will expire a couple of times within a total simulation, however I dont want to do this authentication every scenario. (since that might than be the bottleneck). For example : the token expires every 10 minutes, a scenario takes 5 seconds, and the total simulation will be 2 hours.
Question: How can I create a simulation that will refresh the accesstoken on the background every 10 minutes. In a real-life scenario the backend(client) will just have a background process that updates the accesToken (in memory, or shared, state) every 10 mins. Once again: I don't want to re-authenticate every scenario (call X, call Y, call Z).
if it suits to consider the looping a part of the scenario, then you should be able to achieve what you want by using a duration / deadline and conditional execution.
eg
import scala.concurrent.duration._
val executionTime = 2 hours
val authTimeout = 10 minutes
val safetyMargin = 30 seconds
val authenticate : ChainBuilder = exec(login)
.exec(session => session.set("timeout", authTimeout.fromNow))
scn = scenario("scenarioXYZ")
.exec(authenticate)
.during(executionTime) {
doIf(session => {session.get("timeout").as[Deadline].timeleft <= safteyMargin}) {
exec(authenticate)
}
.exec(requestX)
.exec(requestY)
.exec(requestZ)
}
}
so login (setting your token) and set a Deadline for when the token will expire
then loop for as long as you need to, and on each loop if the authentication has less that some specified amount remaining then authenticate again and set a new expected expiry

Need excel coding to pushing the incoming flow jobs

I have a query , I would like to create a excel template which should update me the time required for required for the jobs comes in
For instance
I have 30 employee who can work works on 20 request from 1 AM -2 AM with effort involved will be 3 hours i.e 180 minutes
If we have about 20 request incoming how can we automatically excel whould update the time required
May be 210 Minutes or 240 Minutes somehting like that
can u guide me

Transaction per second - vuser relation

I want to setup loadtest with Loadrunner. System requirements are as below
1- max 30K users can be online i want to test if system can reach 15TPS.
2- i want to test if system can reach 2000TPS while some of online
users can visit 5 different pages. With how many vusers i should do this test ?
For both browsing and login operations response time is 0.1 or 0.2 seconds but think-time is ignored for login operation but 5 minutes for browsing operations. ( This value can be changed for sake of simplecity.) For login operation i setup vusers count to 30 and used 1000 iterations for reaching 15TPS.
i know that we can calculate vusers with below
number of required VUsers = required transaction per seconds * user
scenario length (sec)
but i m not sure how to apply this to second scenario.
Required TPS =15
users 5
Pacing =5/15
use this and it will work

Resources