@staticmethod
def add_error_item_to_testcase(stderr_type, tc_key, testcases, lines):
    """
        Update a test case in the base report with an assertion or error
        :param stderr_type: error or assertion
        :param tc_key: key into base report dict
        :param testcases: base report
        :param lines: captured stacktrace to add
        :return:
        """
    assert tc_key in testcases
    if stderr_type == 'error':
        testcases[tc_key].add_error(lines)
    else:
        testcases[tc_key].add_assertion(lines)
