Cypress ignore some method from test duration calculation - cypress

I have the following case
// 1. interacting with the UI
// 2. performing a request to an Endpoint from the code using cy.request in order to get
some information like dummy test data
// 3. interacting with the UI
I want cypress to ignore the 2. line from the test execution calculation, how could I achieve that? otherwiese I am getting inaccurate information about the test duration

Related

Save Actual Response time for a Process from Start to Complete in summary report(jtl) in jmeter

I have jmeter test plan in which I create a workflow which transitions statuses like Not Started to In Progress to Completed.
The problem I am having is how I can measure how long it took for workflow status from the time of creation to it get completed? Since we are logging the response time of api calls only.
Is there a way we can extract this info and also add it to the summary (jtl reports?) I was thinking if I could do it from beanshell post processor where I have the wait time calculated and also checking the status of workflow and I could write to the summary result (jtl). How can I do this?
I have the test plan set up something like this:
Thread Group
- Create Workflow API call
- WhileLoop(checking on a flag set by beanshell post processor)
- Wait for 5seconds
- Check for timeout using JSR223 sampler(java)(don't want test to run inevitably if something goes wrong so want to break the loop after a fixed amount of time)
- Get Workflow status API call
- Beanshell post processor to check the response from above call to see if status is Completed or wait time has exceeded. In either of these cases I set the while loop flag false if not repeat the loop wait for 5 seconds and so on.
For the test itself it works as expected.
Use transaction controller to measure the time taken. Please check the reference;-
The Transaction Controller generates an additional sample which
measures the overall time taken to perform the nested test elements.
Hope this helps.

JMeter load test async api

I make a post call to an api, and don't need to log the response (post to google cloud pubsub), but after that i need to measure time it takes for the data to be processed and appear in another GET request (need to keep hitting it unless the response changes).
I also need to measure the performance under load. I tried JMeter but could not figure out a way to get what I wanted. Is there a way to do this in Jmeter? or some other tool that will let me do what i want
You can put your "another GET request" under a While Controller so JMeter will keep sending this request unless it will match some defined condition
You can put the whole sequence of requests under the Transaction Controller - this way JMeter will measure end-to-end duration of the whole scenario

Jmeter Response Assertion Samples Not Failing

I want to stop a thread based on the response assertion, but even though the response assertions are triggering, they are not failing the sample:
As you can see, the first 2 are not failing the sample, but the 3rd one('This page is no longer available'), is failing correctly.
The first 2 assertions are directly on the samples, which are nested under parent controllers, whereas the 3rd assertion is against multiple samples on the level above the bottom simple controller:
Note. If I move either of the first two assertions to the same level as the third assertion, then they correctly fail the sample. But I don't want that as they are specific to their http requests.
Example of Response Assertion not failing sample at sample level, but working at level above:

Developing JMeter test plan with results from multiple REST end points

Is this possible in JMeter to develop a test plan that will have result of first test (an ID) will be input of next test and so on in next test upto 4 tests because each test generates a unique ID and each of these IDs are dependent on each other. Each one is related as follows: submission ID > execution ID > both will generate completion ID with result pass or fail. These are REST API calls. I need to run concurrency users load testing. Finally I need measure latency, throughput from each test.
Between sampler requests, parse the api response using JSON post processor, assign it to ${variable_name} and use it in other requests.
It should look something like this.
Thread group
Userdefined variables
Http Sampler
Regex to get id
Http Sampler
Regex to get id
If you want to measure the response time of all the sampler have a simple controller as parent of all samplers
thank you for quick tip. I was able to get one step working by passing ID into a regular expression, but the same regular expression did not work for 3rd step. Let me give more details here. Basically first post command gives submission ID > I used that ID into regular expression > run a get command in next step with an URL something like '/../2ndStep/submissionId' > this is passed > I'm using the same regular expression in next get command with an URL something like '/../3rdStep/submissionId/executions'> this is supposed to give another executionId and it is failing for me. I'm not sure what I'm missing.
thank you all for suggesting working solution. But I need to do this different way to achieve the following requirement.
When I run POST command test on my REST API HTTP request using JMeter, it returns an ID in response. This ID will be used by other steps for completing the job. I'm currently passing ID into regular expression and using that in between the samplers of each step as it was suggested above and then measuring latency, but the GET steps which are dependent on that ID could take sometime to complete. So I can not put those GET steps into one thread because two of the steps are failing as they could take some time to complete. Is there a way to separate POST command from the remaining and start polling GET commands on the remaining steps automatically to remedy this. Bottom line is I need to measure latency of each step and throughput too. Please let me know if there is a way to achieve this in JMeter?
Thanks again,
Santana

How to stop jmeter during runtime based on coditions?

I wanted to stop jmeter if my conditional logic is false,suppose if one of my conditions gets failed then i need to stop immediately all my threads(jmeter) during run time,so that is there any way stop it running time through code not manually(not thru action to be taken after a sampler error)
Thanks,
in advance
There is 2 options for you:
If your condition can be expressed in If Controller, then use standard Test Action Component to stop test
If you want to stop test when response time or error rate increases some threshod, then use custom AutoStop Component

Resources