cancel
Showing results for 
Search instead for 
Did you mean: 

test run takes longer than actual processing

SOLVED
Highlighted
Frequent Contributor

test run takes longer than actual processing

Hello,

 

I have a test case with a groovy step. The step does some processing but it's a bit long so I logged info at the beginning and the end of the step. When I execute it I get my traces within the same second but processing actually takes several seconds. This occurs with or without teardown script.

Does anyone knows why this occurs ?

Is there any preference to set to avoid this ?

 

thank you

 

Alexandre

1 ACCEPTED SOLUTION

Accepted Solutions
Frequent Contributor

Re: test run takes longer than actual processing

Hello,

Thank you for your responses. As I crossed informations from you and smartbear support, I tried to remove readyapi.h2.db and dashboard.h2.db from the db directory as, in my case, they were huge (over 600M and over 300M respectively) and now Ready API behaves as before.

Test case execution is very fast and does no longer hangs. A testSuite execution that took 2 minutes with the hanging problem now takes 4 seconds.

I'm not sure if its a stable and long lasting solution (and it seems that my project is corrupted on other features) but for now it solves that critical problem for me

7 REPLIES 7
Community Hero

Re: test run takes longer than actual processing

We are going to need some more details, but I do not think that this comes down to a simple preference that can be set. First, what is the groovy script doing? If it's parsing the response data that will take some time, especially if the response is large or if the script is inefficient. 

 

Can you provde details on what the script is doing?




---

Click the Accept as Solution button if my answer has helped, and remember to give kudos where appropriate too!
Frequent Contributor

Re: test run takes longer than actual processing

Hi, in the mean time I changed my way of testing in order to see what's wrong, I've set a testcase with two "run test case" steps (calling the same REST API) for which I've set a logging trace in setup and teardown script, and a groovy step printing "stop". When I execute it it gives me the following :

Mon May 27 15:27:47 CEST 2019: INFO: begin
Mon May 27 15:27:47 CEST 2019: INFO: end
Mon May 27 15:28:08 CEST 2019: INFO: begin
Mon May 27 15:28:08 CEST 2019: INFO: end
Mon May 27 15:28:13 CEST 2019: INFO: stop test

 

As you can see, the gap between test steps is more than 20s.

ReadyAPILog shows that REST request takes less than 100ms ...

 

I don't understand what I've done to do this. It was working pretty fine before  Smiley SadSmiley Sad

 

Community Hero

Re: test run takes longer than actual processing

How large is the response to the rest API calls? SoapUI processes the responses, applies pretty print, etc., and has to process any/all assertions. That 20s delay may be from that. 




---

Click the Accept as Solution button if my answer has helped, and remember to give kudos where appropriate too!
Frequent Contributor

Re: test run takes longer than actual processing

The response is quite large, indeed, but I applied filters to limit it and this does not make difference.

Concerning assertions, I limit it to HTTP return checking.

I tried again this morning as I wanted to test with less parameters. I restarted ready API and launched a test case with log.info and minimal processing and I got ready API completely stuck.

Is there a 'settling time' to observe with ready API ? because after ready API was released from my previous testCase run, now it seems to work as before.

You say that SoapUI processes the responses, but, as the response has been set in a custom property (in the TD script) at the end of the test, it means that it has been fully processed, right ? in that case, why is there additional delay ?

Community Hero

Re: test run takes longer than actual processing

How large is large? How reduced is the filtered response? In either case, ReadyAPI receives a string of data from whatever REST service you are calling and has to receive the response, interpret the response, and then output the response to the GUI. All of that takes processing time, no matter what assertions you use. Assertions on top of that can also take time. Add in a large response, and that time balloons. 

 




---

Click the Accept as Solution button if my answer has helped, and remember to give kudos where appropriate too!
Community Manager

Re: test run takes longer than actual processing

Thanks for your assistance, Matthew.

@krogold, did the suggestions given here help you resolve the issue?

---------
Tanya Gorbunova
SmartBear Community Manager

Join the September Hub-bub to show off, learn and win
Frequent Contributor

Re: test run takes longer than actual processing

Hello,

Thank you for your responses. As I crossed informations from you and smartbear support, I tried to remove readyapi.h2.db and dashboard.h2.db from the db directory as, in my case, they were huge (over 600M and over 300M respectively) and now Ready API behaves as before.

Test case execution is very fast and does no longer hangs. A testSuite execution that took 2 minutes with the hanging problem now takes 4 seconds.

I'm not sure if its a stable and long lasting solution (and it seems that my project is corrupted on other features) but for now it solves that critical problem for me

New Here?
Join us and watch the welcome video:
Watch the New Interview
7Mistakes
Join the exciting event
SeptemberHubBub
Top Kudoed Authors
Join the September Hub-bub to show off, learn and win