The automated testing sratergy we are embarking on is to record/handcrank simple Keyword tests (Units scripts when enhanced logic is required), large tests result in a large number of called keywords and scripts with normal while/if logic to contol which keywords are called.
This has been working well up untill today, when a test failed with an Exception (No additional info/help), the called test ran well on its own, but continued to fail when called,
The only solution I found was to copy the Test statements into the previous keyword test called (It was simply clicking on a button - now it clicks on the button and does stuff)
The stuff copied was not even very complex, a simple CTRL + D keypress and CTRL + S and close two windows.
This has lent me to thinking is there a limit to the number of keyword tests that can be called? (I personally would prefer to script everything, but I have been tasked to make it simple - hence record simple keywords - and then I stitch it all together and add the complex logic)
Todays issue has made me nervous as there was no clear reason for the error and the solution seems to show a weakness in our startergy (No limit to number of keywords appears in any documention, the only limitation I have found is one of Functionality, i.e why I would prefer to script)
Theoretically speaking, you are correct. There's no limit to how "deep" your keyword test calls can be. But, as with anything dealing with computer software, the limitations MAY be outside of the tool. If you consider call stack, you could have a memory limitation of how much memory is consumed if your keyword test calls are too deep.
It's a great question. Thanks for bringing it up here.
I have now converted all the Keyword tests to Scripts (I am happier with scripts anyway!), I have raised a support ticket to ask this question more formally.
I did look at Perfmon trace during the failed execution (Memory and CPU showed benine usage), The call stack showed 4 rows, so not eaxctly huge.
What is the exception ?
You could surround your script with some "try/catch" or "try/except" blocks, and then get the exception message
try your code here except Log.Message('an exception has been raised : ' + exceptionmessage); end;
What happens if you move that failing test somewhere else in the list? Does it always fail on that one test or does it always fail on whatever the last test is?
Thank you for active participation everyone!
@Joberry any luck with solving this?
I found the support ticket you mentioned. It looks like the Support Team is waiting on some information from you there. Please keep us posted on the results of the investigation
I have abandoned using Keywrod tests and converted everything to script, it all works now... There was NO information within the exception, The stack was not big (4 layers), System CPU/Memmory was not maxed, it did litterally appear to be the addition of one more keyword script, if the body of the keyword was moved to the calling keyword, it was happy, if I added one more it failed again.....I have to be honest, I was not entirely happy using keywords, but was forced don that route, scripting is allowing me to perform much better application flow control ...
I see. Thanks for sharing your results with us.
For some users, it’s easier to create tests by using the KDT feature, others like the flexibility that scripting provides. If you feel like scripting does the trick for you, this is great!