def closeXmlReport(self):
      self.xml.write('</testsuite>\n')
      self.xml.close()
      print >> sys.stderr, greenLowStr("[==========]") + " run %d tests\n" % self.numberTests
      if (self.testFailed):
          print >> sys.stderr, failStr("[  FAILED  ]") + " %d tests\n" % self.testFailed
      else:
          print >> sys.stderr, greenLowStr("[  PASSED  ]") + " %d tests\n" % (self.numberTests - self.testFailed)
 def addSuccess(self, test):
     name, classname = self.getTestNames(test)
     self.xml.write('   <testcase name="%s" classname="%s"/>\n' % (name, classname))
     sys.stderr.write("%s %s.%s\n" % (greenLowStr('[ RUN      ]'), classname, name))
     sys.stderr.write("%s %s.%s\n" % (greenLowStr('[       OK ]'), classname, name))