[Unit Testing Framework] Timeout & Line Count Values

[Unit Testing Framework] Timeout & Line Count Values

  
Forge Component
(21)
Published on 5 Apr by Paulo Ramos
21 votes
Published on 5 Apr by Paulo Ramos
Hi,

I started using the Unit Testing Framework a little while ago and so far have found it to be very beneficial. Implementing it as part of a BPT model would be very powerful for us and we plan to make it part of our product development process.

I was curious about some timeout and line count values as I had to change them in my case and I wanted to ask what the best practice should be here. (Maybe I shouldn't be changing these and my application of the framework is incorrect).

I have a module created for financial-related unit tests (Financial_UT). I have exposed SOAP web services for each aspect of the financial system that should be unit tested.

Example:
- PayingInvoices
- RefundingInvoices
- VoidingInvoices
- more...

This works well.

Taking these unit tests a step further and combining different processes is where I ran into an issue with timeouts. I got the following error:
 
The operation has timed out
   at System.Net.HttpWebRequest.GetResponse()
   at OutSystems.NssHTTPRequestHandler.CssHTTPRequestHandler.MssPostRequest_Submit(String ssURL, Byte[] ssArguments, Int32 ssTimeout, Boolean ssKeepAlive, String& ssTextContent, Byte[]& ssBinaryContent, String& ssBinaryContentType)
   at ssUTF_Core.RssExtensionHTTPRequestHandler.MssPostRequest_Submit(HeContext heContext, String inParamURL, Byte[] inParamArguments, Int32 inParamTimeout, Boolean inParamKeepAlive, String& outParamTextContent, Byte[]& outParamBinaryContent, String& outParamBinaryContentType)

So I went to the UTF_Core action where the PostRequest_Submit is used, and set the timeout property to 10 minutes (high I know, but I plan to have some rather cumbersome unit tests as part of regression testing).

I also had to adjust the LineCount property of the table records on the TestDetails web screen because I have a lot of assertions for my financial records as they get created, updated, etc. as well as comments.

So my questions are:

1. Do you see any flaws or issues with this implementation? Should it be used differently?
2. Should these values be adjusted for the next version so it can be used for larger tests (and my changes are reverted)?

Thanks very much for this wonderful tool!
Just an update on this...

I had to use the 'SetRequestTimeout' action from the HTTPRequestHandler extension at the beginning of each of my unit test actions to avoid the timeout.

Also, I notice that the 'Length' property on the UnitTestWebService.Description and UnitTestWebService.WebServiceName columns needed to be updated to support what I had entered on the WSDL.

Is there a reason that these do not suppor the max length of the WSDL?
Hi Brian,

Thanks for your feedback, you're really pushing the limits on the component. :)

I've just published a new version (1.0.6) with a few changes based on your feedback:
  • Added site property UTF_Core\WSRequestTimeout: allows increasing the timeout for your WS calls (.NET stack only).
  • Added site property UTF\TestDetails_LineCount: allows increasing the results screen max nr of rows (default: 5000).
  • Increased the max length of UnitTestWebService attributes: WebServiceName (250) and Description (1000).

If these changes work for you, upgrades will be easier. You'll have to update (in Service Center) the value of site property UTF_Core\WSRequestTimeout (milisec).
Awesome! Thanks for getting that released, appreciate the quick response.

One thing - this version only supports the platform version 9.1, while the previous version supported 9.0. I am not running platform version 9.1, any chance you can add support or 9.0?

Thanks!
Hi Brian,

As of now I don't have a 9.0 environment to do the changes. As a general recommendation, and since these are only minor tweaks, I'd recommend people running 9.0 to redo the changes (if hitting the same limitations).

You can install Development Environment 9.1 in a different installation folder (keeping your 9.0 version unchanged) if you'd like to take a look at the changes. In this case, just download the component and rename its oap extension to zip and then extract the modules.