def initialize(self):
        """Perform any initialization needed by the test runner.

        Initializes report. Sends runner and header messages to the report.
        """
        cf = self.config
        cf.username = os.environ["USER"]
        os.chdir(cf.logfiledir) # Make sure runner CWD is a writable place.
        cf.runnerstarttime = starttime = timelib.now()
        cf.runnertimestamp = timelib.strftime("%Y%m%d%H%M%S",
                timelib.localtime(cf.runnerstarttime))
        try:
            rpt = cf.get_report()
        except reports.ReportFindError as err:
            cf.UI.error(str(err))
            cf.UI.printf("%YUse at least one of the following%N:")
            cf.UI.print_list(cf.reports.keys())
            cf.UI.Print("\n")
            raise TestRunnerError("Cannot continue without report.")
        # Report file's names. save for future use.
        rpt.initialize(cf)
        cf.reportfilenames = rpt.filenames
        rpt.add_title("Test Results for %r." % " ".join(cf.get("argv", ["unknown"])))
        arguments = cf.get("arguments")
        # Report command line arguments, if any.
        if arguments:
            rpt.add_message("RUNNERARGUMENTS", " ".join(arguments))
        # Report comment, if any.
        comment = cf.get("comment")
        if comment:
            rpt.add_message("COMMENT", comment)
        # Report build here, if given.
        build = cf.get("build")
        if build:
            rpt.add_message("BUILD", build)
        rpt.add_message("RUNNERSTARTTIME", starttime, 0)
dataset/ETHPy150Open kdart/pycopia/QA/pycopia/QA/testrunner.py/TestRunner.initialize/original