Developers' Forum

Student specified test cases.

 
Picture of Chris Sangwin
Student specified test cases.
by Chris Sangwin - Thursday, 21 June 2018, 2:20 AM
 
Richard, 

Do you see some value in a CodeRunner extension in which students are required to add in a small number of test cases, prior to their adding in their own code? Obviously, the students' test cases would be assessed by running them against the teacher's answer.... 

This might help embed the value of test driven design, and force students to read the specifications prior to coding. 

Sorry if you've already thought about this idea! Just a mad thought. 

CodeRunner continues to be very useful to us in Edinburgh, with expanding use. 

 Chris

Picture of Richard Lobb
Re: Student specified test cases.
by Richard Lobb - Thursday, 21 June 2018, 10:46 PM
 

Funny you should mention this, Chris. The next release of CodeRunner will have a new Table UI, that I wrote specially for a new type of Testing question. Below is a screen dump of the first question of that sort that I'm planning to use next semester in our stage 1 course.

This isn't quite what you suggested. It's a specific different question type, rather than the usual sort with student-supplied test data. I'm not sure how one would go about marking a question of the sort you propose although I can see it has other benefits.

What do you think?

Richard

Testing question screen dump

Picture of Chris Sangwin
Re: Student specified test cases.
by Chris Sangwin - Thursday, 21 June 2018, 11:41 PM
 

Richard,

That looks like exactly the kind of case I wanted to cover.  Thanks!  

I was suggesting the student write both the test cases and the code itself, but that can be covered with two questions. We should test this new functionality out here I think before commenting further.

Chris