Contents - Index


Add a Second Test Case

 

It is easy for a student to inadvertently "hard code" one of the input values in their code such that the values of the input variables that are set in the $IfNot Macro … $EndIf clause in the EESyGrader header are ignored.  This is a frustrating mistake for students to make because the answers that are calculated match those provided in the test case; however, when EESyGrader opens the submission, sets the inputs to different values, and solves the program the outputs will not change.  As a result, the student receives a poor grade on an assignment that is otherwise correct.  To reduce the likelihood of this happening, it is good practice to add a second test case that is obtained by changing the values of the inputs.  Students can check their answers against the first test case, change the inputs and make sure that their answers all change to the values provided for the second test case.  

 

To add a second test case, select Done in the EESyGrader Starter Code Dialog and again in the EESyGrader Rubric Dialog.  Then change the values of the input variables in your EES solution and solve.  For example, in my sample EES program shown below I have changed the values of P_1_kPa and Vol_1 from 300 kPa and 1 m3, respectively to 400 kPa and 2 m3.

 

"Inputs"

P_1_kPa = 400 [kPa]

Vol_1 = 2 [m^3]

 

Sample EES Solution with the input variable values changed for second test case.

 

Now select Create EESyGrader Rubric from the Options menu and you should see that the values of the input and output variables have been repopulated with their current values, as shown below.

 

EESyGrader Rubric repopulated with updated input and output variable values.

 

To add this new test case to the starter code, select Add Case to Starter which will add the new input and outputs to the previously generated EESyGrader Starter Code, as shown below when copied and pasted into an EES program.

 

EESyGrader Starter Code Dialog with second test case added.