| | |
| | | else: |
| | | errorfh.write('No match element %s.\n' % element) |
| | | |
| | | if level == 'Stop': |
| | | elif level == 'Stop': |
| | | |
| | | tcpattern=re.compile("(Testcase): (.*), ElapsedTime: (.*)") |
| | | tcmatch = tcpattern.search(message) |
| | |
| | | else: |
| | | errorfh.write('No match element %s.\n' % element) |
| | | |
| | | if level == 'Status': |
| | | elif level == 'Status': |
| | | |
| | | tcpattern=re.compile("(Testcase): (.*), Pass: (.*), Fail: (.*), ElapsedTime: (.*), NumStarts: (.*)") |
| | | tcmatch = tcpattern.search(message) |
| | |
| | | |
| | | else: |
| | | errorfh.write('No match element %s.\n' % element) |
| | | |
| | | else: |
| | | errorfh.write('Bad element %s.\n' % element) |
| | | |
| | | </script> |
| | | </iterate> |
| | |
| | | |
| | | if testDict.has_key(tcname): |
| | | |
| | | tcnamesplit=tcname.split(":") |
| | | testgroup=tcnamesplit[0] |
| | | testsuite=tcnamesplit[1] |
| | | |
| | | if testDict[tcname].has_key('pass'): |
| | | tcpass=testDict[tcname]['pass'] |
| | | else: |
| | |
| | | else: |
| | | tcresult='fail' |
| | | |
| | | xmlfh.write(' <testcase name="%s" result="%s" start="%s" stop="%s" duration="%s"/>\n' % (tcname,tcresult,tcstart,tcstop,tcduration)) |
| | | xmlfh.write(' <testgroup name="%s">\n' % testgroup) |
| | | xmlfh.write(' <testsuite name="%s">\n' % testsuite) |
| | | xmlfh.write(' <testcase name="%s" result="%s" start="%s" stop="%s" duration="%s"/>\n' % (tcname,tcresult,tcstart,tcstop,tcduration)) |
| | | xmlfh.write(' </testsuite>\n') |
| | | xmlfh.write(' </testgroup>\n') |
| | | </script> |
| | | |
| | | <!-- XML Report Post --> |
| | |
| | | |
| | | source = StreamSource(FileInputStream("%s" % xmlfile)) |
| | | result = StreamResult(FileOutputStream("%s" % htmlfile)) |
| | | |
| | | |
| | | transformer.transform(source, result) |
| | | </script> |
| | | |