예제 #1
0
def run_test(request, mode, id):
    if request.session.get('login_status'):
        if request.method == 'GET':
            if mode == 'run_by_test':
                result = main_ate(run_by_single(id))
            elif mode == 'run_by_module':
                test_lists = run_by_module(id)
                result = get_result(test_lists)
            elif mode == 'run_by_project':
                test_lists = run_by_project(id)
                result = get_result(test_lists)
            return render_to_response('report_template.html', result)
    else:
        return HttpResponseRedirect("/api/login/")
예제 #2
0
def run_batch_test(request):
    if request.session.get('login_status'):
        if request.method == 'POST':
            test_lists = run_by_batch(request.body.decode('ascii').split('&'))
            result = get_result(test_lists)
            return render_to_response('report_template.html', result)
    else:
        return render_to_response("login.html")