Fix for TestON silently swallowing errors in testcases
* Print stack traces and error messages
* "ExperimentalHandling" function now also takes unnamed arguments. Needs more work to parse them for experimental mode
diff --git a/TestON/core/teston.py b/TestON/core/teston.py
index 3f07691..fa2c488 100644
--- a/TestON/core/teston.py
+++ b/TestON/core/teston.py
@@ -240,8 +240,10 @@
exec code[testCaseNumber][step] in module.__dict__
self.stepCount = self.stepCount + 1
except TypeError,e:
+ print "Exception in the following section of code:"
+ print code[testCaseNumber][step]
self.stepCount = self.stepCount + 1
- self.log.error(e)
+ self.log.exception(e)
return main.TRUE
if cli.stop:
@@ -442,8 +444,8 @@
try :
import json
response_dict = json.loads(response)
- except Exception , e :
- print e
+ except Exception, e:
+ main.log.exception(e)
main.log.error("Json Parser is unable to parse the string")
return response_dict
@@ -461,7 +463,7 @@
try :
response_dict = xmldict.xml_to_dict("<response> "+str(response)+" </response>")
except Exception, e:
- main.log.error(e)
+ main.log.exception(e)
return response_dict
def dict_to_return_format(self,response,return_format,response_dict):