Run all tests for an exercise and report the results (including feedback). This function is run by R Backend and should not be used by course creators.

test_exercise(sct, ex_type, pec, student_code, solution_code, student_env,
  solution_env, output_list, allow_errors = FALSE,
  force_diagnose = FALSE, seed = 42)

Arguments

sct

Submission correctness tests as a character string.

ex_type

Type of the exercise

pec

pre-exercise-code

student_code

character string representing the student code

solution_code

character string representing the solution code

student_env

environment containing the objects defined by the student.

solution_env

environment containing the objects defined by solution code

output_list

the output structure that is generated by RBackend

allow_errors

whether or not errors are allowed by RBackend (FALSE by default)

force_diagnose

whether diagnose tests have to pass even if the checks pass (FALSE by default)

seed

random seed that is used for SCTs that run expressions (42 by default).

Value

A list with components passed that indicates whether all tests were sucessful, and feedback that contains a feedback message.