def post_run(self, runner): """ Creates a coverage report in HTML """ #generate html for coverage reportPath = os.path.join(runner.setupDir, 'report', 'jscoverage') genOutput = commands.getstatusoutput( "genhtml -o %s %s" % (reportPath, os.path.join(reportPath, '%s-coverage.dat' % JSTEST_CFG_FILE))) self.coverageDir = reportPath if genOutput[1].find("genhtml") > -1: BaseTestRunner._error("JS Unit Tests - html coverage " "generation failed, genhtml needs to be " "in your PATH. (%s)\n" % genOutput[1]) else: BaseTestRunner._info("JS Coverage - report generated\n") # open a browser window with the report openBrowser(runner.config.getBrowserPath(), os.path.join( reportPath, "index.html"))
def _buildArgs(self): args = NoseTestRunner._buildArgs(self) if not self.options.valueOf('specify'): #TODO: Make more general for functional test. # add plugins args += BaseTestRunner.findPlugins() return args
def __init__(self, **kwargs): BaseTestRunner.__init__(self, **kwargs) self.coverage = self.options.valueOf('coverage') self.specify = self.options.valueOf('specify')
def writeNormalReport(self, fileName, content): """ Just call the parent report writing method (used from HTMLOption) """ BaseTestRunner._writeReport(self, fileName, content)
def __init__(self, **kwargs): BaseTestRunner.__init__(self, **kwargs) self.outStream = None
def __init__(self, **kwargs): BaseTestRunner.__init__(self, **kwargs) self.child = None