I am trying to get Response Time in Cypress - cypress

How can I check Response Time in Cypress? I need to check how long it takes to log into a demo website which doesn't use API. Thank you.

Related

Need help to login oauth secured webapplication using Jmeter

I am trying to use record and playback to perform performance testing of OAuth-secured aplication. But I am not able to capture access token as it is getting generated with help of AWS Cognito.
I have also tried to use Selenium to login to web application, but Chrome is opening just for a sec and getting closed automatically without executing further code, and not even throwing any error.
I need help. How should I proceed with it?
I am using JMeter 5.5.
Thanks in advance.
Login using selenium - browser is getting closed in few seconds
try setting up AWS SDK for java
You need to send a properly formed request to the Authorize endpoint. If you need to supply a code_challenge - it can be calculated using JSR223 PreProcessor and Groovy language
With regards to " crome is opening just for a sec and getting closed automatically" - check request and response details using View Results Tree listener and if it's empty - take a look at jmeter.log file, you will see the error in at least one of these places.

How to get the response time of calls made within an API with Jmeter

I'm using J-meter to get response time for an API via HTTP request but this API internally few more api services. Now, i need the response time taken by these internal calls too.
Pls could anyone assist to get this one sorted via J-meter
Below is what I can think of:-
Check on "Follow Redirect" and then use listener like "View Result tree" or "Simple Data Writer" to write the output in an XML format instead of CSV. There you can find the redirected URLs and response time.
But, XML creation will consumer a lot of resource and should be avoided.
Second, use post processor and fetch the response time from the sampler results along with redirected URL and write it in a csv. This requires some coding.

Response message: Unauthorized in Jmeter

I'm new to using Jmeter tool.
I have recorded my application using blazemeter (v3.1) and then trying to run that .jmx file in Jmeter, however I am running into an authorization issue and the script fails to run.
I have also tried setting my "HTTP Authorization Manager" with username, url, password but it does not help. If anyone can, please guide me on this Issue. Thanks.
As per 4 Things You Should Never Do with Your JMeter Script article:
Don’t run the script exactly as you recorded it
After recording your script, there is still some work to do before you run it. It’s necessary to correlate variables, parameterize and add elements, to faithfully simulate users.
There are too many ways of possible authentication implementation in your application, most probably you need to send some dynamic value along with credentials which can be fetched from the previous request.
Record your test scenario 2 times and compare recorded requests. Be careful as differences might be in response headers and URL, not only in response data. It makes sense to add View Results Tree listener directly to HTTP(S) Test Script Recorder - this way you will be able to see what data is captured by JMeter and amend its configuration so simulated request would look exactly like the request from the real browser.

Save response from certain WEB resources while recording scenario

I need to create scenario for user interaction with single-page WEB application. The application does lots of AJAX calls in order to authenticate user and get user data.
So I created simple scenario with HTTP Test Script Recorder and tried to record my script.
Everything went well, however I noticed that whilst request data is recorder properly, the response data is not recorder at all. I tried to enable Add assertions and Regex matching - but that didn't work as well.
Can you please advice how do I record response texts as well?
View Results Tree under proxy will record request, responses during recording.
This is useful to understand where a dynamic field comes from. This will help your find from which response X you need to extract data to inject in request X+N.
I think you may find this option useful to add in user.properties:
proxy.number.requests=true
This will give a number to each request and corresponding sampler so you will be able to find response for the request.
Once you have done this, you will start adding Post Processors (Regex, CSS/JQuery, XPAth ...) to Sampler X to extract data from its response.
This will create variables you can then use as ${varName} in request X+N.

Lag in Ajax response

I am sending an ajax request to a controller/action in Codeigniter and it does some manipulation and sends a response.
The response that I get is accurate but the time taken for it to send the response is 4-5 seconds which is huge.
I was able to debug and pin point the cause of this lag. At the end of the method I am sending a mail. I am using mail() function here. I am even suppressing the error by writing #mail(), so on localhost it is not giving any error and executes well on the live server.
But even though there is no error, there is lag in both the environment i.e. locally and on Live server. I am not sure what the problem is.
Now as soon as I remove/comment out the mail() function, the response is instantaneous and lightning quick.
Please let me know what might be the issue what might be the possible solution.
Thanks in advance.
PHP mail() is very limited. Try using the code igniter Email class: http://codeigniter.com/user_guide/libraries/email.html

Resources