Skip to content
halida edited this page Mar 2, 2013 · 7 revisions

This is the tester api for run tests.

Get New Solution Test

TOKEN is the secret to identify tester authority. current is asdfrewq.

curl -X POST -d '' http://$SERVER/solutions/tester_get?token=$TOKEN

result:

{
    code: "...", // source code
    language: "..", // python/java/...
    input: "...", // stdin
    output: "...", // expected stdout
    solution_token: "...", // used to identify solution
    time_limit: 1.31, // seconds
    memory_limit: 2000, // k
}

If here is no solution need to be tested, result is {}.

Post New Solution Result

curl -X POST -d "solution_token=256d3f5124ee&status=AC&result=..." http://$SERVER/solutions/tester_set?token=$TOKEN

Send form data: solution_token, status, result.

Clone this wiki locally