check_correctness {autoharp}R Documentation

Check correctness of student solution rmd.


This will run unit tests on the students' rmd file.


check_correctness(e_stud, e_soln, test_fname)



The environment containing the output objects from running the studnent Rmd file.


The environment containing the objects from the solution template. It will probably contain objects with the suffix "_soln". These will be tested against the versions generated by the student.


The R script containing the test chunks.


Prior to calling this, populate_soln_env should already have been called on the solution template, and the student file should already have been knitted in order to generate the students' objects. Of course, one could generate the test script independent of populate_soln_env, but the solution environment that contains objects with a "_soln" suffix is also needed.

The student environment, solution environment, test file and the list of tests and expectations are the inputs to this function.


A data frame with one row, and the number of columns equal to the number of tests run plus the number of scalars to keep.

See Also

populate_soln_env, render_one

[Package autoharp version 0.0.10 Index]