Forum Discussion
You're writing in Python...so I'm not sure a lot about it.
In JavaScript, JScript, or other C-based scripting languages in TestComplete, you can do the following
KeywordTests['Test1'].Run()
So, you could replace the KeywordTest name with the identifier you pull out of your XML. I don't believe that is available in Python.
So, instead, you might need to do something like this
testToRun = eval('KeywordTest.' + testName)
testToRun.Run()
I solved this problem in this way .
for test in Test_List:
try:
strFunctionCall = aqString.Format("KeywordTests.%s.Run()",test)
eval(strFunctionCall)
Log.Message("Test : " + test + "has positive result")
except:
Log.Message("Test : " + test + "has negative result")
if a test failed the script doesn't go to the next iteration .. at the moment i haven't a solution, do you have any ideas?
- tristaanogre6 years agoEsteemed Contributor
You're throwing an exception which probably throws an error into the log. You probably have "stop on error" turned on which is halting the project upon logging an error.
- egiacomi6 years agoContributor
Yes i have "StopOnError" option set TRUE , there is a way to disable the option only for this script ? I'm forced to set this option TRUE, do you know any workaround to this problem?
My target is skip to the next iteration in the cycle if a test successed also if a test failed
Related Content
- 9 years ago
- 4 years ago
Recent Discussions
- 5 minutes ago
- 20 hours ago