コード例 #1
0
def get_last_executions():
    if request.method == 'POST':
        project = request.form['project']
        suite = request.form['suite']
        limit = request.form['limit']
        project_data = report_parser.get_last_executions(root_path, project, suite, limit)
        return jsonify(projects=project_data)
コード例 #2
0
def project_health():
    project = request.args['project']
    _verify_permissions(Permissions.REPORTS_ONLY, project)
    project_data = report_parser.get_last_executions(projects=[project], suite=None,
                                                     limit=1)
    health_data = {}
    for suite, executions in project_data[project].items():
        execution_data = report_parser.get_execution_data(project=project,
                                                          suite=suite,
                                                          execution=executions[0])
        health_data[suite] = {
            'execution': executions[0],
            'total': execution_data['total_tests'],
            'totals_by_result': execution_data['totals_by_result']
        }
    return jsonify(health_data)
コード例 #3
0
def get_project_health_data():
    if request.method == 'POST':
        project = request.form['project']
        project_data = report_parser.get_last_executions(root_path, project=project,
                                                         suite=None, limit=1)
        
        health_data = {}

        for suite, executions in project_data[project].items():
            execution_data = report_parser.get_execution_data(workspace=root_path,
                                                              project=project,
                                                              suite=suite,
                                                              execution=executions[0])
            health_data[suite] = {
                'execution': executions[0],
                'total': execution_data['total_cases'],
                'total_ok': execution_data['total_cases_ok'],
                'total_fail': execution_data['total_cases_fail'],
                'total_pending': execution_data['total_pending']
            }
        return jsonify(health_data)
コード例 #4
0
def report_suite_last_executions():
    project = request.args['project']
    suite = request.args['suite']
    _verify_permissions(Permissions.REPORTS_ONLY, project)
    project_data = report_parser.get_last_executions([project], suite=suite, limit=50)
    return jsonify(projects=project_data)
コード例 #5
0
def report_last_executions():
    user = _get_user_api_or_session()
    project_list = user.project_list
    project_data = report_parser.get_last_executions(project_list, limit=5)
    return jsonify(projects=project_data)