SOAP UI - How to determine time taken between steps - groovy

I just want to know what will be the best way to determine time taken between test steps and log an overall average time within free version of SOAP UI? I have a test which has a 2 request steps, lets say request step 1 is step 3 and request step 2 is step 5 in the test case. I am performing a load test so I'm iterating through the test multiple times but want to know the average time taken between request step 1 and until it reaches request step 2 after the whole test has finished.
Any ideas on best practice to do this?

You can verify the Date Header from request's response.

You can add some groovy script in the steps to write timestamps in a file...

Related

Gatling VS Postman: Big difference in response time

I am trying to measure the performance of a single REST endpoint (GET) with Gatling, with a very simple setup like this one:
val httpProtocol: HttpProtocolBuilder = http
.baseUrl("https://domain:8085")
.acceptHeader("*/*");
val scn =
scenario("MyScenario")
.exec(
http("MyRequest")
.get(myPath)
)
setUp(scn.inject(rampUsersPerSec(1) to (1) during (10 seconds))).protocols(httpProtocol)
Which means 1 request per second.
The problem is that the min response time is more than 500ms, average 600ms, but if I do the same test manually with Postman, same endpoint and parameters, the response time is between 150ms and 250ms.
Why could be this difference appear? How can I track the issue?
I verified that the execution time in the server side is the same for both.
Thank you!
Which means 1 request per second - no it doesn't, it means 1 thread executing requests for 10 seconds as fast as it can, given you state response time is around 500ms my expectation is that around 20 requests have been executed which gives approximately 2 requests per second. I don't think it is the real issue, but it's not the "same test"
It's also not the "same test" when it comes to HTTP Headers, Postman sends few more by default like Postman-Token and especially Accept-Encoding which is missing in your Gatling test and present by default in Postman requests and this guy can have quite big impact
In order to be absolutely to send the same request that Postman sends you can just record it using Gatling Recorder

How to set skipLimit when using spring batch framework to execute a step concurrently?

I use spring batch to load data from a file to a database.The job contains only one step.I use a ThreadPoolTaskExecutor to execute step concurrently.The step is similar to this one.
public Step MyStep(){
return StepBuilderFactory.get("MyStep")
.chunk(10000)
.reader(flatFileItemWriter)
.writer(jdbcBatchItemWriter)
.faultTolerant()
.skip(NumberFormatException.class)
.skip(FlatFileParseException.class)
.skipLimit(3)
.throttleLImit(10)
.taskExecutor(taskExecutor)
.build();
}
There are 3 "numberformat" errors in my file,so I set skipLimit 3,but I find that when I execute the job,it will start 10 threads and each thread has 3 skips,so I have 3 * 10 = 30 skips in total,while I only need 3.
So the question is will this cause any problems?And is there any other way to skip exactly 3 times while executing a step concurrently?
github issue
Robert Kasanicky opened BATCH-926 and commented
When chunks execute concurrently each chunk works with its own local copy of skipCount (from StepContribution). Given skipLimit=1 and 10 chunks execute concurrenlty we can end up with successful job execution and 10 skips. As the number of concurrent chunks increases the skipLimit becomes more a limit per chunk rather than job.
Dave Syer commented
I vote for documenting the current behaviour.
Robert Kasanicky commented
documented current behavior in the factory bean
However, this seems to be a correct thing for a very old version of spring batch.
I have a different problem in my code, but the skipLimit seems to be aggregated when I use multiple threads. Albeit the job sometimes hangs without properly failing when SkipLimitException is thrown.

How cache and execute in nodejs a call

I have an application that it's gathering data from another application, both in NodeJS.
I was wondering, how can I trigger sending the data to a third application on certain conditions? For example, every 10 mins if there's data in a bucket or when I have 20 elements to send?
And if the call on the third parties fails, how can I repeat it after 10-15 mins?
EDIT:
The behaviour should be something like:
if you have 1 data posted (axios.post) AND [10 mins passed OR other 10 data posted] SUBMIT to App n.3
What can help me doing so? Can I keep the value saved until those requirements are satisfied?
Thank you <3
You can use packages like node-schedule which is popular to schedule tasks. When callback runs check if there is enough data(posts) to send.

JMeter reports are different in Jenkins

I have a JMeter test that has two thread groups. The first thread group goes out and gets auth and audit tokens. The second requires the tokens to test the APIs on which I'm interested in gathering performance data. I have Listeners set up as children of the samplers in the second thread group only. Running JMeter I get the results I want. But when I execute the same test from Jenkins, I get results from the both of the thread groups. I don't want the results from the first thread group. They clutter up my graphs and since there is only one execution of each they fluctuate, performance wise, enough to trigger my unstable/failed percentages routinely. Is there a way to get Jenkins to report on only the listeners/samplers I want? Do I have to run one test to get the tokens and another to test? If so, how do I pass the tokens from one test to the other?
You can execute 2 jenkins jobs:
First job write to file the tokens using BeanShell/JSR223 PostProcessor
Second job read the tokens from file using CSV Data Set Config

JMeter count samplers in thread , passed samplers, failed samplers

I am trying to do functional testing with JMeter for a Web service. I am trying to build a tractability metrics using JMeter itself for which I need the count of the samplers in a thread, no of passed samplers, failed samplers in a thread.
Is there any way to collect no of the samplers, failed or passed samplers in a thread?
Any help is much appreciated.
Thanks
By adding Aggregate Report listener to your test, you will be able to get the number of passed and failed requests details. Below is the purpose of aggregate report.
The aggregate report creates a table row for each differently named
request in your test. For each request, it totals the response
information and provides request count, min, max, average, error rate,
approximate throughput (request/second) and Kilobytes per second
throughput. Once the test is done, the throughput is the actual
through for the duration of the entire test.
Also, you can leverage View Results Tree, View Results in Table and Debug Sampler to debug your samplers.
To enable functional test mode in JMeter, click on the Test Plan and then check Functional Test Mode check box as shown below.

Resources