[BDDFramework] Unable to call TestSuite screen X for eSpace Y: Exception The operation has timed out

Forge Component
(21)
Published on 2019-12-02 by João Proença
21 votes
Published on 2019-12-02 by João Proença

Hi João and fellow community,


I've been using BDDFramework very successfully in my project so far. The latest news have been the automation of our unit tests (thanks to this blog article!) where we built a simple application that cycles all existing test modules and provides their results in a dashboard.


One issue my team is struggling with though, regards certain test suite screens that take too long: for example, one particular test suite screen takes up to 100 secs to load but then times out. Where should this time-out be extended? I've tried the following:

- adding an HTTPRequestHandler\SetRequestTimeout action to the Preparation of my TestSuite screen;

- increasing the Timeout In Seconds property of my test runner that is consuming BDDFramework's exposed REST API, RunTestSuite;

- troubleshooting the below logic in RunTestSuite and finding out that HttpGet action is the source of the timeout;


Unfortunately, HttpGet action is part of RichMail extension, and source code is not available for this component. Any chances its request timeout can be increased? Or how can I resolve this by other means?


Thank you,

Pedro

Hey Pedro,

Sorry for not replying before, but somehow I didn't receive a notification of your message.

Just to be clear, looking at the error and stack you get in the timeout, you came to the conclusion that it is timing out in the HTTPGet action call and not in any of the other places, right?

If that's the case, you could probably use something different in your own version of the BDDFramework to make the HTTP request instead of the RichMail one. There's a GetRequest_Submit in HTTPRequestHandler that may work, for instance (it has a timeout parameter).

Cheers!

João

Solution

Thanks João,


Fortunately, I seem to have found the issue: one of my BDD Test Scenarios was calling an external REST API that was taking too long to end. This REST API was also being called on all scenarios of my TestSuite screen, so it seems that the HTTPRequestHandler\SetRequestTimeout was not using a sufficiently long time out. 


On the other hand, this was solved in a different way: after inspecting the platform logs I was able to identify the API REST call being consumed and had the fortunate chance to use a different parameter set which resulted in a much faster response. These new parameters were still fortunately consistent with the BDD Test Scenario, but I'll be following up to the external system owners to raise this matter.


Cheers,

Pedro

Solution