def get_requirement_details(requirement_file):
    """
    Read title, id and context from requirement file.

    :param requirement_file: path and name of requirement file.
    :return: details of requirement file
    """
    details = {'title': '', 'id': '', 'context': ''}
    line_idx = 0
    with open(requirement_file, 'r') as handle:
        line = handle.readline()
        while line:
            if line_idx == 0:
                details['title'] = line.replace("# ", "").strip()
            elif line.find('**Id**:') > 0:
                details['id'] = line[line.find(':')+1:].strip()
            elif line.find('**Context**:') > 0:
                details['context'] = line[line.find(':')+1:].strip()
            line = handle.readline()
            line_idx += 1
    return details