for issues #5 "miss 'time' attribute in testsuite"

Apply the patch in the code and also one test case.

After the patch, the 'time' attribute will be always there even there is no time attribute in testcase. If this happens, the value of `time` will be 0.