Example #1
0
    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"))
Example #2
0
    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
Example #3
0
 def __init__(self, **kwargs):
     BaseTestRunner.__init__(self, **kwargs)
     self.coverage = self.options.valueOf('coverage')
     self.specify = self.options.valueOf('specify')
Example #4
0
 def writeNormalReport(self, fileName, content):
     """
     Just call the parent report writing method
     (used from HTMLOption)
     """
     BaseTestRunner._writeReport(self, fileName, content)
Example #5
0
    def __init__(self, **kwargs):

        BaseTestRunner.__init__(self, **kwargs)
        self.outStream = None
Example #6
0
 def __init__(self, **kwargs):
     BaseTestRunner.__init__(self, **kwargs)
     self.child = None