Test

Endpoints for submitting and validating test cases

Test endpoint

post

Handles test requests.

Body
sourcestringOptional

Source code to be tested

Example: public class Main { public static void main(String[] args) { System.out.println("Hello World"); }}
compilerstringOptional

Compiler to be used

Example: javac
metastringOptional

Additional metadata

Example: Test metadata
Responses
200
Successful response
application/json
post
POST /api/v1/test HTTP/1.1
Host: localhost:7070
Content-Type: application/json
Accept: */*
Content-Length: 202

{
  "source": "public class Main { public static void main(String[] args) { System.out.println(\"Hello World\"); }}",
  "compiler": "javac",
  "tests": [
    {
      "input": "1 2",
      "expectedOutput": "3"
    }
  ],
  "meta": "Test metadata"
}
{
  "message": "Success"
}

Was this helpful?