testwhat (version 4.2.2)

test_exercise: Run all tests for an exercise

Description

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.

Usage

test_exercise(sct, ex_type, pec, student_code, solution_code, student_env, solution_env, output_list, in_test_mode = FALSE)

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
in_test_mode
whether or not the system is in 'content testing mode'. If this is the case, e.g. test_or will behave differently.

Value

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