Exemple #1
0
def pytest_html_results_table_row(report, cells):
    print("@@@@@@@@@@@@@@@@@@@11", api_val.url)
    cells.insert(1, html.th(report.description))
    cells.insert(2,html.th(api_val.statue_code))
    cells.insert(3, html.th(api_val.url))
    cells.insert(4, html.th(api_val.reponse))
    cells.insert(5, html.th(api_val.request))
Exemple #2
0
def pytest_html_results_table_header(cells):
    cells.insert(1, html.th("模块"))
    cells.insert(2, html.th("状态码"))
    cells.insert(3, html.th("url"))
    cells.insert(4, html.th("响应参数"))
    cells.insert(5, html.th("请求参数",class_='json'))
    cells.pop()
Exemple #3
0
def pytest_html_results_table_header(cells):
    """
    添加带有测试函数docstring的description列,添加可排序的time列,并删除links列
    :param cells:
    :return:
    """

    cells.insert(2, html.th('Description'))
    cells.insert(1, html.th('Time', class_='sortable time', col='time'))
    cells.pop()
Exemple #4
0
def pytest_html_results_table_header(cells):
    # 添加用例描述
    cells.insert(2, html.th('Description'))
    # 添加时间
    # cells.insert(1, html.th('Time', class_='sortable time', col='time'))
    # 删除最后links列的内容
    cells.pop()
Exemple #5
0
def gen_table_tag(statis):
    str_style = gen_table_style()

    tat_style = html.style(str_style, type='text/css')
    # print(tat_style)

    list_tag_row = list()
    list_head = ['Module', 'Total Tests', 'Passed', 'Failed', 'Pass Rate']
    list_tag_row.append(html.tr([html.th(item) for item in list_head]))

    for key, value in statis.items():
        list_stat = list()
        list_stat.append(key)
        list_stat.extend([v for v in value.values()])
        list_tag_col = list()
        for idx, item in enumerate(list_stat):
            if idx in [1, 2, 3]:
                list_tag_col.append(html.td(html.a(item, href="#results-table")))
            else:
                list_tag_col.append(html.td(item))

        list_tag_row.append(list_tag_col)
        # list_tag_row.append(html.tr([html.td(item) for item in list_stat]))

    tag_table = html.table([html.tr(item) for item in list_tag_row], class_='gridtable')

    return [tat_style, tag_table]
Exemple #6
0
def pytest_html_results_table_header(cells):
    """
    modify the columns of test report by implementing custom hooks for the header and rows.
    Adds a sortable Timestamp column, and removes the links column:
    :param cells: report table cells
    :return: modified results table
    """
    cells.insert(3, html.th('Timestamp', class_='sortable time', col='time'))
    cells.pop()
def pytest_html_results_table_header(cells):
    cells.pop(1)
    cells.insert(1, html.th('Area', class_='sortable'))
    cells.insert(2, html.th('Name', class_='sortable'))
    cells.insert(3, html.th('Markers', col='markers'))
    cells.insert(4, html.th('Setup Start', col='timestamp', class_='sortable'))
    cells.insert(5, html.th('Start', col='timestamp', class_='sortable'))
    cells.insert(6, html.th('End ', col='timestamp', class_='sortable'))
    cells.pop()
Exemple #8
0
def pytest_html_results_table_header(cells):
    cells.insert(1, html.th('Time', class_='sortable time', col='time'))
    cells.insert(2, html.th('Test_nodeId'))
    # cells.insert(2, html.th('Description'))
    cells.pop(-1)  # 删除link列
    cells.pop(-2)  # 删除 用例 列
def pytest_html_results_table_header(cells):
    cells.insert(2, html.th("Full Time"))
    cells.insert(3, html.th("Incremental Time"))
    cells.insert(4, html.th("Test Case Location"))
    cells.pop()
    cells.pop()
Exemple #10
0
def pytest_html_results_table_header(cells):
    cells.insert(1, html.th('描述'))
    cells.pop(-1)  # 删除link列
Exemple #11
0
def pytest_html_results_table_header(cells):
    cells.insert(1, html.th('Description'))
    cells.insert(2, html.th('Test_nodeid'))
    cells.pop(2)
    cells.pop()  # modify by linuxchao at 2018.0803 delete link for report
Exemple #12
0
def pytest_html_results_table_header(cells):
    '''插入Description列和Test_nodeid列,删除原有的Test列'''
    cells.insert(1, html.th('Description'))
    cells.insert(2, html.th('Test_nodeid'))
    cells.pop(2)
Exemple #13
0
def pytest_html_results_table_header(cells):
    cells.pop(-1)
    cells.insert(1, html.th('Description'))
Exemple #14
0
def pytest_html_results_table_header(cells):
    cells.insert(3, html.th('Timestamp', class_='sortable time', col='time'))
    cells.pop()
def pytest_html_results_table_header(cells):
    """插入Description和Test_nodeid列,删除原来的Test列"""
    cells.insert(1, html.th('Description'))
    cells.insert(2, html.th('Test_nodeid'))
    cells.pop(2)
Exemple #16
0
def pytest_html_results_table_header(cells):
    cells.insert(1, html.th('Description'))
    cells.pop()  # 删除报告最后一列links
def pytest_html_results_table_header(cells):
    '''插入列信息'''
    cells.insert(2, html.th('模块'))
    cells.insert(3, html.th('描述'))
    cells.insert(4, html.th('时间', class_='sortable time', col='time'))
    cells.pop()
Exemple #18
0
def pytest_html_results_table_header(cells):
    cells.insert(2, html.th("Description"))
    cells.insert(1, html.th("Time", class_="sortable time", col="time"))
    cells.pop()
Exemple #19
0
def pytest_html_results_table_header(cells):
    cells.insert(1, html.th('Description'))
    cells.insert(2, html.th('Test_nodeid'))
    cells.pop(2)
    cells.pop()
def pytest_html_results_table_header(cells):
    cells.insert(1, html.th('Template',class_='sortable'))
    cells.insert(2, html.th('Test_Type', class_='sortable'))
    cells.insert(3, html.th('Disease_Category', class_='sortable'))
    cells.insert(4, html.th('Question_Type', class_='sortable'))
    cells.pop()
Exemple #21
0
def pytest_html_results_table_header(cells):
    cells.insert(1, html.th('用例名称'))
    cells.insert(2, html.th('Test_nodeid'))
    cells.pop(2)
Exemple #22
0
def pytest_html_results_table_header(cells):
    '''修改report.html中的results-table头部分'''
    cells.insert(2, html.th('Description'))
    cells.insert(3, html.th('Time', class_='sortable time', col='time'))
    cells.pop()
Exemple #23
0
def pytest_html_results_table_header(cells):
    cells.insert(2, html.th('Description'))
    cells.insert(3, html.th('Time', class_='sortable time', col='time'))
    # cells.insert(1,html.th("Test_nodeid"))
    cells.pop()
def pytest_html_results_table_header(
        cells):  # cells为list 默认值[outcome(执行结果),test_id,duration,links]
    cells.insert(2, html.th('Description'))  # 描述title放在第3列
    cells.insert(4, html.th('Time', class_='sortable time',
                            col='time'))  # 时间title放在第5列
    cells.pop()  # 删除Links一列