Creating Capture Points Tests

Capture Points Test allow you to use any custom grading script in CodeGrade and parse its output.
With a Capture Points test you can easily run and integrate your own grading scripts. A Capture Points Test captures the output of the executed program with a Python3 Regular Expression. This output should be a floating point number between 0 and 1.
Want to use unit tests or linters? Use our Unit Test or Code Quality steps instead!
Simple Capture Points tests with a custom test script uploaded as a fixture
  1. 1.
    Press the "Add Capture Points" button to add a new Capture Points test to your Test Category.
  2. 2.
    Input which program you want to execute.
  3. 3.
    Specify the Python3 Regex with which you want to capture the output. By default this captures a single float. This number is multiplied by the weight to get the amount of points.
We recommend you run your program with our utility program normalize_floats to ensure that the score you write can be read correctly by CodeGrade. For example, if the command to run your tests is run_tests, you would run normalize_floats 2 run_tests to output the score with 2 decimals precision. This utility program is installed to AutoTest by default.
A Python3 Regex may contain \f, which will capture a float.