# functions in order to report the summaries # ------------------------------------------------------- """ the reporting-system in bottom-up (0) raw-data (0.1) artificats created from test-system - raw-files up to work-files - (0.2) in logs all contacts to test-system - raw-info - (1) comparison-result (1.1) comparison-result as difference for each file-comparison in html-files in testcases - diff-files - (1.2) extraction of diff-files (only not accepted differences) as html-file in test-set - result-report - (2) result-code (2.1) result-code of each test-step for each component in testcases - parameter-file - (2.2) transfer of the summary result-code of each testcase to an extern reporting-system - protocol - (2.3) visualization of final result-code of each component and each testcase in test-set - result-report - (2.4) visualization of statistical result-codes of each component and each test-set in test-context - result-report - """ import basic.program def getTcExtraction(tcpath, comp): """ extracts the pure differences of diff-files :param comp: :return: html-code with links to diff-files """ job = basic.program.Job.getInstance() verify = -0 + job.getDebugLevel("report_tool") job.debug(verify, "writeDataTable " + str(comp)) body = '

' # for f in diff-files: # body = body + extractDiffLines body = body + '

' return body def getTcBody(tcpath): """ :param tcpath: :return: """ job = basic.program.Job.getInstance() verify = -0+job.getDebugLevel("report_tool") job.debug(verify, "writeDataTable " + str(tcpath)) body = '

' # for c in comps: # body = body + '

' return body def getTcHeader(tcpath): """ creates header :param tcpath: :return: html-code with result-codes of each component """ job = basic.program.Job.getInstance() verify = -0+job.getDebugLevel("report_tool") job.debug(verify, "writeDataTable " + str(tcpath))